/* /Components/Pages/Chat/ChatPage.razor.rz.scp.css */
.chat-container[b-cdh4nr6vhb] {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 260px);
    padding: 0 16px 16px 16px;
}
.chat-container.embed[b-cdh4nr6vhb] {
    height: 100vh;
    max-width: 100%;
    padding: 8px;
}

/* ── Messages area ── */
.messages-area[b-cdh4nr6vhb] {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Welcome ── */
.welcome-message[b-cdh4nr6vhb] {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}
.welcome-icon[b-cdh4nr6vhb] {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #F3F0FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
}
.welcome-message p[b-cdh4nr6vhb] {
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* ── Bubbles ── */
.bubble[b-cdh4nr6vhb] {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bubble.user[b-cdh4nr6vhb] {
    align-self: flex-end;
}
.bubble.assistant[b-cdh4nr6vhb] {
    align-self: flex-start;
}

.bubble-content[b-cdh4nr6vhb] {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.bubble.user .bubble-content[b-cdh4nr6vhb] {
    background: #8B5CF6;
    color: white;
    border-bottom-right-radius: 6px;
}
.bubble.assistant .bubble-content[b-cdh4nr6vhb] {
    background: white;
    color: #1A1A2E;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bubble-time[b-cdh4nr6vhb] {
    font-size: 11px;
    color: #9CA3AF;
    padding: 0 4px;
}
.bubble.user .bubble-time[b-cdh4nr6vhb] {
    text-align: right;
}

/* ── Typing indicator ── */
.bubble.typing .typing-dots[b-cdh4nr6vhb] {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
}
.typing-dots span[b-cdh4nr6vhb] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2)[b-cdh4nr6vhb] { animation-delay: 0.2s; }
.typing-dots span:nth-child(3)[b-cdh4nr6vhb] { animation-delay: 0.4s; }

@@keyframes typingBounce {
    0%[b-cdh4nr6vhb], 80%[b-cdh4nr6vhb], 100%[b-cdh4nr6vhb] { transform: scale(0.7); opacity: 0.4; }
    40%[b-cdh4nr6vhb] { transform: scale(1); opacity: 1; }
}

/* ── Input area ── */
.input-area[b-cdh4nr6vhb] {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-input[b-cdh4nr6vhb] {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    outline: none;
    background: white;
    transition: border-color 0.15s;
    min-height: 48px;
}
.chat-input:focus[b-cdh4nr6vhb] {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.chat-input:disabled[b-cdh4nr6vhb] {
    background: #F9FAFB;
    color: #9CA3AF;
}

.send-btn[b-cdh4nr6vhb] {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    background: #8B5CF6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.send-btn:hover:not(.disabled)[b-cdh4nr6vhb] {
    background: #7C3AED;
    transform: translateY(-1px);
}
.send-btn.disabled[b-cdh4nr6vhb] {
    background: #D4D4E0;
    cursor: not-allowed;
}
/* /Components/Pages/Telehealth/TelehealthPage.razor.rz.scp.css */
/* ═══ PAGE BASE ═══ */
.th-page[b-vpin06dqni] {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.th-dark[b-vpin06dqni] {
    background: #0A0F1A;
    /* Break out of .connect-main's max-width: 640px for full-screen video */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
    position: relative;
}

/* ═══ WAITING ROOM ═══ */
.th-waiting-content[b-vpin06dqni] {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.th-waiting-icon[b-vpin06dqni] {
    width: 80px; height: 80px;
    border-radius: 24px;
    background: linear-gradient(145deg, #F5F3FF, #EDE9FE);
    border: 1px solid #DDD6FE;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    color: #8B5CF6;
    animation: th-float 3s ease-in-out infinite;
}
@@keyframes th-float {
    0%[b-vpin06dqni], 100%[b-vpin06dqni] { transform: translateY(0); }
    50%[b-vpin06dqni] { transform: translateY(-6px); }
}
.th-waiting-title[b-vpin06dqni] {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    color: #1A1A2E;
    margin: 0 0 8px;
}
.th-waiting-subtitle[b-vpin06dqni] {
    font-size: 14px;
    color: #8888A4;
    margin: 0 0 24px;
    max-width: 340px;
}

/* Camera preview */
.th-self-preview[b-vpin06dqni] {
    width: 200px; height: 150px;
    border-radius: 14px;
    background: linear-gradient(145deg, #1E293B, #0F172A);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 2px solid #D4D4E0;
}
.th-self-preview video[b-vpin06dqni] {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.th-preview-placeholder[b-vpin06dqni] {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.th-preview-initials[b-vpin06dqni] {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A78BFA, #8B5CF6);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff;
    margin-bottom: 6px;
}
.th-preview-label[b-vpin06dqni] {
    font-size: 10px; color: rgba(255,255,255,0.5);
}

/* Device check */
.th-device-check[b-vpin06dqni] {
    width: 100%;
    display: flex; gap: 10px;
    margin-bottom: 24px;
}
.th-device-item[b-vpin06dqni] {
    flex: 1;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 12px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 1px 3px rgba(26,26,46,0.04);
}
.th-device-dot[b-vpin06dqni] {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
}
.th-device-dot.off[b-vpin06dqni] { background: #B0B0C4; }
.th-device-label[b-vpin06dqni] { font-size: 12px; color: #2D2D44; font-weight: 500; }
.th-device-status[b-vpin06dqni] { font-size: 10px; color: #8888A4; }

/* Appointment card */
.th-appt-card[b-vpin06dqni] {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 1px 2px rgba(26,26,46,0.04), 0 8px 24px rgba(26,26,46,0.06);
    margin-bottom: 24px;
    text-align: left;
}
.th-appt-row[b-vpin06dqni] {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0;
}
.th-appt-row + .th-appt-row[b-vpin06dqni] { border-top: 1px solid #EDEDF4; }
.th-appt-icon[b-vpin06dqni] {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.th-appt-label[b-vpin06dqni] { font-size: 11px; color: #8888A4; }
.th-appt-value[b-vpin06dqni] { font-size: 14px; font-weight: 600; color: #1A1A2E; }

/* Join button */
.th-join-btn[b-vpin06dqni] {
    width: 100%; max-width: 320px;
    padding: 14px 0;
    border-radius: 14px;
    border: none;
    background: linear-gradient(145deg, #7A8B6F, #4A5742);
    color: #fff;
    font-size: 15px; font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(74,87,66,0.3);
}
.th-join-btn:hover:not(:disabled)[b-vpin06dqni] { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,87,66,0.4); }
.th-join-btn.waiting[b-vpin06dqni], .th-join-btn:disabled[b-vpin06dqni] {
    background: #D4D4E0;
    color: #8888A4;
    cursor: default;
    box-shadow: none;
    transform: none;
}
.th-encrypt-note[b-vpin06dqni] {
    font-size: 11px;
    color: #8888A4;
    margin-top: 12px;
}

/* ═══ IN-CALL ═══ */
.th-call-status-bar[b-vpin06dqni] {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 8px;
    background: rgba(16,185,129,0.1);
    border-bottom: 1px solid rgba(16,185,129,0.15);
}
.th-status-dot[b-vpin06dqni] {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #10B981;
    animation: th-pulse 1.5s ease-in-out infinite;
}
@@keyframes th-pulse {
    0%[b-vpin06dqni], 100%[b-vpin06dqni] { opacity: 1; }
    50%[b-vpin06dqni] { opacity: 0.4; }
}
.th-status-text[b-vpin06dqni] { font-size: 12px; color: rgba(16,185,129,0.9); font-weight: 600; }
.th-call-timer[b-vpin06dqni] { font-size: 12px; color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; }

.th-call-video-area[b-vpin06dqni] {
    flex: 1;
    position: relative;
    background: linear-gradient(145deg, #141B2D, #0D1321);
}
.th-remote-video[b-vpin06dqni] {
    width: 100%; height: 100%;
    position: absolute; inset: 0;
}
.th-remote-video :deep(video)[b-vpin06dqni] {
    width: 100%; height: 100%; object-fit: cover;
}
.th-local-pip[b-vpin06dqni] {
    position: absolute; top: 12px; right: 12px;
    width: 180px; height: 101px; /* 16:9 */
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    background: linear-gradient(145deg, #1E293B, #0F172A);
    overflow: hidden; z-index: 10;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.th-local-pip :deep(video)[b-vpin06dqni] {
    width: 100%; height: 100%; object-fit: cover;
}

.th-call-controls[b-vpin06dqni] {
    height: 72px;
    background: rgba(10,15,26,0.95);
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 0 20px;
}
.th-cc-btn[b-vpin06dqni] {
    width: 48px; height: 48px;
    border-radius: 14px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    font-size: 20px;
}
.th-cc-btn:hover[b-vpin06dqni] { background: rgba(255,255,255,0.14); }
.th-cc-btn.muted[b-vpin06dqni] { background: rgba(239,68,68,0.2); color: #FCA5A5; }
.th-cc-btn.end[b-vpin06dqni] {
    width: 60px;
    background: #EF4444;
    color: #fff;
}
.th-cc-btn.end:hover[b-vpin06dqni] { background: #DC2626; }
.th-cc-btn.active[b-vpin06dqni] { background: rgba(139,92,246,0.3); color: #C4B5FD; }

/* Chat unread badge */
.th-chat-unread-badge[b-vpin06dqni] {
    position: absolute; top: -4px; right: -4px;
    min-width: 16px; height: 16px; border-radius: 8px;
    padding: 0 4px; background: #EF4444; color: #fff;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* ═══ PATIENT CHAT PANEL ═══ */
.th-patient-chat[b-vpin06dqni] {
    position: absolute; bottom: 80px; left: 12px; right: 12px;
    max-width: 400px; height: 320px;
    background: rgba(254,252,249,0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    overflow: hidden; z-index: 20;
}
.th-patient-chat-header[b-vpin06dqni] {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 13px; font-weight: 700; color: #1A1A2E;
}
.th-patient-chat-close[b-vpin06dqni] {
    width: 24px; height: 24px; border-radius: 6px;
    border: none; background: transparent; color: #8888A4;
    cursor: pointer; font-size: 14px;
}
.th-patient-chat-messages[b-vpin06dqni] {
    flex: 1; overflow-y: auto; padding: 10px;
    display: flex; flex-direction: column; gap: 6px;
}
.th-patient-chat-empty[b-vpin06dqni] {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: #8888A4; font-size: 12px;
}
.th-patient-chat-bubble[b-vpin06dqni] {
    max-width: 80%; padding: 8px 12px;
    border-radius: 14px; font-size: 13px; line-height: 1.5;
    word-break: break-word;
}
.th-patient-chat-bubble.mine[b-vpin06dqni] {
    align-self: flex-end;
    background: linear-gradient(145deg, #7A8B6F, #4A5742);
    color: #fff; border-bottom-right-radius: 4px;
}
.th-patient-chat-bubble.theirs[b-vpin06dqni] {
    align-self: flex-start;
    background: #EDEDF4; color: #1A1A2E;
    border-bottom-left-radius: 4px;
}
.th-patient-chat-sender[b-vpin06dqni] {
    font-size: 10px; font-weight: 600; color: #5A5A78; margin-bottom: 2px;
}
.th-patient-chat-time[b-vpin06dqni] {
    font-size: 10px; margin-top: 2px; text-align: right; opacity: 0.6;
}
.th-patient-chat-input-area[b-vpin06dqni] {
    display: flex; gap: 6px; padding: 8px 10px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.th-patient-chat-input[b-vpin06dqni] {
    flex: 1; height: 36px;
    background: #F7F7FB; border: 1px solid #D4D4E0;
    border-radius: 10px; padding: 0 12px;
    font-size: 13px; font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1A1A2E; outline: none;
}
.th-patient-chat-input:focus[b-vpin06dqni] { border-color: #8B5CF6; }
.th-patient-chat-send[b-vpin06dqni] {
    width: 36px; height: 36px; border-radius: 10px;
    border: none;
    background: linear-gradient(145deg, #7A8B6F, #4A5742);
    color: #fff; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.th-patient-chat-send:disabled[b-vpin06dqni] { background: #D4D4E0; cursor: not-allowed; }

/* ═══ CALL ENDED ═══ */
.th-ended-content[b-vpin06dqni] {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 32px 20px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto; width: 100%;
}
.th-ended-icon[b-vpin06dqni] {
    font-size: 48px;
    margin-bottom: 16px;
}
.th-ended-title[b-vpin06dqni] {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px; font-weight: 600;
    color: #1A1A2E;
    margin: 0 0 6px;
}
.th-ended-sub[b-vpin06dqni] {
    font-size: 14px; color: #8888A4;
    margin: 0 0 24px;
}
.th-ended-card[b-vpin06dqni] {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 20px; width: 100%;
    box-shadow: 0 1px 2px rgba(26,26,46,0.04), 0 8px 24px rgba(26,26,46,0.06);
    margin-bottom: 24px; text-align: left;
}
.th-ended-stat[b-vpin06dqni] {
    display: flex; justify-content: space-between;
    padding: 6px 0;
}
.th-ended-stat + .th-ended-stat[b-vpin06dqni] { border-top: 1px solid #EDEDF4; }
.th-ended-label[b-vpin06dqni] { font-size: 13px; color: #8888A4; }
.th-ended-value[b-vpin06dqni] { font-size: 13px; font-weight: 700; color: #1A1A2E; }

.th-ended-btn[b-vpin06dqni] {
    padding: 12px 32px;
    border-radius: 14px;
    border: 1px solid #D4D4E0;
    background: #fff;
    color: #2D2D44;
    font-size: 14px; font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
}
.th-ended-btn:hover[b-vpin06dqni] { background: #F7F7FB; border-color: #B0B0C4; }
