/* =====================================================
   369YAX – Automation & Design
   Global styles (light + dark theme, responsive)
   PRO – Clean static hero photos (no jumps)
===================================================== */

/* ==========
   RESET / BASE
   ========== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.25s ease, color 0.25s ease;
}

/* ==========
   COLOR SYSTEM – LIGHT THEME (DEFAULT)
   ========== */

:root {
    --bg-main: #ffffff;
    --bg-alt: #f5f5f7;
    --card-bg: #ffffff;
    --border-soft: #d0d3dd;

    --accent: #d60000;
    --accent-soft: rgba(214, 0, 0, 0.10);

    --text-main: #111111;
    --text-muted: #5f6470;

    --pill-bg: #f0f1f5;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.08);

    --radius-lg: 18px;
    --radius-pill: 999px;
}

/* ==========
   LAYOUT HELPERS
   ========== */

.container {
    width: min(1120px, 100% - 32px);
    margin-inline: auto;
}

.section {
    padding: 80px 0;
    background: var(--bg-main);
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 32px;
}

/* ==========
   HEADER
   ========== */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}

/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-hex {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0, #ff3b3b, #931010);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(214, 0, 0, 0.4);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-main {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Nav (desktop) */

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.9rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.1s ease;
}

.main-nav a:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.main-nav .nav-cta {
    border: 1px solid rgba(214, 0, 0, 0.8);
    color: #ffffff;
    background: linear-gradient(135deg, #ff3b3b, #a01010);
}

/* Header right controls (lang + theme) */

.header-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--pill-bg);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition:
        background 0.2s ease,
        transform 0.1s ease,
        border-color 0.2s ease;
    cursor: pointer;
}

.link-pill:hover {
    background: rgba(214, 0, 0, 0.08);
    border-color: rgba(214, 0, 0, 0.7);
    transform: translateY(-1px);
}

/* Active language */

.lang-btn.is-active {
    background: var(--accent-soft);
    border-color: rgba(214, 0, 0, 0.7);
    color: var(--accent);
    font-weight: 600;
}

.theme-toggle {
    min-width: 42px;
    text-align: center;
    padding-inline: 10px;
}

/* ==========
   BURGER (MOBILE NAV TOGGLE)
   ========== */

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text-main);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}

.nav-toggle span + span {
    margin-top: 4px;
}

/* Burger to "X" */

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ==========
   HERO – TEXT + LAYOUT
   ========== */

.hero {
    padding: 72px 0 64px;
    background: var(--bg-main);
}

.hero-inner {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 16px;
}

.accent {
    color: var(--accent);
}

.hero-sub {
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.btn {
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #ff3b3b, #a01010);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(214, 0, 0, 0.35);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(214, 0, 0, 0.5);
}

.btn.ghost {
    border-color: rgba(0, 0, 0, 0.15);
    color: #111111;
    background: transparent;
}

.btn.ghost:hover {
    background: rgba(0, 0, 0, 0.03);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-tags span {
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    background: #f0f0f3;
}

/* ==========
   HERO CARD + PHOTOS (STATIC)
   ========== */

.hero-card {
    background: #f9f9fb;
    border-radius: 22px;
    padding: 22px 20px 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    transform: translateY(0);
    opacity: 1;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.hero-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    border-color: rgba(214, 0, 0, 0.65);
}

.hero-photos {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
}

.hero-photo-frame {
    position: absolute;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    border: 1px solid rgba(214, 0, 0, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #000;
}

.hero-photo-main {
    width: 58%;
    height: 100%;
    left: 0;
    top: 0;
}

.hero-photo-workshop {
    width: 52%;
    height: 72%;
    right: 0;
    bottom: -8px;
}

.hero-card:hover .hero-photo-main,
.hero-card:hover .hero-photo-workshop {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.hero-card h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.hero-card ul {
    list-style: none;
    margin-bottom: 12px;
}

.hero-card li {
    font-size: 0.9rem;
    padding: 4px 0;
    color: var(--text-muted);
}

.hero-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 8px;
    margin-top: 6px;
}

/* ==========
   CARDS (SERVICES & MACROS)
   ========== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.04);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-list {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-main);
}

.card-list li {
    padding-left: 12px;
    position: relative;
    margin-bottom: 5px;
}

.card-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
}

/* ==========
   PORTFOLIO
   ========== */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.portfolio-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px 18px 14px;
    border: 1px solid var(--border-soft);
}

.portfolio-item h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.portfolio-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    background: var(--accent-soft);
    color: #b01010;
}

/* ==========
   ABOUT
   ========== */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 24px;
}

