/* ESPP Programme schedule styles */


.slot-tracks-stack { display: none; }
.modular-schedule { margin-top: 1rem; }
.modular-schedule .schedule-day { margin-bottom: 2rem; }
.modular-schedule .day-title { margin: 1.5rem 0 0.75rem; }

.modular-schedule .schedule-slot {
	display: grid;
	grid-template-columns: 6rem 1fr;
	gap: 0;
	margin-bottom: 1.2rem;
}

.modular-schedule .slot-rail {
	position: relative;
}

.modular-schedule .slot-rail::after {
	content: "";
	position: absolute;
	left: calc(3rem - 1px);
	top: 2.2rem;
	bottom: -1.2rem;
	width: 2px;
	background: rgba(0,0,0,0.15);
}

.modular-schedule .schedule-slot:last-child .slot-rail::after { display: none; }

.modular-schedule .slot-main {
	border-left: 2px solid rgba(0,0,0,0.15);
	padding-left: 1.5rem;
	margin-left: 0;
}

.modular-schedule .slot-time {
	width: 5.8rem;
	height: 2.2rem;
	text-align: center;
	font-size: 1.05rem;
	font-weight: 700;
	background: #f0f3f7;
	border: 1px solid rgba(0,0,0,0.08);
	padding: 0.25rem 0.4rem;
	border-radius: 999px;
	color: #223;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	margin-bottom: 0.8rem;
	margin-left: 0.1rem;
	box-sizing: border-box;
}
.modular-schedule .slot-main .slot-title { margin: 0 0 0.25rem; font-size: 1.1rem; font-weight: 700; }

.modular-schedule .slot-tracks {
	margin-top: 0.25rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1rem;
}

/* Grid that holds per-track cells for each time-slot; ensures row alignment across tracks */
	.modular-schedule .slot-tracks-grid {
    display: grid;
    gap: 1rem;
    grid-auto-flow: row;
    align-items: stretch; /* stretch items to the row height */
}

/* Make talk cells and their inner content fill the available row height */
.modular-schedule .talk-cell { height: 100%; }
.modular-schedule .talk-cell .talk-content { height: 100%; display: flex; flex-direction: column; }

.modular-schedule .slot-track {
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 6px;
	padding: 0.75rem;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.modular-schedule .track-header {
	border-bottom: 1px solid rgba(0,0,0,0.08);
	padding-bottom: 0.5rem;
	margin-bottom: 0.75rem;
}

.modular-schedule .track-name {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 600;
}

.modular-schedule .track-room {
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 0.25rem;
	font-weight: 500;
}

.modular-schedule .track-chair {
	font-size: 0.75rem; /* 12px, smaller than room-label which is 0.85rem */
	color: #666;
	margin-top: 0.25rem;
	font-style: italic;
}

.modular-schedule .track-talks {
	list-style: none;
	padding-left: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.modular-schedule .talk {
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid rgba(0,0,0,0.04);
	padding: 0.5rem 0;
	min-height: 3rem;
	justify-content: center;
}

.modular-schedule .talk:last-child {
	border-bottom: none;
}

.modular-schedule .talk-time {
	font-size: 0.85rem;
	color: #555;
	font-weight: 600;
    margin: 0 0 0.25rem 0; /* zero horizontal margins; keep small bottom spacing */
}

.modular-schedule .talk-title {
	font-size: 0.9rem;
	line-height: 1.3;
}

.modular-schedule .talk-actions {
	margin-top: 0.35rem;
	display: flex;
	justify-content: flex-start;
}

/* New layout for talk rows to support actions and responsive stacking */
.talk-grid { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: start; }
.talk-grid .talk-time { grid-column: 1 / -1; }
.talk-main { min-width: 0; }
.talk-actions { display: flex; align-items: center; }
.talk-actions .add-to-agenda { padding: 0.35rem 0.5rem; font-size: 0.95rem; }

/* Type-based slot title sizing */
.modular-schedule .schedule-slot.type-keynote .slot-title { font-size: 1.15rem; }
.modular-schedule .schedule-slot.type-plenary .slot-title { font-size: 1.02rem; }
.modular-schedule .schedule-slot.type-parallel_sessions .slot-title { font-size: 1.08rem; }

/* My Agenda bookmarking styles */
.add-to-agenda {
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
}

.add-to-agenda:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #444;
}

.add-to-agenda.selected,
.add-to-agenda.bookmarked {
    background: #ffd700;
    border-color: #ffcc00;
    color: #b8860b;
    font-weight: 600;
}

.add-to-agenda.selected:hover,
.add-to-agenda.bookmarked:hover {
    background: #ffcc00;
    border-color: #e6b800;
    color: #996600;
}

.add-to-agenda.selected i,
.add-to-agenda.bookmarked i {
    color: #b8860b;
}

/* Feedback message styles */
.agenda-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
}

