/*
 * GSBike Events Map — CSS
 * File: modules/gsbike_eventsmap/views/css/gsbike_eventsmap.css
 * Tema: Blu Royal #283582 / Oro #AD9A65 / Bianco caldo #FAFAF9
 */

/* ============================================================
   SEZIONE MAPPA
============================================================ */
.gsbike-map-section {
    padding: 48px 0 0;
    background: #FAFAF9;
}
.gsbike-map-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Intestazione ---- */
.gsbike-map-header {
    text-align: center;
    margin-bottom: 28px;
}
.gsbike-map-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #AD9A65;
    margin-bottom: 10px;
}
.gsbike-map-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #AD9A65;
}
.gsbike-map-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #283582;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    line-height: 1.1;
}
.gsbike-map-title-accent {
    color: #AD9A65;
}
.gsbike-map-subtitle {
    font-size: .95rem;
    color: #7A82B8;
    margin: 0;
}

/* ---- Card mappa ---- */
.gsbike-map-card {
    border: 1.5px solid rgba(173,154,101,.35);
    border-radius: 0;
    overflow: visible;
    box-shadow: 0 8px 24px -4px rgba(40,53,130,.12);
    margin-bottom: 48px;
}

/* ---- Mappa Leaflet ---- */
.gsbike-leaflet-map {
    width: 100%;
    background: #1a1a2e;
    display: block;
}

/* Schiarisce testi città nel tile dark */
.gsbike-leaflet-map .leaflet-tile-pane {
    filter: brightness(1.35) contrast(0.95);
}

/* ============================================================
   BARRA SELETTORE DATE
============================================================ */
.gsbike-datepicker-bar {
    position: relative;
    background: #283582;
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(173,154,101,.40);
    border-top: none;
}

.gsbike-dp-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: rgba(255,255,255,.8);
    text-align: left;
    transition: color .2s;
    font-family: inherit;
}
.gsbike-dp-toggle:hover { color: #AD9A65; }

.gsbike-dp-icon {
    width: 18px;
    height: 18px;
    color: #AD9A65;
    flex-shrink: 0;
}
.gsbike-dp-chevron {
    width: 18px;
    height: 18px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform .2s;
}
.gsbike-dp-chevron.open { transform: rotate(180deg); }

.gsbike-dp-clear {
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.gsbike-dp-clear svg {
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,.4);
}
.gsbike-dp-clear:hover svg { color: #e74c3c; }

/* ============================================================
   PANNELLO CALENDARIO
============================================================ */
.gsbike-dp-panel {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: #fff;
    border: 1.5px solid rgba(173,154,101,.30);
    border-radius: 12px;
    box-shadow: 0 6px 28px rgba(40,53,130,.14);
    padding: 16px;
    z-index: 1000;
    display: none;
    animation: gsbikeDpIn .18s ease;
}
.gsbike-dp-panel.open { display: block; }

@keyframes gsbikeDpIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.gsbike-dp-hint {
    font-size: .78rem;
    color: #7A82B8;
    margin: 0 0 12px;
    line-height: 1.4;
}

/* Navigazione mese */
.gsbike-dp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.gsbike-dp-monthlabel {
    font-weight: 700;
    font-size: 1rem;
    color: #283582;
    letter-spacing: .02em;
}
.gsbike-dp-navbtn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.gsbike-dp-navbtn:hover { background: rgba(173,154,101,.20); }
.gsbike-dp-navbtn svg { width: 16px; height: 16px; color: #283582; }

/* Griglia calendario */
.gsbike-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.gsbike-cal-header {
    text-align: center;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .07em;
    color: #AD9A65;
    padding: 2px 0 6px;
}
.gsbike-cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: .82rem;
    color: #283582;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
    gap: 1px;
}
.gsbike-cal-day:hover {
    background: rgba(40,53,130,.08);
    border-color: rgba(173,154,101,.45);
}
.gsbike-cal-day.empty { cursor: default; }
.gsbike-cal-day.today {
    border-color: #AD9A65;
    font-weight: 700;
}
.gsbike-cal-day.selected {
    background: #283582;
    color: #fff;
    font-weight: 700;
    border-color: #283582;
}
.gsbike-cal-day.has-event { font-weight: 700; }
.gsbike-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #AD9A65;
    flex-shrink: 0;
}
.gsbike-cal-day.selected .gsbike-cal-dot { background: rgba(255,255,255,.8); }

/* ============================================================
   LIGHTBOX POPUP EVENTO
============================================================ */
.gsbike-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gsbike-lightbox[hidden] { display: none; }

.gsbike-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28,38,107,.7);
    backdrop-filter: blur(4px);
}
.gsbike-lb-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(28,38,107,.30);
    border: 1.5px solid rgba(173,154,101,.25);
}
.gsbike-lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(40,53,130,.08);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background .15s;
}
.gsbike-lb-close:hover { background: rgba(40,53,130,.15); }
.gsbike-lb-close svg { width: 16px; height: 16px; color: #283582; }

.gsbike-lb-content { padding: 24px; }

/* Contenuto lightbox — generato da JS */
.gsbike-lb-event-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(173,154,101,.20);
}
.gsbike-lb-event-img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(173,154,101,.25);
}
.gsbike-lb-event-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #283582;
    margin-bottom: 6px;
    line-height: 1.3;
}
.gsbike-lb-event-meta {
    font-size: .8rem;
    color: #7A82B8;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}
.gsbike-lb-event-meta svg {
    width: 13px;
    height: 13px;
    color: #AD9A65;
    flex-shrink: 0;
}

.gsbike-lb-sub-list { margin-bottom: 16px; }
.gsbike-lb-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(40,53,130,.04);
    border: 1px solid rgba(173,154,101,.15);
    border-radius: 8px;
    margin-bottom: 6px;
}
.gsbike-lb-sub-name {
    font-weight: 600;
    font-size: .88rem;
    color: #283582;
    margin-bottom: 3px;
}
.gsbike-lb-sub-date {
    font-size: .75rem;
    color: #7A82B8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gsbike-lb-sub-date svg { width: 11px; height: 11px; color: #AD9A65; }

.gsbike-btn-sub-photos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(40,53,130,.08);
    border: 1px solid rgba(40,53,130,.20);
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    color: #283582;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}
.gsbike-btn-sub-photos:hover {
    background: #283582;
    color: #fff;
    border-color: #283582;
}
.gsbike-btn-sub-photos svg { width: 13px; height: 13px; }

.gsbike-btn-all-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #AD9A65;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s, transform .15s;
    width: 100%;
    margin-top: 4px;
}
.gsbike-btn-all-photos:hover {
    background: #8a7a4a;
    transform: translateY(-1px);
    color: #fff;
}
.gsbike-btn-all-photos svg { width: 18px; height: 18px; }

.gsbike-lb-no-subs {
    text-align: center;
    padding: 16px;
    color: #7A82B8;
    font-size: .88rem;
}

/* Tooltip regioni */
.gsbike-region-tooltip {
    background: rgba(40,53,130,.90) !important;
    border: 1px solid #AD9A65 !important;
    border-radius: 6px !important;
    color: #FAFAF9 !important;
    font-size: .72rem !important;
    font-weight: 600 !important;
    padding: 3px 9px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.35) !important;
    pointer-events: none;
}
.gsbike-region-tooltip::before { display: none !important; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
    .gsbike-map-section { padding: 32px 0 0; }
    .gsbike-dp-panel    { width: calc(100vw - 32px); }
    .gsbike-lb-panel    { max-width: 100%; border-radius: 12px 12px 0 0; }
    .gsbike-lightbox    { align-items: flex-end; padding: 0; }
}
