/* =============================================
   GSA Main Chat - Premium Light Theme
   TaxHub-inspired: deep navy blues, clean whites
   ============================================= */

/* --- Reset & Base --- */
#gemini-chat-container {
    font-family: 'David Libre', 'Frank Ruhl Libre', Georgia, serif !important;
    direction: rtl;
}

/* --- Scrollbar --- */
.gsa-chat-scrollbar::-webkit-scrollbar { width: 5px; }
.gsa-chat-scrollbar::-webkit-scrollbar-track { background: transparent; }
.gsa-chat-scrollbar::-webkit-scrollbar-thumb { background: #c7d2df; border-radius: 10px; }
.gsa-chat-scrollbar::-webkit-scrollbar-thumb:hover { background: #9badc2; }

/* --- Chat Container --- */
.gsa-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: min(780px, 85vh);
    max-width: 820px;
    margin: 0 auto 24px;
    background: #ffffff;
    border: 1px solid #dce3ed;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 36, 75, 0.08), 0 1px 3px rgba(15, 36, 75, 0.04);
    direction: rtl;
    font-family: 'David Libre', 'Frank Ruhl Libre', Georgia, serif;
}

/* --- Header --- */
.gsa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0f244b 0%, #1a3a6e 100%);
    border-bottom: none;
    flex-shrink: 0;
}

.gsa-chat-header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gsa-chat-header-title {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.gsa-chat-header-icon {
    opacity: 0.9;
}

/* --- Messages Area --- */
.gsa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fc;
}

/* --- Message Row --- */
.gsa-chat-msg-row {
    display: flex;
    width: 100%;
}

/* --- Avatar --- */
.gsa-chat-avatar {
    flex-shrink: 0;
    margin-top: 2px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f244b, #1a3a6e);
    border-radius: 50%;
    margin-left: 12px;
}

.gsa-chat-avatar svg {
    width: 16px;
    height: 16px;
}

/* --- Message Content --- */
.gsa-chat-msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    max-width: 88%;
}

/* --- Label --- */
.gsa-chat-msg-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #1a3a6e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* --- Message Bubble --- */
.gsa-chat-bubble {
    font-size: 14.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    text-align: right;
    unicode-bidi: plaintext;
}

.gsa-chat-bubble-user {
    background: #0f244b;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 18px 18px 4px 18px;
    align-self: flex-start;
    max-width: fit-content;
    font-size: 14px;
}

.gsa-chat-bubble-assistant {
    background: #ffffff;
    color: #1e293b;
    padding: 12px 16px;
    border-radius: 4px 18px 18px 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 36, 75, 0.04);
}

/* --- Links --- */
.gsa-chat-link {
    color: #1a3a6e;
    text-decoration: underline;
    text-decoration-color: rgba(26, 58, 110, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.gsa-chat-link:hover {
    color: #0f244b;
    text-decoration-color: #0f244b;
}

/* --- Lead Badge --- */
.gsa-chat-lead-badge {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

/* --- Model Info --- */
.gsa-chat-model-info {
    margin-top: 10px;
    font-size: 10px;
    color: #94a3b8;
    border-top: 1px solid #eef2f7;
    padding-top: 6px;
    width: fit-content;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gsa-chat-source-file { color: #059669; }
.gsa-chat-source-web { color: #1a3a6e; }

/* --- Loading --- */
.gsa-chat-loading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.gsa-chat-loading-dots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gsa-chat-loading-bar {
    height: 12px;
    width: 160px;
    background: #e2e8f0;
    border-radius: 8px;
    animation: gsa-shimmer 1.5s ease-in-out infinite;
}

.gsa-chat-loading-text {
    font-size: 11px;
    color: #1a3a6e;
    font-weight: 700;
}

@keyframes gsa-shimmer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Input Area --- */
.gsa-chat-input-area {
    padding: 8px 20px;
    background: #ffffff;
    border-top: 1px solid #eef2f7;
    flex-shrink: 0;
}

.gsa-chat-input-container {
    max-width: 720px;
    margin: 0 auto;
}

.gsa-chat-input-box {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
}

.gsa-chat-input-box:focus-within {
    border-color: #1a3a6e;
    background: #f8f9fc;
    box-shadow: 0 0 0 3px rgba(26, 58, 110, 0.08);
}

.gsa-chat-textarea {
    width: 100%;
    background: transparent !important;
    border: none !important;
    font-size: 14px;
    padding: 10px 16px;
    outline: none !important;
    box-shadow: none !important;
    resize: none;
    color: #1e293b !important;
    font-family: 'David Libre', 'Frank Ruhl Libre', Georgia, serif;
    line-height: 1.5;
}

.gsa-chat-textarea::placeholder {
    color: #94a3b8;
}

.gsa-chat-input-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2px 10px 6px;
}

.gsa-chat-send-btn {
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    outline: none !important;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gsa-chat-send-btn:not(:disabled):hover {
    color: #0f244b;
    background: rgba(15, 36, 75, 0.06);
}

.gsa-chat-send-btn:not(:disabled) {
    color: #1a3a6e;
}

.gsa-chat-send-btn:disabled {
    cursor: not-allowed;
    color: #cbd5e1;
}

/* --- Disclaimer --- */
.gsa-chat-disclaimer {
    text-align: center;
    margin-top: 8px;
    font-size: 10px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

/* --- Animations --- */
.gsa-chat-fade-in {
    animation: gsa-fade-in 0.3s ease-out;
}

@keyframes gsa-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .gsa-chat-wrapper {
        height: min(600px, 75vh);
        border-radius: 14px;
        margin: 0 auto 16px;
    }

    .gsa-chat-header {
        padding: 12px 16px;
    }

    .gsa-chat-header-title {
        font-size: 14px;
    }

    .gsa-chat-messages {
        padding: 14px 14px;
        gap: 12px;
    }

    .gsa-chat-bubble {
        font-size: 13.5px;
    }

    .gsa-chat-bubble-user {
        padding: 8px 14px;
        font-size: 13px;
    }

    .gsa-chat-bubble-assistant {
        padding: 10px 12px;
    }

    .gsa-chat-avatar {
        width: 26px;
        height: 26px;
        margin-left: 8px;
    }

    .gsa-chat-avatar svg {
        width: 14px;
        height: 14px;
    }

    .gsa-chat-input-area {
        padding: 10px 12px;
    }

    .gsa-chat-textarea {
        font-size: 13px;
        padding: 8px 12px;
    }
}


/* =============================================
   GSA Main Chat - Styles
   הופרד מ-gemini-search-ai.php
 

body { background-color: #131314; margin: 0; }
#gemini-chat-container { font-family: 'David Libre', serif !important; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #3c4043; border-radius: 10px; }
============================================= */