/* ============================================
   WORLD TOUR PAGE STYLES
   ============================================ */

/* --- View Switcher --- */
.tour-view-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.2) blur(16px);
    -webkit-backdrop-filter: saturate(1.2) blur(16px);
    position: sticky;
    top: 72px;
    z-index: 8;
    border-radius: 50px;
    max-width: fit-content;
    margin: -1.5rem auto 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.tour-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: 1.5px solid #dde1e6;
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}
.tour-view-btn:hover {
    border-color: #436E67;
    color: #436E67;
}
.tour-view-btn.active {
    background: #436E67;
    border-color: #436E67;
    color: #fff;
}
.tour-view-btn svg {
    width: 16px;
    height: 16px;
}

/* --- Date List View --- */
.tour-dates-section {
    padding: 2rem 0 4rem;
    background: #fff;
}
.tour-month-group {
    margin-bottom: 2.5rem;
}
.tour-month-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #99a3ad;
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

/* Date card */
.tour-date-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.tour-date-card:hover {
    background: #f6f8fa;
    border-color: #e8ecf0;
}

.tour-date-badge {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #436E67 0%, #3a5f59 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.tour-date-badge .day {
    font-size: 1.35rem;
    font-weight: 700;
}
.tour-date-badge .month {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.75;
    margin-top: 2px;
}

.tour-date-info {
    flex: 1;
    min-width: 0;
}
.tour-date-city {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
    line-height: 1.3;
}
.tour-date-country {
    font-size: 0.85rem;
    color: #7a8694;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.tour-date-country img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
}

.tour-date-actions {
    flex-shrink: 0;
}
.tour-ticket-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #436E67 0%, #3a5f59 100%);
    color: #fff;
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.tour-ticket-btn:hover {
    background: linear-gradient(135deg, #3a5f59 0%, #2f4f49 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 110, 103, 0.3);
}
.tour-ticket-btn.tba {
    background: #e9ecef;
    color: #7a8694;
    cursor: default;
    pointer-events: none;
}
.tour-ticket-btn svg {
    width: 14px;
    height: 14px;
}

/* --- Calendar View --- */
.tour-calendar-section {
    padding: 2rem 0 4rem;
    background: #fff;
    display: none;
}
.tour-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.tour-cal-month {
    border: 1px solid #e8ecf0;
    border-radius: 16px;
}
.tour-cal-month-header {
    background: linear-gradient(135deg, #3b5a55 0%, #2b4c47 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.tour-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 0.75rem;
}
.tour-cal-weekday {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #99a3ad;
    padding: 0.5rem 0;
}
.tour-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #555;
    border-radius: 10px;
    position: relative;
    cursor: default;
}
.tour-cal-day.empty {
    visibility: hidden;
}
.tour-cal-day.has-event {
    background: rgba(46, 79, 74, 0.06);
    color: #436E67;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tour-cal-day.has-event:hover {
    background: rgba(46, 79, 74, 0.12);
}

/* Calendar click popup (matches map popup design) */
#cal-popup {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    pointer-events: auto;
}
#cal-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #fff;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.08));
}
.cal-popup-inner {
    padding: 1rem 1.25rem;
}
.cal-popup-city {
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 0.15rem;
}
.cal-popup-country {
    font-size: 0.8rem;
    color: #7a8694;
    margin: 0 0 0.5rem;
}
.cal-popup-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: #436E67;
    margin: 0 0 0.75rem;
}
.cal-popup-ticket-btn {
    display: block;
    text-align: center;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #436E67 0%, #3a5f59 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.cal-popup-ticket-btn:hover {
    background: linear-gradient(135deg, #3a5f59 0%, #2f4f49 100%);
    color: #fff;
    text-decoration: none;
}
.cal-popup-ticket-btn.tba {
    background: #e9ecef;
    color: #7a8694;
    pointer-events: none;
    cursor: default;
}
.tour-cal-day.has-event.cal-active {
    background: rgba(46, 79, 74, 0.14);
    transform: scale(1.08);
}

/* Calendar flag */
.tour-cal-flag {
    display: block;
    width: 14px;
    height: 10px;
    margin-top: 2px;
    border-radius: 1.5px;
    object-fit: cover;
    pointer-events: none;
    box-shadow: 1px 2px 2px 1px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tour-cal-day-num {
    display: block;
    line-height: 1;
}

/* --- Map View --- */
.tour-map-section {
    padding: 2rem 0 4rem;
    background: #fff;
    display: none;
}
.tour-map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e8ecf0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
#tour-map {
    height: 520px;
    width: 100%;
    background: #f2f2f2;
}

/* Custom Leaflet marker */
.tour-marker {
    background: linear-gradient(135deg, #436E67 0%, #3a5f59 100%);
    border: 1px solid #fff;
    border-radius: 50%;
    width: 16px !important;
    height: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.tour-marker:hover {
    transform: scale(1.4);
    box-shadow: 0 4px 16px rgba(67, 110, 103, 0.5);
}

/* Leaflet popup */
.tour-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0;
}
.tour-popup .leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}
.tour-popup-inner {
    padding: 1rem 1.25rem;
}
.tour-popup-inner .popup-city {
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 0.15rem;
}
.tour-popup-inner .popup-country {
    font-size: 0.8rem;
    color: #7a8694;
    margin: 0 0 0.5rem;
}
.tour-popup-inner .popup-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: #436E67;
    margin: 0 0 0.75rem;
}
.tour-popup-inner .popup-ticket-btn {
    display: block;
    text-align: center;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #436E67 0%, #3a5f59 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tour-popup-inner .popup-ticket-btn:hover {
    background: linear-gradient(135deg, #3a5f59 0%, #2f4f49 100%);
    color: #fff;
    text-decoration: none;
}
.tour-popup-inner .popup-ticket-btn.tba {
    background: #e9ecef;
    color: #7a8694;
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .tour-date-card {
        padding: 0.9rem 1rem;
        gap: 0.9rem;
    }
    .tour-date-badge {
        width: 48px;
        height: 48px;
    }
    .tour-date-badge .day {
        font-size: 1.15rem;
    }
    .tour-date-city {
        font-size: 0.95rem;
    }
    .tour-ticket-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.78rem;
    }
    .tour-view-switcher {
        gap: 0.35rem;
    }
    .tour-view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    #tour-map {
        height: 380px;
    }
    .tour-calendar-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tour-date-card {
        flex-wrap: wrap;
    }
    .tour-date-actions {
        width: 100%;
        margin-top: 0.25rem;
        padding-left: calc(48px + 0.9rem);
    }
}
