/* ============================================================================
   VIDEO CALL UI - Jitsi Meet Integration
   Senior-optimized video calling interface
   ============================================================================ */

/* Video Call Overlay */
.video-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-call-overlay.active {
    display: flex;
}

/* Top bar */
.video-call-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding-top: env(safe-area-inset-top, 0);
}

.video-call-topbar .call-info {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-call-topbar .call-timer {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.video-call-topbar .call-close-btn {
    background: rgba(255, 75, 75, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-call-topbar .call-close-btn:hover {
    background: rgba(255, 75, 75, 1);
}

/* Jitsi iframe container */
.video-call-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.video-call-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================================
   VIDEO CALL START SCREEN (before connecting)
   ============================================================================ */
.video-call-start {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f0f5f5 100%);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-top: 10vh;
    gap: 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.video-call-start.active {
    display: flex;
}

.video-call-start h2 {
    color: white;
    font-size: 2rem;
    text-align: center;
}

.video-call-start p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    text-align: center;
    max-width: 400px;
}

/* Room input */
.video-call-room-input {
    width: 100%;
    max-width: 400px;
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid rgba(91, 168, 160, 0.15);
    border-radius: 16px;
    background: rgba(91, 168, 160, 0.08);
    color: white;
    text-align: center;
    transition: border-color 0.2s;
}

.video-call-room-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.video-call-room-input:focus {
    outline: none;
    border-color: #4facfe;
}

/* Call buttons */
.video-call-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.video-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.2rem 2rem;
    font-size: 1.3rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 64px;
}

.video-call-btn:active {
    transform: scale(0.97);
}

.video-call-btn-primary {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

.video-call-btn-primary:hover {
    box-shadow: 0 12px 32px rgba(79, 172, 254, 0.6);
    transform: translateY(-2px);
}

.video-call-btn-secondary {
    background: rgba(91, 168, 160, 0.08);
    color: white;
    border: 1px solid rgba(91, 168, 160, 0.15);
}

.video-call-btn-secondary:hover {
    background: rgba(91, 168, 160, 0.12);
}

.video-call-btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.video-call-btn-back {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.8rem;
}

.video-call-btn-back:hover {
    color: white;
}

/* Quick contacts */
.video-call-contacts {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-call-contacts h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.video-call-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(91, 168, 160, 0.06);
    border: 1px solid rgba(91, 168, 160, 0.08);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 56px;
}

.video-call-contact:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(79, 172, 254, 0.3);
}

.video-call-contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--radim-teal), var(--radim-teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.video-call-contact-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.video-call-contact-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Room code display */
.video-call-room-code {
    background: rgba(79, 172, 254, 0.15);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #4facfe;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-align: center;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s;
}

.video-call-room-code:hover {
    background: rgba(79, 172, 254, 0.25);
}

.video-call-room-code-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-family: sans-serif;
    font-weight: 400;
}

/* ============================================================================
   RESPONSIVE - Mobile
   ============================================================================ */
@media (max-width: 768px) {
    /* Leave room for bottom navigation bar (72px) */
    .video-call-start {
        height: calc(100% - 72px) !important;
        bottom: 72px !important;
        top: 0 !important;
        padding: 1rem;
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
        padding-bottom: 1rem !important;
        gap: 1.5rem;
    }

    .video-call-start h2 {
        font-size: 1.6rem;
    }

    .video-call-btn {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        min-height: 56px;
    }

    .video-call-room-input {
        font-size: 1.1rem;
        padding: 1rem 1.2rem;
    }

    .video-call-topbar {
        padding-top: env(safe-area-inset-top, 0);
    }

    .video-call-overlay {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

@media (max-width: 375px) {
    .video-call-start h2 {
        font-size: 1.3rem;
    }

    .video-call-btn {
        font-size: 1rem;
        min-height: 52px;
    }
}
