﻿/* ═══════════════════════════════════════════════════════════
   wwwroot/css/pickups.css
   Dirty Monkey Adventure — Pickup Schedule Page
   Brand palette:
     --tblr-primary : #336147  (forest green)
     --tblr-info    : #7D4B2E  (earth brown)
════════════════════════════════════════════════════════════ */

:root {
    /* ── Brand ── */
    --dma-primary: #336147; /* forest green  */
    --dma-primary-dk: #254A36; /* darker green  */
    --dma-primary-lt: #E6F0EB; /* tint green    */
    --dma-primary-bd: #A8CCB8; /* border green  */

    --dma-brown: #7D4B2E; /* earth brown   */
    --dma-brown-dk: #5E3820; /* darker brown  */
    --dma-brown-lt: #F5ECE6; /* tint brown    */
    --dma-brown-bd: #D9B49A; /* border brown  */

    --dma-ocean: #733644;
    --dma-ocean-dk: #73293a;
    --dma-ocean-lt: #f6dbe2;
    --dma-ocean-bd: #cdb0b7;
    /* ── Neutral ── */
    --dma-slate: #1A2332;
    --dma-muted: #6B7A8D;
    --dma-border: #E5E9EF;
    --dma-surface: #F7F8FA;
    /* ── Misc ── */
    --card-radius: 16px;
    --dma-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── HERO ─── */
.dma-hero {
    background: linear-gradient( 135deg, #0D1A14 0%, #1B3328 55%, #2E1A0E 100% );
    padding: 2.8rem 0 5rem;
    position: relative;
    overflow: hidden;
    padding-top: 94px !important
}

    .dma-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        pointer-events: none;
    }

.dma-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A8CCB8;
    background: rgba(51,97,71,0.25);
    border: 1px solid rgba(168,204,184,0.4);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.dma-hero h1 {
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 0.65rem;
}

    .dma-hero h1 span {
        color: #A8CCB8;
    }
/* soft green accent on title */
.dma-hero p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    max-width: 480px;
    line-height: 1.6;
    margin: 0;
}

/* ─── TOUR TABS ─── */
.tour-tabs-wrap {
    margin-top: 2rem;
}

.tour-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tour-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    border-radius: 100px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--dma-transition);
    user-select: none;
    line-height: 1.3;
}

    .tour-tab i {
        font-size: 18px;
    }

    .tour-tab:hover {
        background: rgba(255,255,255,0.12);
        color: #fff;
        border-color: rgba(255,255,255,0.3);
    }

    /* Active states — one color per tour */
    .tour-tab.active[data-tour="cuale"] {
        background: var(--dma-primary);
        border-color: var(--dma-primary);
        color: #fff;
        box-shadow: 0 4px 20px rgba(51,97,71,0.5);
    }

    .tour-tab.active[data-tour="hotsierra"] {
        background: var(--dma-brown);
        border-color: var(--dma-brown);
        color: #fff;
        box-shadow: 0 4px 20px rgba(125,75,46,0.5);
    }

    .tour-tab.active[data-tour="line"] {
        background: var(--dma-ocean);
        border-color: var(--dma-ocean);
        color: #fff;
        box-shadow: 0 4px 20px rgba(29,82,120,0.45);
    }

.tour-tab-label small {
    display: block;
    font-size: 10px;
    opacity: 0.75;
    font-weight: 400;
}

