/* Agenda Display Styles */
:root {
    --primary-color: #A02326;
    --primary-dark: #7a1a1d;
    --primary-light: #c72c2f;
    --text-dark: #000;
    --text-light: #333;
    --border1-color: #ddd;
    --bg-light: #f9f9f9;
}

.agenda-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.agenda-header {
    margin-bottom: 30px;
}

.agenda-header h2 {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Controls */
.agenda-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.agenda-search {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid var(--border1-color);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
	height: 49px;
}

.agenda-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(160, 35, 38, 0.1);
}

.faculty-filter {
    padding: 12px 16px;
    border: 2px solid var(--border1-color);
    border-radius: 6px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
	height: 49px;
}

.faculty-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-expand-all,
.btn-collapse-all {
    padding: 12px 20px;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-expand-all:hover,
.btn-collapse-all:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Loading */
.agenda-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Date Group */
.date-group {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.date-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white !important;
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    user-select: none;
}

.date-header:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.date-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    color: white !important;
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
    font-weight: bold;
    color: white !important;
}

.session-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: white !important;
}

/* Date Content Container */
.date-content {
    background-color: #fafafa;
}

/* Venue Section */
.venue-section {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.venue-section:last-child {
    border-bottom: none;
}

.venue-header {
    background-color: white;
    padding: 14px 24px;
    border-bottom: 2px solid var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    user-select: none;
}

.venue-header:hover {
    background-color: #fafafa;
}

.venue-toggle-icon {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.venue-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.venue-session-count {
    background-color: rgba(160, 35, 38, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.expand-message {
    color: var(--text-light);
    font-size: 12px;
    font-style: italic;
    margin-left: auto;
    opacity: 0.8;
}

.venue-table-container {
    overflow-x: auto;
}

/* Table */
.date-content {
    overflow-x: auto;
}

.agenda-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: white;
}

.agenda-table thead {
    background-color: var(--bg-light);
}

.agenda-table th {
    padding: 14px 24px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.agenda-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease;
}

.agenda-table tbody tr.session-row {
	background-color: #ffcfcf;
    font-weight: bold !important;
}

.agenda-table tbody tr:hover {
    background-color: rgba(160, 35, 38, 0.03);
}

.agenda-table tbody tr.session-row:hover {
    background-color: #ffeef0;
}

.agenda-table tbody tr:last-child {
    border-bottom: none;
}

.agenda-table td {
    padding: 16px 24px;
    color: var(--text-light);
    vertical-align: top;
}

.agenda-table td strong {
    color: var(--text-dark);
}

/* Column widths for new structure */
.date-column {
    width: 20%;
    white-space: nowrap;
    font-weight: 500;
    color: var(--primary-color);
}

.session-column {
    width: 30%;
    font-weight: 600;
}

.topic-column {
    width: 50%;
}

.chairperson-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.chairperson-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speaker-column {
    width: 35%;
    line-height: 1.6;
}

.topic-speaker-combined {
    width: 85%;
    line-height: 1.8;
}

.topic-speaker-combined strong {
    font-size: 15px;
    color: var(--text-dark);
}

.topic-speaker-combined .chairperson-label {
    background-color: #A02326;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 5px;
}

.topic-speaker-combined .speakers-info {
    color: var(--text-light);
    font-size: 14px;
    display: inline;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .agenda-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agenda-search,
    .faculty-filter {
        width: 100%;
    }
    
    .btn-expand-all,
    .btn-collapse-all {
        width: 100%;
    }
    
    .venue-header h4 {
        font-size: 15px;
    }
}

@media screen and (max-width: 768px) {
    .agenda-header h2 {
        font-size: 24px;
    }
    
    .date-header {
        padding: 14px 16px;
    }
    
    .date-header h3 {
        font-size: 16px;
    }
    
    .venue-header {
        padding: 10px 16px;
    }
    
    .venue-header h4 {
        font-size: 14px;
    }
    
    /* Mobile: Convert table to stacked card layout */
    .agenda-table,
    .agenda-table thead,
    .agenda-table tbody,
    .agenda-table tr,
    .agenda-table th,
    .agenda-table td {
        display: block;
    }
    
    .agenda-table thead {
        display: none;
    }
    
    .agenda-table tbody tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        background-color: white;
    }
    
    .agenda-table tbody tr.session-row {
        background-color: #fff8f8;
        border-left: 4px solid var(--primary-color);
    }
    
    .agenda-table td {
        padding: 8px 0;
        border: none;
        text-align: left;
    }
    
    .agenda-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        text-transform: uppercase;
    }
    
    .time-column:before {
        content: "Time";
    }
    
    .topic-column:before {
        content: "Topic";
    }
    
    .speaker-column:before {
        content: "Speakers";
    }
    
    .topic-speaker-combined:before {
        content: "Session Details";
    }
    
    .time-column,
    .topic-column,
    .speaker-column,
    .topic-speaker-combined {
        width: 100%;
        white-space: normal;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .speaker-column,
    .topic-speaker-combined {
        border-bottom: none;
    }
    
    .time-column {
        font-size: 13px;
        font-weight: 600;
        color: var(--primary-color);
    }
    
    .topic-column {
        font-size: 14px;
    }
    
    .speaker-column {
        font-size: 13px;
        line-height: 1.8;
    }
    
    .topic-speaker-combined {
        font-size: 14px;
        line-height: 1.8;
    }
    
    .topic-speaker-combined .speakers-info {
        margin-top: 8px;
        display: block;
    }
    }
    
    .topic-column {
        font-size: 13px;
        line-height: 1.8;
    }
    
    .chairperson-section {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .chairperson-label {
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .agenda-controls,
    .btn-expand-all,
    .btn-collapse-all {
        display: none;
    }
    
    .date-content {
        display: block !important;
    }
    
    .toggle-icon {
        display: none;
    }
    
    .date-group,
    .venue-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}