/**
 * =============================================================================
 * Conference Agenda 2025 - Stylesheet
 * =============================================================================
 * 
 * Google Calendar-inspired conference agenda with time-based positioning
 * Color-coded tracks, responsive design, and interactive modals
 * 
 * Time Scale: 220px = 1 hour (3.667px per minute)
 * =============================================================================
 */

/* =============================================================================
   CSS Reset & Base Styles
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
}

.container {
    width: 100%;
    background: white;
    padding: 20px;
}

/* =============================================================================
   Page Header
   ============================================================================= */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

/* =============================================================================
   Day Selection Tabs (Day 1 / Day 2)
   ============================================================================= */
.day-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-button {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #f8f9fa;
    border-color: #3F72F6;
}

.tab-button.active {
    background: #3F72F6;
    color: white;
    border-color: #3F72F6;
}

/* =============================================================================
   Track Column Headers (Time, Track A, Track B, Track C)
   ============================================================================= */
.track-headers {
    display: grid;
    grid-template-columns: 150px repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 12px;
    position: sticky;
    top: 60px;
    background: white;
    z-index: 98;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.time-header {
    font-weight: 700;
    text-align: right;
    padding-right: 16px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.track-header {
    padding: 16px;
    font-weight: 700;
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

.track-a-header {
    background: #FE5455;
}

.track-b-header {
    background: #3F72F6;
}

.track-c-header {
    background: #7AD88A;
}

/* =============================================================================
   Main Calendar Grid (Google Calendar-style layout)
   4-column grid: Time column (150px) + 3 track columns (1fr each)
   ============================================================================= */
.agenda-grid {
    display: grid;
    grid-template-columns: 150px repeat(3, 1fr);
    gap: 0 16px;
    position: relative;
}

.time-column {
    display: flex;
    flex-direction: column;
}

.time-slot {
    text-align: right;
    padding-right: 16px;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    height: 220px;
    border-top: 1px solid #e8e8e8;
    padding-top: 8px;
    flex-shrink: 0;
}

.time-slot:first-child {
    border-top: none;
}

.track-column {
    position: relative;
    border-left: 1px solid #e0e0e0;
    min-height: 100%;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 219px,
        #e8e8e8 219px,
        #e8e8e8 220px
    );
}

/* =============================================================================
   Session Cards (Absolutely positioned based on start time)
   Height calculated from duration: 220px = 1 hour
   ============================================================================= */
.session-card {
    position: absolute;
    left: 8px;
    right: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.session-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.16);
    z-index: 10;
}

.session-card.track-a {
    background: #FE5455;
    color: white;
}

.session-card.track-b {
    background: #3F72F6;
    color: white;
}

.session-card.track-c {
    background: #7AD88A;
    color: white;
}

.session-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 0 0 auto;
}

.session-bottom {
    margin-top: auto;
    padding-top: 8px;
}

.session-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6px;
}

/* Compact style for short sessions */
.session-card[style*="height: 5"]:not([style*="height: 55"]),
.session-card[style*="height: 6"],
.session-card[style*="height: 7"],
.session-card[style*="height: 8"],
.session-card[style*="height: 9"] {
    padding: 6px 8px;
}

.session-card[style*="height: 5"]:not([style*="height: 55"]) .session-title,
.session-card[style*="height: 6"] .session-title,
.session-card[style*="height: 7"] .session-title,
.session-card[style*="height: 8"] .session-title,
.session-card[style*="height: 9"] .session-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
}

.session-card[style*="height: 5"]:not([style*="height: 55"]) .session-time,
.session-card[style*="height: 6"] .session-time,
.session-card[style*="height: 7"] .session-time,
.session-card[style*="height: 8"] .session-time,
.session-card[style*="height: 9"] .session-time {
    font-size: 0.7rem;
    margin-top: 4px;
}

.session-card[style*="height: 5"]:not([style*="height: 55"]) .session-bottom,
.session-card[style*="height: 6"] .session-bottom,
.session-card[style*="height: 7"] .session-bottom,
.session-card[style*="height: 8"] .session-bottom,
.session-card[style*="height: 9"] .session-bottom {
    padding-top: 4px;
}

.session-type {
    display: none;
}