/* ─── CONTENT AREA ─── */
.dma-content {
    margin-top: -3rem;
    padding-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* ─── ACTIVE TOUR BANNER ─── */
.active-tour-banner {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    transition: var(--dma-transition);
}

    .active-tour-banner[data-active="cuale"] {
        background: var(--dma-primary-lt);
        border: 1px solid var(--dma-primary-bd);
    }

    .active-tour-banner[data-active="hotsierra"] {
        background: var(--dma-brown-lt);
        border: 1px solid var(--dma-brown-bd);
    }

    .active-tour-banner[data-active="line"] {
        background: var(--dma-ocean-lt);
        border: 1px solid var(--dma-ocean-bd);
    }

.banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.active-tour-banner[data-active="cuale"] .banner-icon {
    background: var(--dma-primary);
    color: #fff;
}

.active-tour-banner[data-active="hotsierra"] .banner-icon {
    background: var(--dma-brown);
    color: #fff;
}

.active-tour-banner[data-active="line"] .banner-icon {
    background: var(--dma-ocean);
    color: #fff;
}

.banner-text strong {
    font-size: 14px;
    font-weight: 700;
    display: block;
    color: var(--dma-slate);
}

.banner-text span {
    font-size: 12px;
    color: var(--dma-muted);
}

/* ─── SPLIT LAYOUT ─── */
.split-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

/* ─── STOP CARDS GRID ─── */
.stops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

/* ─── STOP CARD ─── */
.stop-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1.5px solid var(--dma-border);
    overflow: hidden;
    transition: var(--dma-transition);
    cursor: pointer;
    position: relative;
}

    .stop-card:hover {
        border-color: #CBD3DC;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(26,35,50,0.08);
    }

    .stop-card.own-transport {
        border-style: dashed;
        background: #FAFBFC;
    }

/* Selection per tour */
.stops-grid[data-active="cuale"] .stop-card.selected {
    border-color: var(--dma-primary);
    box-shadow: 0 0 0 3px rgba(51,97,71,0.14), 0 8px 24px rgba(26,35,50,0.1);
    transform: translateY(-2px);
}

.stops-grid[data-active="hotsierra"] .stop-card.selected {
    border-color: var(--dma-brown);
    box-shadow: 0 0 0 3px rgba(125,75,46,0.16), 0 8px 24px rgba(26,35,50,0.1);
    transform: translateY(-2px);
}

.stops-grid[data-active="line"] .stop-card.selected {
    border-color: var(--dma-ocean);
    box-shadow: 0 0 0 3px rgba(29,82,120,0.14), 0 8px 24px rgba(26,35,50,0.1);
    transform: translateY(-2px);
}

/* Checkmark badge */
.stop-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    transition: var(--dma-transition);
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.stops-grid[data-active="cuale"] .stop-card::after {
    background-color: var(--dma-primary);
}

.stops-grid[data-active="hotsierra"] .stop-card::after {
    background-color: var(--dma-brown);
}

.stops-grid[data-active="line"] .stop-card::after {
    background-color: var(--dma-ocean);
}

.stop-card.selected::after {
    opacity: 1;
}

/* Card internals */
.stop-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 1rem 1.1rem 0.8rem;
    border-bottom: 1px solid var(--dma-border);
}

.stop-number {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--dma-primary); /* green numbers */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.stop-card.own-transport .stop-number {
    background: var(--dma-muted);
}

.stop-info {
    flex: 1;
    min-width: 0;
}

.stop-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dma-slate);
    display: block;
    line-height: 1.2;
    padding-right: 22px;
}

.stop-area {
    font-size: 11px;
    color: var(--dma-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

    .stop-area i {
        font-size: 11px;
    }

.stop-icon-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--dma-surface);
    border: 1px solid var(--dma-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--dma-brown); /* brown icon accent */
    flex-shrink: 0;
}

.stop-times {
    padding: 0.8rem 1.1rem;
}

.times-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dma-muted);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.time-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    transition: var(--dma-transition);
}

    .time-chip i {
        font-size: 11px;
    }

/* Time chip colors per tour */
.stops-grid[data-active="cuale"] .time-chip {
    background: var(--dma-primary-lt);
    color: var(--dma-primary-dk);
    border: 1px solid var(--dma-primary-bd);
}

.stops-grid[data-active="hotsierra"] .time-chip {
    background: var(--dma-brown-lt);
    color: var(--dma-brown-dk);
    border: 1px solid var(--dma-brown-bd);
}

.stops-grid[data-active="line"] .time-chip {
    background: var(--dma-ocean-lt);
    color: var(--dma-ocean-dk);
    border: 1px solid var(--dma-ocean-bd);
}

/* Map hint row */
.stop-map-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.1rem 0.8rem;
    font-size: 11px;
    color: var(--dma-muted);
    border-top: 1px dashed var(--dma-border);
}

    .stop-map-hint i {
        font-size: 13px;
    }

.stops-grid[data-active="cuale"] .stop-card.selected .stop-map-hint {
    color: var(--dma-primary);
}

