/* ============================================================
   Trotterz Itinerary — Interactive Map Styles
   ============================================================ */

/* ── Map panel wrapper ─────────────────────────────────────── */
.trzi-map-panel {
    background: #fff;
    border: 1.5px solid #e0f2fe;
    border-radius: 12px;
    margin-top: -8px;         /* sits flush below the card above */
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(14,165,233,0.08);
}

.trzi-map-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 22px;
    background: #f0f9ff;
    border-bottom: 1.5px solid #e0f2fe;
}

.trzi-map-panel__header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

/* ── Legend ────────────────────────────────────────────────── */
.trzi-map-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.trzi-legend-item {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Day filter tabs ───────────────────────────────────────── */
.trzi-map-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 22px;
    border-bottom: 1.5px solid #e0f2fe;
    background: #f8fafc;
}

.trzi-day-btn {
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.trzi-day-btn:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
}
.trzi-day-btn--active {
    border-color: #0ea5e9;
    background: #0ea5e9;
    color: #fff;
}

/* ── Map + Sidebar layout ──────────────────────────────────── */
.trzi-map-container {
    height: 420px;
    width: 100%;
    z-index: 0;
}

/* Sidebar sits below the map on all screens — simpler, more readable */
.trzi-map-sidebar {
    border-top: 1.5px solid #e0f2fe;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

/* ── Sidebar items ─────────────────────────────────────────── */
.trzi-sidebar-day {
    padding: 6px 18px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0ea5e9;
    background: #f0f9ff;
    border-bottom: 1px solid #e0f2fe;
    margin-top: 4px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.trzi-sidebar-pin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f1f5f9;
}
.trzi-sidebar-pin:hover {
    background: #f0f9ff;
}
.trzi-sidebar-pin--active {
    background: #e0f2fe;
}

.trzi-sidebar-pin__icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.trzi-sidebar-pin__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.trzi-sidebar-pin__info strong {
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trzi-sidebar-pin__info span {
    font-size: 11px;
    color: #64748b;
}

/* Sidebar scrollbar styling */
.trzi-map-sidebar::-webkit-scrollbar { width: 5px; }
.trzi-map-sidebar::-webkit-scrollbar-track { background: #f8fafc; }
.trzi-map-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── Custom marker SVGs ────────────────────────────────────── */
.trzi-map-marker {
    background: none !important;
    border: none !important;
}

/* ── Leaflet popup override ────────────────────────────────── */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
}
.leaflet-popup-content {
    margin: 0 !important;
}
.trzi-popup {
    padding: 12px 14px;
    min-width: 160px;
}
.trzi-popup__name {
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.4;
}
.trzi-popup__day {
    font-size: 11px;
    color: #0ea5e9;
    font-weight: 600;
    margin-bottom: 4px;
}
.trzi-popup__note {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

/* ── Attribution override ──────────────────────────────────── */
.leaflet-control-attribution {
    font-size: 10px !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .trzi-map-container  { height: 300px; }
    .trzi-map-sidebar    { max-height: 200px; }
    .trzi-map-panel__header { flex-direction: column; align-items: flex-start; }
    .trzi-map-legend     { display: none; }
}
