/* ==========================================================================
   Tourify — Trip Itinerary Interactive Map (front-end)
   Reuses the same color tokens as single-trip-itinerary.css
   ========================================================================== */

.cb-itin-map-section {
    --cb-itin-map-route: #E63946;
    margin-bottom: 60px;
}

/* Toggle button --------------------------------------------------------- */

.cb-itin-map-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #066B96;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cb-itin-map-toggle:hover {
    background: #01b5bc;
}

.cb-itin-map-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cb-itin-map-toggle-caret {
    transition: transform 0.2s ease;
}

.cb-itin-map-section.is-open .cb-itin-map-toggle-caret {
    transform: rotate(180deg);
}

/* Collapsible panel ------------------------------------------------------- */

.cb-itin-map-panel {
    display: none;
    margin-top: 16px;
}

.cb-itin-map-section.is-open .cb-itin-map-panel {
    display: block;
}

.cb-itin-map-canvas {
    width: 100%;
    height: 460px;
    border-radius: 18px;
    overflow: hidden;
    background: #f7fafc;
}

/* "Tour Route" legend card, overlaid top-left on the map ------------------ */

.cb-itin-map-legend {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 14px 16px;
    margin: 12px;
    min-width: 170px;
    font-family: Arial, sans-serif;
}

.cb-itin-map-legend-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.cb-itin-map-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #4a5568;
    margin-bottom: 6px;
}

.cb-itin-map-legend-pin {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50% 50% 50% 0;
    background: #E63946;
    transform: rotate(-45deg);
}

.cb-itin-map-legend-line {
    flex-shrink: 0;
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: #E63946;
}

.cb-itin-map-legend-hint {
    font-size: 0.72rem;
    color: #9aa5b1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #edf1f5;
}

/* Info window content (styled inline by Google Maps, keep it minimal) ----- */

.cb-itin-map-info {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a5568;
    max-width: 220px;
}

.cb-itin-map-info strong {
    color: #066B96;
}

.cb-itin-map-info .cb-itin-map-info-badge {
    display: inline-block;
    background: #E63946;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 999px;
    padding: 1px 7px;
    margin-right: 6px;
}

/* Admin-only notice when the map can't render ----------------------------- */

.cb-itin-map-admin-notice {
    background: #fff8e1;
    border: 1px dashed #e0b23a;
    color: #6b5a1a;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.cb-itin-map-admin-notice a {
    color: #066B96;
    font-weight: 600;
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 640px) {
    .cb-itin-map-canvas {
        height: 280px;
        border-radius: 12px;
    }

    .cb-itin-map-toggle {
        width: 100%;
        justify-content: center;
    }

    .cb-itin-map-legend {
        padding: 10px 12px;
        margin: 8px;
        min-width: 140px;
        font-size: 0.75rem;
    }

    .cb-itin-map-legend-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .cb-itin-map-legend-row {
        gap: 6px;
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
}