.stops-grid[data-active="hotsierra"] .stop-card.selected .stop-map-hint {
    color: var(--dma-brown);
}

.stops-grid[data-active="line"] .stop-card.selected .stop-map-hint {
    color: var(--dma-ocean);
}

/* ─── RIGHT PANEL: STICKY MAP ─── */
.right-panel {
    position: sticky;
    top: 80px;
}

.map-sticky-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid var(--dma-border);
    overflow: hidden;
}

.map-sticky-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--dma-border);
}

.map-sticky-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--dma-primary-lt);
    border: 1px solid var(--dma-primary-bd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--dma-primary);
    flex-shrink: 0;
}

.map-sticky-title-wrap {
    flex: 1;
    min-width: 0;
}

.map-sticky-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dma-slate);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-sticky-subtitle {
    font-size: 11px;
    color: var(--dma-muted);
    display: block;
    margin-top: 1px;
}

.map-iframe-container {
    position: relative;
}

    .map-iframe-container iframe {
        width: 100%;
        height: 320px;
        border: 0;
        display: block;
        transition: opacity 0.3s ease;
    }

/* Loader */
.map-loader {
    position: absolute;
    inset: 0;
    background: var(--dma-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

    .map-loader.visible {
        opacity: 1;
    }

.map-loader-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2.5px solid var(--dma-border);
    border-top-color: var(--dma-primary); /* green spinner */
    animation: dma-spin 0.7s linear infinite;
}

.map-loader p {
    font-size: 12px;
    color: var(--dma-muted);
    margin: 0;
}

@keyframes dma-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No-selection overlay */
.map-no-selection {
    position: absolute;
    inset: 0;
    background: rgba(247,248,250,0.93);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.3s ease;
}

    .map-no-selection.hidden {
        opacity: 0;
        pointer-events: none;
    }

.map-no-selection-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--dma-primary-bd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--dma-primary);
}

.map-no-selection p {
    font-size: 12.5px;
    color: var(--dma-muted);
    margin: 0;
    text-align: center;
    max-width: 180px;
    line-height: 1.5;
}

/* Map footer */
.map-sticky-footer {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--dma-border);
    background: var(--dma-surface);
}

.map-default-notice {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--dma-muted);
    min-width: 0;
    overflow: hidden;
}

    .map-default-notice i {
        font-size: 13px;
        flex-shrink: 0;
    }

.map-open-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--dma-primary);
    background: var(--dma-primary-lt);
    border: 1px solid var(--dma-primary-bd);
    padding: 5px 12px;
    border-radius: 100px;
    text-decoration: none;
    transition: var(--dma-transition);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

    .map-open-link:hover {
        background: var(--dma-primary);
        color: #fff;
        border-color: var(--dma-primary);
    }

    .map-open-link i {
        font-size: 12px;
    }

/* ─── MOBILE MAP ─── */
.mobile-map-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid var(--dma-border);
    overflow: hidden;
    margin-top: 1.25rem;
    display: none;
}

    .mobile-map-card iframe {
        width: 100%;
        height: 260px;
        border: 0;
        display: block;
    }

/* ─── LEGEND ─── */
.schedule-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--dma-muted);
}

/* ─── ANIMATIONS ─── */
.stop-card {
    animation: dma-cardIn 0.35s ease both;
}

@keyframes dma-cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stop-card:nth-child(1) {
    animation-delay: 0.04s;
}

.stop-card:nth-child(2) {
    animation-delay: 0.08s;
}

.stop-card:nth-child(3) {
    animation-delay: 0.12s;
}

.stop-card:nth-child(4) {
    animation-delay: 0.16s;
}

.stop-card:nth-child(5) {
    animation-delay: 0.20s;
}

.stop-card:nth-child(6) {
    animation-delay: 0.24s;
}

.stop-card:nth-child(7) {
    animation-delay: 0.28s;
}

.fade-swap {
    animation: dma-fadeSwap 0.22s ease;
}

