/* =====================================================
   ProPlus Consultation AI — light premium (white + site blue)
   Accent: #0087F3 / #0559D2
   ===================================================== */
#gcai-container {
    --gcai-bg: #ffffff;
    --gcai-surface: #ffffff;
    --gcai-surface-2: #f5f8fc;
    --gcai-border: #e4eaf1;
    --gcai-text: #152033;
    --gcai-muted: #6b7a90;
    --gcai-accent: var(--gcai-color, #0087f3);
    --gcai-accent-dark: #0559d2;
    --gcai-glow: rgba(0, 135, 243, 0.22);
    position: fixed;
    z-index: 999999;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: auto !important;
    color: var(--gcai-text);
}

#gcai-toggle,
#gcai-window,
#gcai-close,
#gcai-send,
#gcai-input,
#gcai-container .gcai-option-btn,
#gcai-container .gcai-welcome-choice {
    pointer-events: auto !important;
}

.gcai-position-top-left { top: 20px; left: 20px; }
.gcai-position-top-right { top: 20px; right: 20px; }
.gcai-position-bottom-left { bottom: 20px; left: 20px; }
.gcai-position-bottom-right { bottom: 20px; right: 20px; }

/* =====================================================
   TOGGLE
   ===================================================== */
#gcai-toggle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.25s ease;
    border: none;
    position: relative;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

#gcai-toggle:hover {
    transform: scale(1.06);
}

.gcai-launcher-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #0087F3, #7ec8ff, #0559D2, #0087F3 78%, #d7eeff);
    animation: gcai-spin 2.8s linear infinite;
    z-index: 0;
}

.gcai-launcher-orbit::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #fff;
}

.gcai-launcher-face {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--gcai-accent) 0%, var(--gcai-accent-dark) 100%);
    box-shadow: 0 8px 18px rgba(0, 135, 243, 0.28);
}

.gcai-launcher-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.gcai-launcher-face svg {
    width: 34px;
    height: 34px;
    display: block;
    overflow: visible;
}

.gcai-mark-spark,
.gcai-mark-core {
    transform-box: fill-box;
    transform-origin: center;
}

.gcai-mark-spark {
    animation: gcai-mark-pulse 2.4s ease-in-out infinite;
}

.gcai-mark-core {
    animation: gcai-mark-core 2.4s ease-in-out infinite;
}

.gcai-mark-arc {
    stroke-dasharray: 48;
    stroke-dashoffset: 0;
    animation: gcai-mark-draw 2.4s ease-in-out infinite;
}

@keyframes gcai-mark-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes gcai-mark-core {
    0%, 100% { transform: scale(0.7); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes gcai-mark-draw {
    0% { stroke-dashoffset: 48; opacity: 0.2; }
    45%, 70% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -48; opacity: 0.2; }
}

.gcai-launcher-live {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    z-index: 2;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: gcai-live 2s ease-out infinite;
}

#gcai-toggle::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0, 135, 243, 0.45);
    animation: gcai-launcher-ring 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes gcai-spin {
    to { transform: rotate(360deg); }
}

@keyframes gcai-launcher-ring {
    0% { transform: scale(0.92); opacity: 0.7; }
    75% { transform: scale(1.22); opacity: 0; }
    100% { transform: scale(1.22); opacity: 0; }
}

@keyframes gcai-live {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#gcai-container.gcai-open #gcai-toggle::before,
#gcai-container.gcai-open .gcai-launcher-orbit,
#gcai-container.gcai-open .gcai-launcher-live,
#gcai-container.gcai-open .gcai-mark-spark,
#gcai-container.gcai-open .gcai-mark-core,
#gcai-container.gcai-open .gcai-mark-arc {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    #gcai-toggle::before,
    .gcai-launcher-orbit,
    .gcai-launcher-live,
    .gcai-mark-spark,
    .gcai-mark-core,
    .gcai-mark-arc {
        animation: none;
    }
}

#gcai-toggle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#gcai-toggle .gcai-bubble-name {
    display: none !important;
}