.about-list {
    list-style: none;
    font-size: 0.9rem;
    margin-top: 12px;
}

.about-list li {
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
}

.about-box {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 16px 18px 14px;
}

/* ==========
   CONTACT
   ========== */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
    gap: 24px;
}

.contact-line a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 0, 0, 0.5);
}

.contact-line a:hover {
    border-bottom-color: #000000;
}

.contact-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.contact-note.small {
    font-size: 0.8rem;
}

.contact-form {
    margin-top: 24px;
    background: var(--card-bg);
    padding: 18px 18px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.04);
}

.contact-form .form-row {
    margin-bottom: 16px;
}

.contact-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #c6cad6;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #ffffff;
    color: #111111;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==========
   FOOTER
   ========== */

.site-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f7f7fa;
    padding: 14px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========
   RESPONSIVE
   ========== */

@media (max-width: 900px) {
    .hero-inner,
    .cards-grid,
    .portfolio-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-inner {
        padding-top: 8px;
    }

    .hero-card {
        order: -1;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .top-bar-inner {
        gap: 10px;
    }

    .header-controls {
        gap: 6px;
    }

    .main-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-main);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        padding: 12px 16px 16px;
        gap: 4px;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
        z-index: 40;
    }

    body.nav-open .main-nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav a {
        padding: 10px 12px;
        border-radius: 8px;
    }

    .main-nav .nav-cta {
        text-align: center;
        margin-top: 6px;
    }

    .section {
        padding: 60px 0;
    }

    .site-footer .footer-inner {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .hero-photos {
        max-width: 100%;
        aspect-ratio: 4 / 3;
        margin-bottom: 14px;
    }

    .hero-photo-main {
        width: 62%;
    }

    .hero-photo-workshop {
        width: 56%;
        height: 72%;
        bottom: -6px;
    }
}

/* ==========
   REDUCED MOTION
   ========== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   DARK MODE – RED STEEL STYLE
   ===================================================== */

