/* Live Session Page Styles */

/* Main Content */
.live-session-main {
    padding: 20px 16px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 140px);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/*
 * NOTE: Do not style global `.header` / `.header-content` here — those classes are
 * shared by Layout.jsx across the whole app. A pink gradient here previously
 * overrode every screen’s top bar. Header chrome lives in styles.css / role-app.css.
 */

/* Sessions Section */
.sessions-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Session Cards */
.session-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.session-card.active {
    border: 2px solid #e91e63;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.2);
}

.session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.coach-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coach-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e91e63;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.coach-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.coach-specialization {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.session-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

.status-dot.live {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-dot.upcoming {
    background-color: #ffc107;
}

.status-dot.scheduled {
    background-color: #6c757d;
}

.session-actions {
    display: flex;
    gap: 8px;
}

.join-btn, .remind-btn {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.join-btn:hover, .remind-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.join-btn.disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.remind-btn {
    background: #17a2b8;
}

.session-details {
    padding: 20px;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.info-item i {
    width: 16px;
    color: #e91e63;
}

.session-description {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #e91e63;
}

.session-description p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* Upcoming Section */
.upcoming-section {
    margin-bottom: 30px;
}

.upcoming-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* History Section */
.history-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-coach {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-coach img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.history-coach h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.history-coach span {
    font-size: 12px;
    color: #6c757d;
}

.history-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
}

.replay-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.3s ease;
}

.replay-btn:hover {
    background: #138496;
}

/* Video Call Modal */
.video-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.video-call-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 10001;
}

.call-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.call-info span {
    font-size: 12px;
    color: #ccc;
}

.call-controls {
    display: flex;
    gap: 12px;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.control-btn.end-call {
    background: #dc3545;
}

.control-btn.end-call:hover {
    background: #c82333;
}

.control-btn.muted {
    background: #e91e63;
}

.control-btn.video-off {
    background: #e91e63;
}

.video-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.remote-video {
    flex: 1;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.local-video {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 160px;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e91e63;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    gap: 8px;
}

.video-placeholder i {
    font-size: 24px;
}

.video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
}

.participants-count, .call-quality {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .live-session-main {
        padding: 16px 12px;
    }
    
    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .session-actions {
        width: 100%;
        justify-content: center;
    }
    
    .join-btn, .remind-btn {
        flex: 1;
        justify-content: center;
    }
    
    .session-info {
        flex-direction: column;
        gap: 6px;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .history-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .local-video {
        width: 100px;
        height: 133px;
        top: 16px;
        right: 16px;
    }
    
    .video-header {
        padding: 12px 16px;
    }
    
    .call-controls {
        gap: 8px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* iPhone specific adjustments */
@media (max-width: 375px) {
    .session-header {
        padding: 16px;
    }
    
    .session-details {
        padding: 16px;
    }
    
    .coach-avatar {
        width: 50px;
        height: 50px;
    }
    
    .join-btn, .remind-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Local Video Overlay */
.local-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.user-label {
    display: block;
    color: white;
}

/* Control Button States */
.control-btn.muted {
    background-color: #dc3545 !important;
    color: white !important;
}

.control-btn.video-off {
    background-color: #dc3545 !important;
    color: white !important;
}