@keyframes dma-fadeSwap {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {

    /* Stack panels vertically */
    .split-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Banner on top */
    .left-panel {
        order: 1;
    }

        /* Hide the DESKTOP sticky map — irrelevant on mobile */
        .left-panel .map-sticky-card {
            display: none;
        }

    /* KEY FIX: cards panel was display:none — show it */
    .right-panel {
        display: block;
        position: static; /* override sticky */
        top: unset;
        order: 2;
    }

    /* 2-column card grid on tablets */
    .stops-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile map card appears below cards */
    .mobile-map-card {
        display: block;
    }

        .mobile-map-card iframe {
            height: 300px;
        }
}

@media (max-width: 640px) {
    .dma-hero {
        padding: 2rem 0 4.5rem;
    }

    .stops-grid {
        grid-template-columns: 1fr;
    }

    .tour-tab-label small {
        display: none;
    }

    .mobile-map-card iframe {
        height: 240px;
    }
}

/* ─── TIME FORMAT TOGGLE ─── */
.time-format-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

    .toggle-switch input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
    }

/* Track base */
.toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 0 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Colores adaptativos según tour activo */
.active-tour-banner[data-active="cuale"] .toggle-track {
    background: rgba(51,97,71,0.25);
    border-color: rgba(168,204,184,0.35);
}

.active-tour-banner[data-active="hotsierra"] .toggle-track {
    background: rgba(125,75,46,0.25);
    border-color: rgba(217,180,154,0.35);
}

.active-tour-banner[data-active="line"] .toggle-track {
    background: rgba(115,54,68,0.25);
    border-color: rgba(205,176,183,0.35);
}

/* Thumb deslizante con TEXTO */
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.68, -0.2, 0.265, 1.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    z-index: 2;
    font-size: 11px;
    font-weight: 800;
    color: var(--dma-slate);
    letter-spacing: -0.02em;
}

    /* Texto dentro del thumb cambia según estado */
    .toggle-thumb::before {
        content: '12';
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

/* Labels estáticos a los lados del track */
.toggle-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    z-index: 1;
    line-height: 1;
}

.toggle-label-12 {
    color: rgba(255,255,255,0.95);
    margin-left: 2px;
}

.toggle-label-24 {
    color: rgba(255,255,255,0.35);
    margin-right: 2px;
}

/* ─── ESTADO ACTIVO (24H) ─── */
.toggle-switch input:checked + .toggle-track .toggle-thumb {
    transform: translateX(42px);
}

    .toggle-switch input:checked + .toggle-track .toggle-thumb::before {
        content: '24';
    }

/* Labels swap de color */
.toggle-switch input:checked + .toggle-track .toggle-label-12 {
    color: rgba(255,255,255,0.35);
}

.toggle-switch input:checked + .toggle-track .toggle-label-24 {
    color: rgba(255,255,255,0.95);
}

/* Track glow en estado activo según tour */
.active-tour-banner[data-active="cuale"] .toggle-switch input:checked + .toggle-track {
    background: rgba(51,97,71,0.4);
    border-color: rgba(168,204,184,0.5);
    box-shadow: 0 0 16px rgba(51,97,71,0.3);
}

.active-tour-banner[data-active="hotsierra"] .toggle-switch input:checked + .toggle-track {
    background: rgba(125,75,46,0.4);
    border-color: rgba(217,180,154,0.5);
    box-shadow: 0 0 16px rgba(125,75,46,0.3);
}

.active-tour-banner[data-active="line"] .toggle-switch input:checked + .toggle-track {
    background: rgba(115,54,68,0.4);
    border-color: rgba(205,176,183,0.5);
    box-shadow: 0 0 16px rgba(115,54,68,0.3);
}

/* Hover */
.toggle-switch:hover .toggle-track {
    border-color: rgba(255,255,255,0.4);
}

/* Focus accesibilidad */
.toggle-switch input:focus-visible + .toggle-track {
    outline: 2px solid rgba(168,204,184,0.8);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 640px) {
    .time-format-toggle {
        margin-left: 0;
        margin-top: 0.75rem;
        width: 100%;
        justify-content: flex-end;
    }

    .toggle-track {
        width: 76px;
        height: 34px;
    }

    .toggle-thumb {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .toggle-switch input:checked + .toggle-track .toggle-thumb {
        transform: translateX(38px);
    }
}