/* Storage warning styles */
.storage-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 20px;
    text-align: center;
    z-index: 1001;
    font-size: 14px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .agenda-feedback {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .add-to-agenda {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    /* Mobile: stack talk info and action vertically for readability */
    .talk-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .talk-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0.35rem; }
    .talk-time { width: auto; }
}

/* Agenda controls styling */
.agenda-controls { 
    display: flex; 
    gap: 0.5rem; 
    margin-bottom: 0.75rem; 
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
.agenda-controls .btn { padding: 0.35rem 0.6rem; }
.agenda-controls .btn-primary { background:#007bff; color:#fff; border-color:#007bff; }

/* Hidden talks when showing only My Agenda */
/* When agenda filter is active, force mobile/stacked layout to avoid column alignment issues */
body.agenda-filter-active .slot-tracks-grid {
    display: none !important;
}

body.agenda-filter-active .slot-tracks-stack {
    display: block !important;
}

/* Hide filtered elements in the stacked view */
body.agenda-filter-active .slot-tracks-stack .hidden-by-agenda,
body.agenda-filter-active .schedule-slot.hidden-by-agenda {
    display: none !important;
}

/* Default hidden-by-agenda for other elements when not in agenda filter mode */
.hidden-by-agenda {
    display: none !important;
}

/* Visual indicator that agenda filter is active */
body.agenda-filter-active .agenda-controls::before {
    content: "📋 My Agenda View Active";
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.35rem 0.6rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    vertical-align: middle;
}

/* In My Agenda view, all visible stars should be yellow since all visible talks are bookmarked */
body.agenda-filter-active .add-to-agenda {
    background: #ffd700 !important;
    border-color: #ffcc00 !important;
    color: #b8860b !important;
    font-weight: 600 !important;
}

body.agenda-filter-active .add-to-agenda:hover {
    background: #ffcc00 !important;
    border-color: #e6b800 !important;
    color: #996600 !important;
}

body.agenda-filter-active .add-to-agenda i {
    color: #b8860b !important;
}

/* Track/bookmark button prominence */
.track-bookmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    color: #007bff; /* blue star color */
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.15s ease;
}
.track-bookmark:hover { background: rgba(0,123,255,0.06); }
.track-bookmark.selected {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.18);
}

/* Larger, clearer star icon for selected symposiums on small screens */
@media (max-width: 768px) {
    .track-bookmark { width: 40px; height: 40px; font-size: 1.2rem; }
}

.schedule-info {
  background: #f8f8f8; /* Very light gray; or use transparent for minimalism */
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0 1rem 0; /* Reduced top/bottom margins to hug content closer */
  font-size: 0.8rem;
  line-height: 1.4;
  border-left: 2px solid #007bff; /* Even thinner accent for subtlety */
  color: #555; /* Slightly grayed text for less contrast */
  opacity: 0.85; /* Subtle fade to make it less prominent */
}

.schedule-info h3 {
  font-size: 1rem; /* Shrink the heading to be less dominant (like an h4) */
  margin: 0 0 0.25rem 0;
  font-weight: 500; /* Less bold */
  color: #333; /* Softer color */
}

@media (max-width: 600px) {
  .schedule-info {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    margin: 0.2rem 0 0.8rem 0;
  }

  .schedule-info h3 {
    font-size: 0.9rem;
  }
}