#gcai-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* =====================================================
   CHAT WINDOW — white
   ===================================================== */
#gcai-container.gcai-open #gcai-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#gcai-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    z-index: 2;
    width: 400px;
    max-width: calc(100vw - 24px);
    height: 560px;
    max-height: 78vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(21, 32, 51, 0.16), 0 0 0 1px rgba(0, 135, 243, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gcai-border);
    animation: gcai-popup 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gcai-popup {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.gcai-position-top-left #gcai-window { top: 76px; bottom: auto; right: auto; left: 0; }
.gcai-position-top-right #gcai-window { top: 76px; bottom: auto; right: 0; left: auto; }
.gcai-position-bottom-left #gcai-window { bottom: 76px; top: auto; right: auto; left: 0; }
.gcai-position-bottom-right #gcai-window { bottom: 76px; top: auto; right: 0; left: auto; }

/* =====================================================
   HEADER — site blue
   ===================================================== */
#gcai-header {
    background: linear-gradient(135deg, var(--gcai-accent) 0%, var(--gcai-accent-dark) 100%);
    color: #fff;
    padding: 14px 16px 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
    flex-shrink: 0;
}

#gcai-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#gcai-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

#gcai-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#gcai-header-avatar svg {
    width: 20px;
    height: 20px;
    fill: white;
}

#gcai-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#gcai-header-name {
    font-weight: 650;
    font-size: 15px;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #fff;
}

#gcai-header-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    gap: 6px;
}

#gcai-header-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7dffb3;
    display: inline-block;
    box-shadow: 0 0 8px rgba(125, 255, 179, 0.7);
    animation: gcai-pulse 2s infinite;
}

@keyframes gcai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

#gcai-close {
    cursor: pointer;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.14);
    border: none;
}

#gcai-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.26);
}

/* =====================================================
   MESSAGES
   ===================================================== */
#gcai-messages {
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 12px;
    overflow-y: auto;
    background: #f7fafc;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

#gcai-messages::-webkit-scrollbar { width: 5px; }
#gcai-messages::-webkit-scrollbar-thumb {
    background: #c9d5e3;
    border-radius: 4px;
}
#gcai-messages::-webkit-scrollbar-track { background: transparent; }

.gcai-message-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    animation: gcai-fadeIn 0.28s ease;
}

@keyframes gcai-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.gcai-user-row { justify-content: flex-end; }
.gcai-bot-row { justify-content: flex-start; }

.gcai-message {
    max-width: 82%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
}

.gcai-user {
    background: linear-gradient(145deg, var(--gcai-accent) 0%, var(--gcai-accent-dark) 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 135, 243, 0.2);
}

.gcai-bot {
    background: #ffffff;
    color: var(--gcai-text);
    border: 1px solid var(--gcai-border);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(21, 32, 51, 0.04);
}

.gcai-bubble-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.gcai-msg-time {
    font-size: 9px;
    color: var(--gcai-muted);
    margin-top: 4px;
    text-align: right;
    opacity: 0.85;
}

.gcai-user .gcai-msg-time {
    color: rgba(255, 255, 255, 0.7);
}

.gcai-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(21, 32, 51, 0.08);
    margin-top: 2px;
    object-fit: cover;
}

.gcai-user-row .gcai-msg-avatar { display: none; }

/* =====================================================
   OPTION CHIPS
   ===================================================== */
.gcai-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 4px 0 8px 36px;
}

.gcai-options-row.gcai-options-stale .gcai-option-btn {
    opacity: 0.7;
}

.gcai-option-btn {
    background: #ffffff;
    border: 1px solid var(--gcai-border);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gcai-text);
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(21, 32, 51, 0.04);
}

.gcai-option-btn:hover {
    background: var(--gcai-accent);
    color: #fff;
    border-color: var(--gcai-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 135, 243, 0.22);
}

.gcai-option-btn:active {
    transform: scale(0.97);
}

