@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ========================================
   CSS VARIABLES / DESIGN TOKENS
   ======================================== */
:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --primary-glow: rgba(14, 165, 233, 0.15);
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;

    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.08);
    --glow: 0 0 40px rgba(14, 165, 233, 0.2);

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================================
   GLOBAL SCROLLBARS (Cross-browser)
   ======================================== */
* {
    /* Firefox Support */
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* WebKit Support (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.navbar-brand .brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.navbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.navbar-meta .badge {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-hover);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #D97706);
    color: #fff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-body {
    padding: 24px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.07);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control-number {
    display: flex;
    align-items: center;
}

.form-control-number input {
    text-align: center;
    width: 80px;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    padding: 10px;
}

.form-control-number button {
    width: 36px;
    height: 36px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: var(--transition);
    margin: 0 6px;
}

.form-control-number button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========================================
   CATEGORY FILTER PILLS
   ======================================== */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-pill:hover,
.filter-pill.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

.filter-pill.all.active {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ========================================
   MAP CONTAINER
   ======================================== */
#map-container {
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Override Leaflet popup */
.leaflet-popup-content-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: var(--radius-lg) !important;
}

.leaflet-popup-tip-container {
    display: none;
}

.leaflet-popup-content {
    margin: 0 !important;
}

/* ========================================
   ATTRACTION POPUP CARD
   ======================================== */
.attraction-popup {
    width: 280px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.attraction-popup-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
}

.attraction-popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attraction-popup-img .img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.attraction-popup-img .img-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.attraction-popup-img .img-prev {
    left: 8px;
}

.attraction-popup-img .img-next {
    right: 8px;
}

.attraction-popup-body {
    padding: 16px;
}

.attraction-popup-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.attraction-popup-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.35;
}

.attraction-popup-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;

    /* Replaced line-clamp with scroll */
    max-height: 120px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.attraction-popup-desc::-webkit-scrollbar {
    width: 4px;
}

.attraction-popup-desc::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

/* Let the desktop sidebar description expand fully instead of scrolling in a tiny box */
.desktop-detail-sidebar .attraction-popup-desc {
    max-height: none;
    overflow-y: visible;
}

.attraction-popup-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.attraction-popup-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   DESKTOP FIXED POPUP SIDEBAR (Left side)
   ======================================== */
.desktop-detail-sidebar {
    display: none;
}