/* Print Media Styles for Schedule */
@media print {
    @page {
        size: A4 landscape;
        margin: 0.5cm;
    }

    body {
        font-size: 12pt;
        line-height: 1.2;
        color: #000;
        background: #fff;
        width: 100%;
        max-width: none;
    }

    /* Hide header elements, logo, and navigation */
    header,
    .navbar,
    .logo,
    nav,
    .navigation,
    .quick-links,
    .sidebar,
    #footer,
    #header,
    .site-footer,
    .branding,
    .site-logo,
    .menu,
    .nav-links {
        display: none !important;
    }

    /* Hide any divs that might contain navigation or quick links */
    div[class*="nav"],
    div[class*="menu"],
    div[class*="link"] {
        display: none !important;
    }

    /* Hide interactive elements */
    .agenda-controls,
    .add-to-agenda,
    .track-bookmark,
    .room-map-btn,
    .epub-progress,
    .agenda-feedback,
    .tntsearch-field,
    .no-print,
    .storage-warning {
        display: none !important;
    }

    /* Layout adjustments for print */
    .modular-schedule {
        width: 100%;
        max-width: none;
        margin: 0;
        box-sizing: border-box;
    }

    .modular-schedule .schedule-slot {
        display: block; /* stack elements to avoid overlap */
        margin-bottom: 1rem;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
        break-before: avoid !important;
        break-after: avoid !important;
        align-items: start;
        align-content: start;
    }

    .modular-schedule .slot-time {
        display: inline-block;
        width: auto;
        font-size: 11pt;
        padding: 0.2rem 0.5rem;
        margin: 0 0 0.4rem 0; /* ensure its own line and no left margin */
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #ccc;
        border-radius: 999px;
    }

    .modular-schedule .slot-main {
        border-left: none; /* remove left rail in print */
        padding-left: 0;   /* no empty left margin */
    }

    .modular-schedule .slot-title {
        font-size: 12pt;
        font-weight: bold;
        margin-bottom: 0.3rem;
        color: #000;
    }

    /* Allow page breaks between all tracks for better layout */
    .modular-schedule .slot-tracks {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important; /* More compact grid, reduced from 120px */
        gap: 0.2rem !important;
        margin-top: 0.2rem;
        page-break-before: avoid;
        page-break-after: avoid;
        width: 100%;
        box-sizing: border-box;
    }
    /* Preserve per-session track column count for alignment; don't override grid-template-columns */
    .modular-schedule .slot-tracks-grid {
        display: grid !important;
        grid-auto-flow: row !important;
        grid-auto-rows: auto !important;
        align-items: stretch !important;
        gap: 0.2rem !important;
        margin-top: 0.2rem;
        page-break-before: avoid;
        page-break-after: avoid;
        width: 100%;
        box-sizing: border-box;
    }

    /* Normalize inner spacing so the top edges align cleanly across a row */
    .modular-schedule .talk-cell { page-break-inside: avoid; break-inside: avoid; }
    .modular-schedule .talk-cell .talk-content { height: 100%; display: flex; flex-direction: column; margin: 0; }
    .modular-schedule .talk-content > *:first-child { margin-top: 0; }
    .modular-schedule .talk-content > *:last-child { margin-bottom: 0; }
    /* .talk-title margin normalized above via child selectors to avoid duplication */

    .modular-schedule .slot-track {
        border: 1px solid #ccc !important;
        border-radius: 2px;
        padding: 0.2rem 0.3rem;
        background: #fff !important;
        page-break-inside: avoid;
        break-inside: avoid;
        overflow: visible;
        word-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        min-height: 1.5rem; /* Reduced minimum height */
        page-break-before: auto;
        page-break-after: auto;
    }

    .modular-schedule .track-name {
        font-size: 10pt;
        font-weight: bold;
        margin: 0.5rem 0 0.3rem 0;
        padding-top: 0.3rem;
        color: #000;
        display: block !important;
        visibility: visible !important;
        overflow: visible;
        word-wrap: break-word;
        white-space: normal;
        line-height: 1.2;
    }

    .modular-schedule .track-name a {
        color: #000 !important;
        text-decoration: none;
        word-wrap: break-word;
        white-space: normal;
    }

    

    .modular-schedule .track-room {
        font-size: 11pt;
        font-weight: bold;
        color: #000;
        margin-bottom: 0.3rem;
        line-height: 1.1;
        overflow: visible;
        white-space: normal;
    }

    .modular-schedule .track-header {
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.3rem;
        margin-bottom: 0.4rem;
    }

    .modular-schedule .track-talks {
        margin: 0;
        padding-left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .modular-schedule .talk {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #ddd;
        padding: 0.3rem 0;
        min-height: 2.5rem;
        justify-content: center;
        align-items: flex-start;
        page-break-inside: avoid;
    }

    .modular-schedule .talk:last-child {
        border-bottom: none;
    }

    .modular-schedule .talk-time {
        font-size: 8pt;
        color: #333;
        font-weight: bold;
        margin-bottom: 0.2rem;
        width: 100%;
    }

    .modular-schedule .talk-title {
        font-size: 8pt;
        color: #000;
        line-height: 1.1;
        width: 100%;
    }

    .modular-schedule .talk-title a {
        color: #000 !important;
        text-decoration: none;
    }

    /* Remove timeline rail for print */
    .modular-schedule .slot-rail::after { display: none; }
    .modular-schedule .slot-rail { display: contents; }

    .modular-schedule .day-title {
        font-size: 14pt;
        font-weight: bold;
        margin: 1rem 0 0.5rem;
        color: #000;
        page-break-after: avoid;
    }

    /* Ensure room labels are visible but not interactive */
    .room-label {
        font-size: 9pt;
        color: #333;
    }

    /* Chair information should be smaller than room labels */
    .modular-schedule .track-chair {
        font-size: 8pt; /* Smaller than room-label (9pt) */
        color: #333;
        margin-top: 0.2rem;
        font-style: italic;
        line-height: 1.1;
    }

    /* Ensure the main title doesn't trigger a page break */
    .conference-schedule h1 {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* Make each day start on a new page (except the first) */
    .modular-schedule .schedule-day {
        page-break-before: always !important;
        break-before: page !important;
    }

    /* But don't break before the first day */
    .modular-schedule .schedule-day:first-child {
        page-break-before: avoid !important;
        break-before: avoid !important;
    }

    /* Make each parallel session start on a new page */
    .modular-schedule .schedule-slot.type-parallel_sessions {
        page-break-before: always !important;
        break-before: page !important;
    }

    /* But don't break before the first parallel session of the entire schedule */
    .modular-schedule .schedule-slot.type-parallel_sessions:first-child {
        page-break-before: avoid !important;
        break-before: avoid !important;
    }
}

@media (max-width: 768px) {
    .modular-schedule .schedule-slot {
        grid-template-columns: 1fr;
    }

    .modular-schedule .slot-rail {
        display: contents;
    }

    .modular-schedule .slot-rail::after {
        display: none;
    }

    .modular-schedule .slot-main {
        border-left: none;
        padding-left: 0;
    }

    .modular-schedule .slot-time {
        width: auto;
        margin-bottom: 0.5rem;
    }

    /* On mobile, show stacked per-track list and hide aligned grid */
    .slot-tracks-grid { display: none !important; }
    .slot-tracks-stack { display: block; }

    .modular-schedule .slot-tracks,
    .modular-schedule .slot-tracks-grid,
    .slot-tracks-stack {
        grid-template-columns: 1fr !important; /* override inline style for mobile */
        gap: 0.9rem;
    }

    /* Improve mobile readability */
    .modular-schedule .track-name { font-size: 1.05rem; }
    .modular-schedule .track-room { font-size: 0.95rem; }
    .modular-schedule .talk-title { font-size: 1rem; line-height: 1.35; }
    .modular-schedule .talk-time { font-size: 0.9rem; }

    .modular-schedule .slot-track {
        padding: 0.6rem;
    }

    .modular-schedule .talk {
        min-height: 2.5rem;
        padding: 0.4rem 0;
    }
}

@media (max-width: 480px) {
    .modular-schedule .talk-grid {
        grid-template-columns: 1fr;
    }

    .modular-schedule .talk-time {
        display: inline-block; /* keep visible on small screens */
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .modular-schedule .talk-actions {
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}
.programme-footer {
  max-width: 800px; /* or use 800px to match Quark theme/ 60rem */
  margin: 2rem auto 0 auto;
  text-align: center;
  padding-bottom: 1.5rem;
  color: #666;
}
.programme-footer .footer-logo {
  max-width: 800px;
  margin-bottom: 0.5rem;
}
.programme-footer .footer-text {
  font-size: 1rem;
}

/* TNTSearch Custom Styling */
.tntsearch-form {
    margin-bottom: 1.5rem;
}

.tntsearch-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
}

.tntsearch-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tntsearch-results-count {
    margin: 1rem 0;
    font-style: italic;
    color: #6c757d;
}

.tntsearch-result {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.tntsearch-result:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tntsearch-title a {
    color: #667eea;
    text-decoration: none;
}

.tntsearch-title a:hover {
    text-decoration: underline;
}