.session-speakers {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.speaker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.avatar-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* =============================================================================
   Break Cards (Lunch, coffee breaks, etc.)
   ============================================================================= */
.break-card {
    position: absolute;
    left: 8px;
    right: 8px;
    background: #f5f5f5;
    color: #666;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px dashed #ccc;
}

/* =============================================================================
   Gala Cards (Special evening events)
   ============================================================================= */
.gala-card {
    position: absolute;
    left: 8px;
    right: 8px;
    background: #3F72F6;
    color: white;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(63, 114, 246, 0.4);
    border: 2px solid #2c5ae6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gala-card:hover {
    box-shadow: 0 6px 20px rgba(63, 114, 246, 0.6);
    transform: translateY(-2px);
}

.gala-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.gala-time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* =============================================================================
   Session Detail Modal (Popup with full session information)
   Uses !important to override Webflow/parent styles when embedded
   ============================================================================= */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto !important;
    padding: 20px 0 !important;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
}

.modal {
    background: white !important;
    border-radius: 0 !important;
    padding: 40px !important;
    max-width: 700px !important;
    width: 90% !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    overflow-y: auto !important;
    position: relative !important;
    margin: auto !important;
    transform: scale(0.9) !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

.modal-overlay.active .modal {
    transform: scale(1) !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal::-webkit-scrollbar {
    display: none !important;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-right: 40px;
}

.modal-time {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 0px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.modal-track {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 0px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    margin-left: 8px;
    font-size: 0.9rem;
}

.modal-track.track-a {
    background: #FE5455;
}

.modal-track.track-b {
    background: #3F72F6;
}

.modal-track.track-c {
    background: #7AD88A;
}

.modal-track.gala {
    background: #3F72F6;
}

.modal-moderator {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 0px;
}

.modal-moderator strong {
    color: #3F72F6;
}

.modal-description {
    margin-bottom: 24px;
    line-height: 1.6;
    color: #555;
}

.modal-speakers h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.speaker-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 0px;
    margin-bottom: 12px;
}

.speaker-item img {
    width: 80px;
    height: 80px;
    border-radius: 0;
    object-fit: cover;
}

.speaker-info {
    flex: 1;
}

.speaker-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.speaker-role {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* =============================================================================
   Responsive Design
   Breakpoints: 968px (tablet), 768px (mobile)
   ============================================================================= */
@media (max-width: 968px) {
    .container {
        padding: 12px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .day-tabs {
        padding: 10px 12px;
    }

    .track-headers {
        grid-template-columns: 80px repeat(3, 1fr);
        gap: 8px;
        top: 60px;
    }

    .time-header {
        font-size: 0.75rem;
        padding-right: 8px;
    }

    .track-header {
        padding: 10px 6px;
        font-size: 0.85rem;
    }

    .agenda-grid {
        grid-template-columns: 80px repeat(3, 1fr);
        gap: 8px;
    }

    .time-slot {
        font-size: 0.75rem;
        padding-right: 8px;
        height: 220px;
    }

    .session-card {
        padding: 10px;
    }

    .session-title {
        font-size: 0.85rem;
    }

    .session-time {
        font-size: 0.75rem;
    }

    .session-type {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .modal {
        padding: 24px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        margin-bottom: 12px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .day-tabs {
        justify-content: center;
        padding: 10px;
        gap: 8px;
    }

    .tab-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .track-headers {
        grid-template-columns: 60px repeat(3, 1fr);
        gap: 0 8px;
        top: 44px;
    }

    .time-header {
        font-size: 0.7rem;
        padding-right: 6px;
    }

    .track-header {
        padding: 10px 6px;
        font-size: 0.8rem;
    }

    .agenda-grid {
        grid-template-columns: 60px repeat(3, 1fr);
        gap: 0 8px;
    }

    .time-slot {
        font-size: 0.7rem;
        padding-right: 6px;
        height: 220px;
    }

    .track-column {
        border-left: 1px solid #e8e8e8;
    }

    .session-card {
        left: 4px;
        right: 4px;
        padding: 8px;
    }

    .session-title {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .session-time {
        font-size: 0.7rem;
    }

    .speaker-avatar {
        width: 24px;
        height: 24px;
    }

    .avatar-more {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .break-card {
        font-size: 0.6rem;
        padding: 8px;
        left: 4px;
        right: 4px;
    }

    .gala-card {
        font-size: 0.8rem;
        padding: 10px;
        left: 4px;
        right: 4px;
    }

    .gala-title {
        font-size: 0.9rem;
    }

    .gala-time {
        font-size: 0.75rem;
    }

    .modal {
        padding: 20px;
    }
}