@media (min-width: 768px) {
    .desktop-detail-sidebar {
        display: none;
        /* toggled by .active */
        position: absolute;
        top: 24px;
        left: 24px;
        width: 320px;
        height: calc(100% - 48px);
        z-index: 1000;
        pointer-events: auto;
    }

    .desktop-detail-sidebar.active {
        display: flex;
        flex-direction: column;
        animation: slideInSidebar 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes slideInSidebar {
        0% {
            transform: translateX(-20px);
            opacity: 0;
        }

        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .desktop-detail-sidebar .attraction-popup {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: var(--shadow-lg);
        position: relative;
    }

    .desktop-detail-sidebar .attraction-popup-img {
        height: 220px;
        flex-shrink: 0;
    }

    .desktop-detail-sidebar .attraction-popup-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 20px;
        overflow: hidden;
        /* Stop the whole body from scrolling */
    }

    .desktop-detail-sidebar .attraction-popup-desc {
        flex: 1;
        overflow-y: auto;
        /* Only text scrolls */
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        display: block !important;
        margin-bottom: 16px;
        padding-right: 8px;
        /* Room for scrollbar */
    }

    .desktop-detail-sidebar .attraction-popup-desc::-webkit-scrollbar-thumb {
        background: #CBD5E1;
        border-radius: 4px;
    }

    .desktop-detail-sidebar .attraction-popup-meta {
        margin-bottom: 0;
    }

    .desktop-detail-sidebar .btn-full {
        margin-top: 16px;
    }
}

/* ========================================
   POPUP RICH TEXT HTML (QUILL) FORMATTING
   ======================================== */
.attraction-popup-desc p {
    margin-bottom: 12px;
}

.attraction-popup-desc p:last-child {
    margin-bottom: 0;
}

.attraction-popup-desc ul,
.attraction-popup-desc ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.attraction-popup-desc li {
    margin-bottom: 4px;
}

.attraction-popup-desc a {
    color: var(--primary);
    text-decoration: underline;
}

.attraction-popup-desc a:hover {
    color: var(--primary-dark);
}

.attraction-popup-desc strong,
.attraction-popup-desc b {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   TIMETABLE PANEL
   ======================================== */
.timetable-panel {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.timetable-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timetable-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.timetable-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.timetable-day {
    margin-bottom: 20px;
}

.timetable-day-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timetable-day-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.day-items {
    min-height: 60px;
    border-radius: var(--radius);
    transition: background 0.2s, box-shadow 0.2s;
    padding-bottom: 4px;
    /* Give a tiny bit of buffer for easy drops */
}

/* Highlight the whole day block when hovering directly with a dragged item! */
.day-items:has(.sortable-ghost),
.day-items.sortable-dragover {
    background: rgba(14, 165, 233, 0.1) !important;
    box-shadow: inset 0 0 0 1px var(--primary) !important;
}

.timetable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    transition: var(--transition);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.timetable-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.timetable-item .item-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timetable-item .item-info {
    flex: 1;
    min-width: 0;
}

.timetable-item .item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timetable-item .item-duration {
    font-size: 11px;
    color: var(--text-secondary);
}

.timetable-item .drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.timetable-item .drag-handle:active {
    cursor: grabbing;
}

.timetable-item .remove-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.timetable-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.timetable-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.timetable-empty .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.timetable-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.timetable-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.timetable-totals .total-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   SORTABLE (drag ghost)
   ======================================== */
.sortable-ghost {
    opacity: 0.4;
    background: var(--primary-glow) !important;
}

.sortable-drag {
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

/* ========================================
   MODAL / OVERLAY
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(16px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 28px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

/* ========================================
   CUSTOM TOOLTIPS (Bootstrap-like logic)
   ======================================== */
.custom-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #1E293B;
    color: #F8FAFC;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1.4;
    white-space: pre-wrap;
    width: max-content;
    max-width: 220px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* Prevent left clipping in scrolling sidebars */
.desktop-detail-sidebar .custom-tooltip::after,
.timetable-panel .custom-tooltip::after {
    left: 0;
    transform: translateY(-4px);
    text-align: left;
}

.desktop-detail-sidebar .custom-tooltip:hover::after,
.timetable-panel .custom-tooltip:hover::after {
    transform: translateY(-8px);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px 24px;
}

/* ========================================
   DESTINATION CARDS (Home Page)
   ======================================== */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.destination-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.destination-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.destination-card img,
.destination-card .dest-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.destination-card .dest-bg {
    background: linear-gradient(160deg, #1E3A5F, #0D1B2A);
}

.destination-card .dest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

.destination-card .dest-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
}

.destination-card .dest-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.destination-card .dest-coming-soon {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.destination-card.active .cta-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.destination-card.active:hover .cta-arrow {
    background: var(--primary-dark);
    transform: translateX(4px);
}

.destination-card.coming-soon {
    cursor: default;
}

.destination-card.coming-soon:hover {
    transform: none;
}

.destination-card .logo-top {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ========================================
   TRIP SETUP FORM
   ======================================== */
.setup-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
}

.setup-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(24px);
}

.setup-title {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 8px;
}

.setup-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ========================================
   TIMETABLE FULL PAGE
   ======================================== */
.timetable-page {
    min-height: 100vh;
    padding-top: 64px;
}

.timetable-full-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: var(--transition);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.timetable-full-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   SHARED PLAN PAGE
   ======================================== */
.shared-page {
    padding-top: 64px;
}

.shared-hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, transparent 100%);
}

.shared-hero h1 {
    font-family: var(--font-display);
    font-size: 40px;
    margin-bottom: 12px;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .destinations-grid {
        grid-template-columns: 1fr;
    }

    .destination-card {
        aspect-ratio: 4/3;
    }

    .setup-card {
        padding: 28px 20px;
    }

    .navbar {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .destinations-grid {
        gap: 16px;
    }
}

/* Leaflet Popup Frosted Glass */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--border);
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
}

/* ========================================
   CUSTOM TOOLTIPS (Bootstrap-like logic)
   ======================================== */
.custom-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.ph.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #1E293B;
    color: #F8FAFC;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font) !important;
    font-style: normal !important;
    font-variant: normal !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    -webkit-font-smoothing: auto !important;
    white-space: pre-wrap;
    width: max-content;
    max-width: 220px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* Prevent left clipping in scrolling sidebars */
.desktop-detail-sidebar .custom-tooltip::after,
.timetable-panel .custom-tooltip::after,
.map-toolbar .custom-tooltip::after {
    left: 0;
    transform: translateY(-4px);
    text-align: left;
}

.desktop-detail-sidebar .custom-tooltip:hover::after,
.timetable-panel .custom-tooltip:hover::after,
.map-toolbar .custom-tooltip:hover::after {
    transform: translateY(-8px);
}