/* Timetable Page - Leica Experience Days */

/* ===================== Page Layout ===================== */
.experience-days-offcanvas-open {
    overflow: hidden;
}

.timetable-page {
    padding: 40px 0 80px;
}

.timetable-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.timetable-header {
    margin-bottom: 32px;
}

.timetable-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
}

.timetable-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* ===================== Controls ===================== */
.timetable-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.timetable-days {
    display: flex;
    gap: 8px;
}

.btn-day {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-day:hover {
    background: #f3f4f6;
}

.btn-day.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.timetable-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Filter Dropdown */
.timetable-dropdown {
    position: relative;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-filter:hover {
    background: #f3f4f6;
}

.btn-filter::after {
    display: inline-block;
    margin-left: 4px;
    content: "";
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.timetable-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 200px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.timetable-dropdown-menu.show {
    display: block;
}

.timetable-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.timetable-dropdown-item:hover {
    background: #f3f4f6;
}

.timetable-dropdown-item input[type="checkbox"] {
    accent-color: #111;
}

/* Merkliste Button */
.btn-merkliste {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.btn-merkliste:hover {
    background: #f3f4f6;
}

.merkliste-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    background: #111;
    color: #fff;
    border-radius: 9px;
}

/* ===================== Timetable Wrapper ===================== */
.timetable-wrapper {
    position: relative;
}

/* Bookmark icon inside timetable entries */
.timetable .time-entry {
    position: absolute;
    padding-right: 28px;
}

.entry-bookmark {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #999;
    transition: color 0.15s ease;
    z-index: 3;
}

.entry-bookmark:hover {
    color: #111;
}

.entry-bookmark.bookmarked {
    color: #111;
}

.entry-bookmark svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Entry time label */
.entry-time {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #888;
    margin-bottom: 2px;
}

/* ===================== Offcanvas Styles ===================== */
.experience-days-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(400px, 100vw);
    max-width: 100%;
    visibility: hidden;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    outline: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease-in-out, visibility 0.25s ease-in-out;
    z-index: 9999;
}

.experience-days-offcanvas.show,
.experience-days-offcanvas.showing {
    visibility: visible;
    transform: none;
}

.experience-days-offcanvas.hiding {
    visibility: visible;
}

.experience-days-offcanvas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #000;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.experience-days-offcanvas-backdrop.show {
    opacity: 0.5;
}

.experience-days-offcanvas-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.experience-days-offcanvas-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.experience-days-offcanvas-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.experience-days-offcanvas-close:hover {
    background: #f3f4f6;
}

.experience-days-offcanvas-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
}

.experience-days-offcanvas-body hr {
    border-color: #e5e7eb;
    margin: 16px 0;
}

/* Event Detail Offcanvas */
.event-detail-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 4px;
}

.event-detail-time {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}

.event-detail-date {
    font-size: 13px;
    color: #888;
}

.event-detail-location,
.event-detail-max-participants {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.event-detail-location[hidden],
.event-detail-max-participants[hidden] {
    display: none;
}

.event-detail-location::before,
.event-detail-max-participants::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.event-detail-location::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E");
}

.event-detail-max-participants::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E");
}

.event-detail-description {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.btn-bookmark-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    justify-content: center;
}

.btn-bookmark-detail:hover {
    background: #f3f4f6;
}

.btn-bookmark-detail.bookmarked {
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn-bookmark-detail .bookmark-icon-outline,
.btn-bookmark-detail .bookmark-icon-filled {
    display: none;
}

.btn-bookmark-detail .bookmark-icon-outline {
    display: block;
}

.btn-bookmark-detail.bookmarked .bookmark-icon-outline {
    display: none;
}

.btn-bookmark-detail.bookmarked .bookmark-icon-filled {
    display: block;
}

/* ===================== Merkliste Offcanvas ===================== */
.merkliste-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.merkliste-empty p {
    margin: 12px 0 0;
}

.merkliste-empty .text-muted {
    color: #999;
}

.merkliste-empty .small {
    font-size: 12px;
    line-height: 1.5;
}

.merkliste-day-group {
    margin-bottom: 24px;
}

.merkliste-day-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.merkliste-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.merkliste-item:last-child {
    border-bottom: none;
}

.merkliste-item-info {
    flex: 1;
}

.merkliste-item-time {
    font-size: 12px;
    font-weight: 500;
    color: #888;
}

.merkliste-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-top: 2px;
}

.merkliste-item-type {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.merkliste-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 4px;
    transition: color 0.15s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.merkliste-item-remove:hover {
    color: #111;
}

/* Offcanvas Footer */
.experience-days-offcanvas-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.btn-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #111;
    border-radius: 4px;
    background: #111;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    justify-content: center;
}

.btn-print:hover {
    background: #333;
}

/* ===================== Print Merkliste Styles ===================== */

.print-merkliste {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #111;
}

.print-logo {
    text-align: center;
    margin-bottom: 32px;
}

.print-logo img {
    width: 5cm;
    height: auto;
    display: inline-block;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
}

.print-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #111;
}

.print-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
}

.print-header .print-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.print-day-group {
    margin-bottom: 24px;
}

.print-day-label {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid #111;
    margin-bottom: 0;
}

.print-item {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.print-item:last-child {
    border-bottom: 1px solid #d1d5db;
}

.print-item-time {
    flex: 0 0 100px;
    font-size: 13px;
    font-weight: 600;
    padding-top: 1px;
}

.print-item-content {
    flex: 1;
}

.print-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.print-item-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #888;
    margin-bottom: 3px;
}

.print-item-location {
    font-size: 12px;
    color: #666;
}

.print-item-description {
    font-size: 12px;
    color: #444;
    margin-top: 4px;
    line-height: 1.5;
}

.print-footer {
    margin-top: 32px;
    padding-top: 12px;
    border-top: 1px solid #d1d5db;
    text-align: center;
    font-size: 11px;
    color: #999;
}

/* Print media query */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    /* Hide everything */
    body > *:not(.print-merkliste) {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .print-merkliste {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        padding: 20mm !important;
        margin: 0 !important;
        overflow: visible !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .print-day-group {
        page-break-inside: avoid;
    }

    .print-item {
        page-break-inside: avoid;
    }

    .print-footer {
        page-break-before: avoid;
    }
}

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .timetable-header h1 {
        font-size: 24px;
    }

    .timetable-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .timetable-days {
        justify-content: stretch;
    }

    .btn-day {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }

    .timetable-actions {
        justify-content: flex-end;
    }

    /* Always vertical text on mobile */
    .timetable aside {
        flex: 0 0 44px !important;
        min-width: 44px !important;
    }

    .timetable aside li {
        padding: 0 !important;
        justify-content: center;
    }

    .timetable aside .row-heading {
        writing-mode: vertical-lr;
        transform: rotate(180deg);
        font-size: 11px;
        letter-spacing: 1px;
    }

    .experience-days-offcanvas {
        width: 100% !important;
    }
}