.gcai-options-container {
    margin: 6px 0 2px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gcai-option-group-title {
    font-size: 13px;
    color: var(--gcai-muted);
    margin-bottom: 4px;
    font-weight: 600;
    text-align: center;
}

.gcai-option-primary,
.gcai-option-secondary {
    width: 100%;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.gcai-option-primary {
    background: linear-gradient(145deg, var(--gcai-accent), var(--gcai-accent-dark));
    color: white;
    border-color: transparent;
}

.gcai-option-primary:hover {
    background: linear-gradient(145deg, #1a96ff, var(--gcai-accent-dark)) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 6px 20px rgba(0, 135, 243, 0.28) !important;
}

.gcai-option-secondary {
    background: #fff;
    border-color: var(--gcai-border);
    color: var(--gcai-text);
}

.gcai-option-secondary:hover {
    background: #eef6ff !important;
    border-color: rgba(0, 135, 243, 0.4) !important;
    color: var(--gcai-text) !important;
}

/* =====================================================
   WELCOME POPUP — centered modal (User / Guest)
   ===================================================== */
#gcai-welcome-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 55% at 50% -8%, rgba(0, 135, 243, 0.18), transparent 58%),
        linear-gradient(180deg, #e7f3ff 0%, #f3f8ff 46%, #f7fbff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 22px 28px;
    z-index: 50;
    animation: gcai-fadeIn 0.28s ease;
}

.gcai-welcome-stack {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: gcai-welcome-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes gcai-welcome-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#gcai-welcome-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 135, 243, 0.18);
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 135, 243, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    z-index: 3;
    animation: none;
    transform: none;
}

#gcai-welcome-close:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(0, 135, 243, 0.18);
    color: var(--gcai-accent);
}

#gcai-welcome-modal {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 8px 4px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

#gcai-welcome-modal::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    width: 160px;
    height: 160px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 135, 243, 0.14), transparent 70%);
    pointer-events: none;
    animation: gcai-glow 3.2s ease-in-out infinite;
}

@keyframes gcai-glow {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.gcai-welcome-brand {
    text-align: center;
    padding: 0 6px;
    position: relative;
    z-index: 1;
}

.gcai-welcome-avatar-wrap {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
}

.gcai-welcome-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(0, 135, 243, 0.35);
    animation: gcai-ring 2.4s ease-out infinite;
}

@keyframes gcai-ring {
    0% { transform: scale(0.92); opacity: 0.8; }
    70% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.12); opacity: 0; }
}

.gcai-welcome-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 12px 28px rgba(0, 135, 243, 0.28);
    position: relative;
    z-index: 1;
    animation: gcai-avatar-float 3.6s ease-in-out infinite;
}

@keyframes gcai-avatar-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.gcai-welcome-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gcai-text);
    letter-spacing: -0.02em;
    animation: gcai-line-in 0.5s 0.12s both cubic-bezier(0.22, 1, 0.36, 1);
}

.gcai-welcome-sub {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--gcai-muted);
    animation: gcai-line-in 0.5s 0.2s both cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes gcai-line-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.gcai-welcome-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.gcai-welcome-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 13px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    border: 1.5px solid var(--gcai-border);
    background: #ffffff;
    color: var(--gcai-text);
    animation: gcai-line-in 0.5s both cubic-bezier(0.22, 1, 0.36, 1);
}

.gcai-welcome-choice:nth-child(1) { animation-delay: 0.28s; }
.gcai-welcome-choice:nth-child(2) { animation-delay: 0.4s; }

.gcai-welcome-choice:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 135, 243, 0.45);
    background: #f3f9ff;
    box-shadow: 0 10px 22px rgba(0, 135, 243, 0.14);
}

.gcai-welcome-choice:hover .gcai-welcome-choice-arrow {
    transform: translateX(4px);
    color: var(--gcai-accent);
}

.gcai-welcome-choice:active {
    transform: translateY(0) scale(0.98);
}

.gcai-welcome-choice:focus {
    outline: none;
    border-color: var(--gcai-accent);
    box-shadow: 0 0 0 3px rgba(0, 135, 243, 0.16);
}

.gcai-welcome-choice.is-secondary {
    box-shadow: 0 8px 20px rgba(21, 32, 51, 0.06);
}