body.dark-mode {
    --bg-main: #07080b;
    --bg-alt: #0d0f14;
    --card-bg: #11141b;
    --border-soft: #272b36;
    --accent: #d60000;
    --accent-soft: rgba(214, 0, 0, 0.12);
    --text-main: #f5f5f5;
    --text-muted: #a4a8b3;
    --pill-bg: #181b24;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);

    background: radial-gradient(circle at top, #161923 0, #05060a 55%, #020308 100%);
    color: var(--text-main);
}

body.dark-mode .top-bar {
    background: linear-gradient(to bottom, rgba(5, 6, 10, 0.96), rgba(5, 6, 10, 0.85));
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.dark-mode .hero {
    background: transparent;
}

body.dark-mode .section {
    background: transparent;
}

body.dark-mode .section-alt {
    background: var(--bg-alt);
}

body.dark-mode .site-footer {
    background: #05060a;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

body.dark-mode .main-nav a {
    color: var(--text-muted);
}

body.dark-mode .main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .main-nav .nav-cta {
    border-color: rgba(214, 0, 0, 0.7);
}

body.dark-mode .hero-tags span {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .hero-card {
    background: radial-gradient(circle at top, #202331, #10121a 60%);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .link-pill {
    background: var(--pill-bg);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .link-pill:hover {
    background: rgba(214, 0, 0, 0.18);
    border-color: rgba(214, 0, 0, 0.7);
}

body.dark-mode .nav-toggle span {
    background: #f5f5f5;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: #05060a;
    border-color: #272b36;
    color: #f5f5f5;
}

/* ==========
   FLOATING CTA (CHAT LAUNCHER) — BOOSTED VISIBILITY
   ========== */

.floating-cta {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 22px;
    border-radius: 999px;

    background: linear-gradient(135deg, #ff4747, #c40000);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;

    text-decoration: none;

    box-shadow:
        0 0 20px rgba(255, 40, 40, 0.65),
        0 10px 24px rgba(0, 0, 0, 0.45);

    border: 2px solid rgba(255, 255, 255, 0.25);

    transition:
        transform 0.2s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
    cursor: pointer;
}

.floating-cta:hover {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(135deg, #ff5c5c, #e00000);
    box-shadow:
        0 0 26px rgba(255, 60, 60, 0.75),
        0 12px 28px rgba(0, 0, 0, 0.55);
}

.floating-cta::after {
    content: "";
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 999px;
    background: rgba(255, 60, 60, 0.45);
    filter: blur(24px);
    z-index: -1;
    animation: pulseChat 2.2s infinite ease-in-out;
}

@keyframes pulseChat {
    0% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(1.1); }
    100% { opacity: 0.35; transform: scale(1); }
}

/* ==========
   CHAT WIDGET – CENTER MODAL
   ========== */

.chat-widget {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 5, 10, 0.65);
    backdrop-filter: blur(10px);
    padding: 16px;
}

.chat-widget.is-open {
    display: flex;
}

.chat-widget-inner {
    width: min(420px, 100%);
    max-height: min(620px, 100%);
    background: #f9f9fb;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Dark mode card */

body.dark-mode .chat-widget-inner {
    background: radial-gradient(circle at top, #222436, #10121a 60%);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Close button */

.chat-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: #777;
    padding: 4px 6px;
}

.chat-close-btn:hover {
    color: #000;
}

body.dark-mode .chat-close-btn {
    color: #ccc;
}

body.dark-mode .chat-close-btn:hover {
    color: #fff;
}

/* Header */

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode .chat-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.chat-avatar-bot {
    background: radial-gradient(circle at 30% 0, #ff3b3b, #931010);
    color: #fff;
    box-shadow: 0 10px 26px rgba(214, 0, 0, 0.55);
}

.chat-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: calc(100% - 60px);
}

.chat-title strong {
    font-size: 0.95rem;
}

.chat-title span {
    font-size: 0.8rem;
    color: #777;
}

body.dark-mode .chat-title span {
    color: #aaa;
}

/* Messages */

.chat-messages {
    flex: 1;
    padding: 10px 12px 8px;
    overflow-y: auto;
    background: #f0f1f6;
}

body.dark-mode .chat-messages {
    background: #12141f;
}

.chat-message {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    max-width: 90%;
}

.chat-message-bot {
    align-items: flex-start;
}

.chat-message-user {
    align-items: flex-end;
    margin-left: auto;
}

.chat-message-bubble {
    border-radius: 14px;
    padding: 8px 10px;
    font-size: 0.86rem;
    line-height: 1.4;
    background: #ffffff;
    color: #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.chat-message-bot .chat-message-bubble {
    background: #ffffff;
}

.chat-message-user .chat-message-bubble {
    background: linear-gradient(135deg, #ff5c5c, #c40000);
    color: #ffffff;
}

body.dark-mode .chat-message-bot .chat-message-bubble {
    background: #181b24;
    color: #f5f5f5;
}

body.dark-mode .chat-message-user .chat-message-bubble {
    background: linear-gradient(135deg, #ff5c5c, #c40000);
    color: #ffffff;
}

.chat-message-meta {
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

.chat-message-user .chat-message-meta {
    text-align: right;
}

body.dark-mode .chat-message-meta {
    color: #a4a8b3;
}

.chat-file-meta {
    margin-top: 4px;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Footer */

.chat-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f9f9fb;
}

body.dark-mode .chat-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: #10121a;
}

.chat-hint {
    font-size: 0.72rem;
    color: #7a7f8c;
}

.chat-hint a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 0, 0, 0.5);
}

.chat-hint a:hover {
    border-bottom-color: #000;
}

body.dark-mode .chat-hint a:hover {
    border-bottom-color: #fff;
}

.chat-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 6px;
    align-items: center;
}

/* File attach */

.chat-file-label {
    position: relative;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 999px;
    background: #e4e7f2;
    color: #333;
}

.chat-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

body.dark-mode .chat-file-label {
    background: #1b1f2c;
    color: #f5f5f5;
}

.chat-file-info {
    grid-column: 1 / 4;
    font-size: 0.74rem;
    color: #777;
    min-height: 14px;
}

body.dark-mode .chat-file-info {
    color: #a4a8b3;
}

/* Input + send */

.chat-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #c6cad6;
    font-size: 0.86rem;
    background: #ffffff;
    color: #111111;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

body.dark-mode .chat-input {
    background: #05060a;
    border-color: #272b36;
    color: #f5f5f5;
}

.chat-send-btn {
    border-radius: 999px;
    border: none;
    padding: 8px 12px;
    font-size: 0.95rem;
    cursor: pointer;
    background: linear-gradient(135deg, #ff3b3b, #b01010);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(214, 0, 0, 0.45);
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(214, 0, 0, 0.6);
}

/* Mobile – full screen */

@media (max-width: 600px) {
    .chat-widget-inner {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .chat-messages {
        padding-bottom: 12px;
    }
}
