/* === Video Consultation Styles === */
.video-embed {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-embed--offline {
    background: var(--surface);
    border: 1px solid var(--line);
}

/* Placeholder State */
.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.video-placeholder__inner {
    max-width: 400px;
}

.video-placeholder__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
}

.video-placeholder__title {
    font-size: 24px;
    margin-bottom: 12px;
    font-family: var(--font-display);
}

.video-placeholder__text {
    color: var(--muted);
    margin-bottom: 32px;
}

.video-placeholder__timer {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 24px;
    font-feature-settings: "tnum";
}

/* Video Stage (Active) */
.video-stage {
    position: absolute;
    inset: 0;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.video-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2px;
    padding: 2px;
    position: relative;
}

.video-participant {
    position: relative;
    background: #2a2a2a;
    overflow: hidden;
    border-radius: 8px;
}

.video-participant video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-participant.local {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 180px;
    height: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.participant-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
}

/* Toolbar */
.video-toolbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.video-toolbar .btn-ghost {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
}

.video-toolbar .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-toolbar .btn-slash {
    background: #ef4444;
    color: #fff;
    position: relative;
}

.video-toolbar .btn-slash::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: rotate(45deg);
}

.video-expand {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    z-index: 50;
    display: grid;
    place-items: center;
}

.video-expand:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Dark Mode Overrides */
body[data-theme='dark'] .video-placeholder {
    background: var(--bg);
}

body[data-theme='dark'] .video-embed--offline {
    border-color: var(--line);
}
/* Overlay for Doctor */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-overlay[hidden] {
    display: none !important;
}

.video-overlay .video-container {
    width: 95%;
    height: 95%;
    max-width: 1280px;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
    position: relative;
}

.video-overlay .video-header {
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #222;
    color: #fff;
    border-bottom: 1px solid #333;
}