.gcai-welcome-choice.is-primary {
    background: linear-gradient(135deg, #1a96f6 0%, #0559D2 100%);
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(0, 135, 243, 0.32);
    color: #fff;
}

.gcai-welcome-choice.is-primary:hover {
    background: linear-gradient(135deg, #2aa0f8 0%, #0450c0 100%);
    border-color: transparent;
    box-shadow: 0 16px 30px rgba(0, 135, 243, 0.38);
}

.gcai-welcome-choice.is-primary .gcai-welcome-choice-text strong,
.gcai-welcome-choice.is-primary .gcai-welcome-choice-arrow {
    color: #fff;
}

.gcai-welcome-choice.is-primary .gcai-welcome-choice-text span {
    color: rgba(255, 255, 255, 0.82);
}

.gcai-welcome-choice.is-primary .gcai-welcome-choice-icon {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.gcai-welcome-choice-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0, 135, 243, 0.1);
    border: 1px solid rgba(0, 135, 243, 0.18);
    color: var(--gcai-accent);
}

.gcai-welcome-choice-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.gcai-welcome-choice.is-secondary .gcai-welcome-choice-icon {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

.gcai-welcome-choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gcai-welcome-choice-text strong {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--gcai-text);
}

.gcai-welcome-choice-text span {
    font-size: 11.5px;
    color: var(--gcai-muted);
    line-height: 1.35;
}

.gcai-welcome-choice-arrow {
    margin-left: auto;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.22s ease, color 0.22s ease;
}

/* =====================================================
   LOGIN / EMAIL FORM
   ===================================================== */
.gcai-input-group {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
    align-items: center;
}

.gcai-login-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 12px;
}

.gcai-login-box .gcai-input-field {
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
}

.gcai-login-error {
    margin: 0;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
}

.gcai-login-box .gcai-input-submit {
    align-self: flex-start;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(145deg, var(--gcai-accent), var(--gcai-accent-dark));
    color: #fff;
    font-weight: 650;
    cursor: pointer;
}

.gcai-login-box .gcai-input-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.gcai-input-field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gcai-border);
    border-radius: 12px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    background: #fff;
    color: var(--gcai-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gcai-input-field::placeholder {
    color: var(--gcai-muted);
}

.gcai-input-field:focus {
    border-color: var(--gcai-accent);
    box-shadow: 0 0 0 3px rgba(0, 135, 243, 0.14);
}

.gcai-input-submit {
    padding: 10px 16px;
    background: linear-gradient(145deg, var(--gcai-accent), var(--gcai-accent-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
    font-weight: 600;
}

.gcai-input-submit:hover {
    box-shadow: 0 4px 14px rgba(0, 135, 243, 0.3);
    transform: translateY(-1px);
}

/* =====================================================
   TYPING
   ===================================================== */
.gcai-loading {
    background: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    border: 1px solid var(--gcai-border) !important;
    display: flex !important;
    gap: 5px !important;
    align-items: center !important;
}

.gcai-dot {
    width: 7px;
    height: 7px;
    background: var(--gcai-accent);
    border-radius: 50%;
    display: inline-block;
    animation: gcai-bounce 1.4s infinite ease-in-out both;
}

.gcai-dot:nth-child(1) { animation-delay: -0.32s; }
.gcai-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes gcai-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40% { transform: scale(1); opacity: 1; }
}

/* =====================================================
   INPUT AREA
   ===================================================== */
#gcai-input-area {
    padding: 12px 14px;
    border-top: 1px solid var(--gcai-border);
    display: flex;
    gap: 8px;
    background: #ffffff;
    flex-shrink: 0;
    align-items: center;
}

#gcai-input {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--gcai-border);
    border-radius: 999px;
    outline: none;
    font-size: 13.5px;
    font-family: inherit;
    transition: all 0.2s;
    background: #f5f8fc;
    color: var(--gcai-text);
}

#gcai-input::placeholder {
    color: var(--gcai-muted);
}

