/* SEHA AI Assistant CSS */

:root {
    --seha-navy: #1A365D;
    --seha-gold: #D4AF37;
    --seha-ivory: #FAF9F6;
    --seha-pearl: #F5F5F0;
    --seha-charcoal: #333333;
    --assistant-shadow: 0 10px 40px rgba(26, 54, 93, 0.15);
}

.seha-ai-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--seha-navy);
    color: var(--seha-ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--assistant-shadow);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 2px solid var(--seha-gold);
}

.seha-ai-fab:hover {
    transform: scale(1.05);
    background-color: #2A4A7F;
}

.seha-gold-filter {
    filter: brightness(0) saturate(100%) invert(73%) sepia(34%) saturate(836%) hue-rotate(5deg) brightness(96%) contrast(85%);
}

.seha-ai-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 400px;
    max-height: 75vh;
    height: 650px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--assistant-shadow);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.seha-ai-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.seha-ai-header {
    background-color: var(--seha-navy);
    color: white;
    padding: 1.5rem;
    position: relative;
    border-bottom: 3px solid var(--seha-gold);
}

.seha-ai-header-top { display: flex; align-items: center; justify-content: space-between; }
.seha-ai-title-row { display: flex; align-items: center; gap: 10px; }
.seha-ai-title-row svg { width: 24px; height: 24px; color: var(--seha-gold); }
.seha-ai-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 0; font-weight: 600; }
.seha-ai-close { background: none; border: none; color: white; cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.seha-ai-close:hover { background-color: rgba(255,255,255,0.1); }
.seha-ai-close svg { width: 20px; height: 20px; }
.seha-ai-transparency { background-color: rgba(255,255,255,0.1); border-radius: 6px; padding: 0.75rem; margin-top: 1rem; font-size: 0.8rem; line-height: 1.4; color: #E2E8F0; }
.seha-ai-transparency strong { color: var(--seha-gold); }

.seha-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: var(--seha-pearl);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seha-ai-msg {
    max-width: 85%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

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

.seha-ai-msg.assistant {
    align-self: flex-start;
    background-color: #ffffff;
    color: var(--seha-charcoal);
    border: 1px solid rgba(0,0,0,0.05);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.seha-ai-msg.user {
    align-self: flex-end;
    background-color: var(--seha-navy);
    color: white;
    border-bottom-right-radius: 2px;
}

/* Rich Cards */
.seha-ai-rich-card {
    width: 90%;
    max-width: 90%;
}
.seha-ai-rich-card h3 { margin: 0 0 0.5rem 0; font-family: 'Playfair Display', serif; color: var(--seha-navy); font-size: 1.15rem; }
.seha-ai-rich-card p { margin: 0 0 0.5rem 0; font-size: 0.9rem; }
.seha-ai-rich-card p:last-of-type { margin-bottom: 1rem; }
.seha-ai-list { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.seha-ai-list li { display: flex; justify-content: space-between; border-bottom: 1px solid #f0f0f0; padding: 0.5rem 0; font-size: 0.85rem; }
.seha-ai-list li:last-child { border-bottom: none; }
.seha-ai-list li span:last-child { font-weight: 600; color: var(--seha-navy); }

.seha-ai-bullet-list { padding-left: 1.2rem; margin: 0 0 1rem 0; font-size: 0.9rem; }
.seha-ai-bullet-list li { margin-bottom: 0.25rem; }

.seha-ai-map-placeholder {
    background-color: #E2E8F0;
    color: #64748B;
    text-align: center;
    padding: 2rem 0;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.seha-ai-btn {
    display: inline-block;
    background-color: #E2E8F0;
    color: var(--seha-navy);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}
.seha-ai-btn:hover { background-color: #CBD5E1; }
.seha-ai-btn.primary { background-color: var(--seha-gold); color: var(--seha-navy); border: none; }
.seha-ai-btn.primary:hover { background-color: #E5C354; }

.seha-ai-service-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.seha-ai-service-item {
    display: flex;
    justify-content: space-between;
    background-color: #F8FAFC;
    padding: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--seha-navy);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #E2E8F0;
    transition: all 0.2s ease;
}
.seha-ai-service-item:hover { background-color: #F1F5F9; border-color: var(--seha-gold); }

.seha-ai-doctor-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.seha-ai-doctor-item { background: #F8FAFC; padding: 0.75rem; border-radius: 6px; border: 1px solid #E2E8F0; font-size: 0.85rem; }
.seha-ai-doctor-item strong { color: var(--seha-navy); display: block; margin-bottom: 0.25rem; font-size: 0.95rem; }

.seha-ai-contact-grid { display: flex; flex-direction: column; }

/* Metadata & Admin Review Panel */
.seha-ai-meta {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.7rem;
    color: #94A3B8;
}
.seha-ai-meta-confidence { font-weight: 600; color: #10B981; margin-bottom: 0.25rem; } /* Green for verified */
.seha-ai-meta-details { margin-bottom: 0.5rem; }
.seha-ai-admin-review-btn {
    background: none;
    border: 1px solid #CBD5E1;
    color: #64748B;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    cursor: pointer;
}
.seha-ai-admin-review-btn:hover { background-color: #F1F5F9; }

/* Warnings / Hand-offs */
.seha-ai-warning { border-left: 4px solid #EF4444; }
.seha-ai-handoff { border-left: 4px solid var(--seha-gold); }
.seha-ai-critical { border-left: 4px solid #EF4444; background-color: #FEF2F2 !important; color: #991B1B !important; }

/* Quick Actions */
.seha-ai-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.5rem; }
.seha-ai-quick-action { background-color: white; border: 1px solid var(--seha-gold); color: var(--seha-navy); padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; font-weight: 500; }
.seha-ai-quick-action:hover { background-color: var(--seha-gold); color: white; }

/* Loading Indicator */
.seha-ai-loading { display: none; align-self: flex-start; background-color: #ffffff; padding: 1rem; border-radius: 12px; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.seha-ai-loading.active { display: flex; gap: 4px; }
.seha-ai-dot { width: 6px; height: 6px; background-color: var(--seha-gold); border-radius: 50%; animation: sehaBlink 1.4s infinite both; }
.seha-ai-dot:nth-child(1) { animation-delay: -0.32s; }
.seha-ai-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes sehaBlink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

/* Input Area */
.seha-ai-input-area { background-color: #ffffff; border-top: 1px solid rgba(0,0,0,0.08); padding: 1rem; }
.seha-ai-privacy-notice { font-size: 0.75rem; color: #64748B; text-align: center; margin-bottom: 0.75rem; line-height: 1.4; }
.seha-ai-privacy-notice strong { color: #EF4444; }
.seha-ai-input-wrapper { display: flex; gap: 10px; position: relative; }
.seha-ai-input { flex: 1; border: 1px solid #CBD5E1; border-radius: 24px; padding: 0.75rem 1.2rem; font-size: 0.95rem; outline: none; transition: border-color 0.2s ease; }
.seha-ai-input:focus { border-color: var(--seha-navy); }
.seha-ai-send { background-color: var(--seha-gold); border: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--seha-navy); transition: transform 0.2s ease, background-color 0.2s ease; }
.seha-ai-send:hover { background-color: #E5C354; transform: scale(1.05); }
.seha-ai-send svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.seha-ai-send:disabled { background-color: #E2E8F0; color: #94A3B8; cursor: not-allowed; transform: none; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .seha-ai-window { bottom: 0; right: 0; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
    .seha-ai-fab { bottom: 1.5rem; right: 1.5rem; width: 56px; height: 56px; }
}