#gcai-input:focus {
    border-color: rgba(0, 135, 243, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 135, 243, 0.12);
}

#gcai-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#gcai-send {
    background: linear-gradient(145deg, var(--gcai-accent), var(--gcai-accent-dark));
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 135, 243, 0.28);
}

#gcai-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 135, 243, 0.38);
}

#gcai-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#gcai-send svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.gcai-system-message {
    text-align: center;
    color: var(--gcai-muted);
    font-size: 11px;
    padding: 6px 0;
}

.gcai-restart-box {
    text-align: center;
    padding: 10px 0;
}

#gcai-restart-link {
    color: var(--gcai-accent);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.chat-plan-link-row .gcai-option-btn,
.gcai-plan-link-btn {
    background: linear-gradient(145deg, var(--gcai-accent), var(--gcai-accent-dark)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* =====================================================
   MOBILE — floating panel above the launcher
   ===================================================== */
@media (max-width: 768px) {
    #gcai-container.gcai-open #gcai-toggle {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .gcai-position-bottom-right {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
    }
    .gcai-position-bottom-left {
        left: max(14px, env(safe-area-inset-left));
        bottom: max(14px, env(safe-area-inset-bottom));
    }
    .gcai-position-top-right {
        right: max(14px, env(safe-area-inset-right));
        top: max(14px, env(safe-area-inset-top));
    }
    .gcai-position-top-left {
        left: max(14px, env(safe-area-inset-left));
        top: max(14px, env(safe-area-inset-top));
    }

    #gcai-container #gcai-window,
    .gcai-position-bottom-right #gcai-window,
    .gcai-position-bottom-left #gcai-window,
    .gcai-position-top-right #gcai-window,
    .gcai-position-top-left #gcai-window {
        position: fixed !important;
        width: min(400px, calc(100vw - 20px)) !important;
        max-width: calc(100vw - 20px) !important;
        height: min(640px, calc(100dvh - 108px - env(safe-area-inset-top) - env(safe-area-inset-bottom))) !important;
        max-height: calc(100dvh - 108px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        border-radius: 18px !important;
        z-index: 999999 !important;
    }

    .gcai-position-bottom-right #gcai-window,
    .gcai-position-top-right #gcai-window {
        right: max(10px, env(safe-area-inset-right)) !important;
        left: auto !important;
    }

    .gcai-position-bottom-left #gcai-window,
    .gcai-position-top-left #gcai-window {
        left: max(10px, env(safe-area-inset-left)) !important;
        right: auto !important;
    }

    .gcai-position-bottom-right #gcai-window,
    .gcai-position-bottom-left #gcai-window {
        top: auto !important;
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    }

    .gcai-position-top-right #gcai-window,
    .gcai-position-top-left #gcai-window {
        bottom: auto !important;
        top: calc(82px + env(safe-area-inset-top)) !important;
    }

    #gcai-header {
        padding: 12px 14px 12px 16px;
    }

    #gcai-close {
        width: 40px;
        height: 40px;
    }

    #gcai-messages {
        padding: 12px;
    }

    .gcai-message {
        max-width: 90%;
        font-size: 14px;
        padding: 10px 12px;
    }

    .gcai-options-row {
        margin-left: 0;
        gap: 8px;
    }

    .gcai-option-btn {
        white-space: normal;
        text-align: left;
        font-size: 13px;
        line-height: 1.35;
        padding: 10px 14px;
        min-height: 40px;
    }

    #gcai-input-area {
        padding: 10px 12px;
    }

    #gcai-input {
        font-size: 16px;
        padding: 12px 14px;
    }

    #gcai-send {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    #gcai-toggle {
        width: 60px;
        height: 60px;
    }

    .gcai-launcher-face {
        width: 48px;
        height: 48px;
    }

    #gcai-welcome-overlay {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 52px 16px 18px;
    }

    .gcai-welcome-stack {
        max-width: 100%;
    }

    .gcai-welcome-choice {
        min-height: 58px;
        padding: 12px;
    }

    #gcai-welcome-close {
        top: 12px;
        right: 12px;
    }
}
