/* =============================================
   Gite Calendario — CSS tema Pedalopolis FIAB Bergamo
   ============================================= */

/* ── Variabili locali ─────────────────────── */
.gc-wrapper {
    --gc-blu:       var(--e-global-color-e018a15);
    --gc-blu-light: var(--e-global-color-secondary);
    --gc-giallo:    var(--e-global-color-primary);
    --gc-bianco:    #ffffff;
    --gc-grigio-bg: #f4f5f7;
    --gc-bordo:     #dde2ea;
    --gc-past:      #9aa3b2;
    --gc-radius:    10px;

    max-width: 100%;
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
    font-size:   var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    color: var(--gc-blu);
}

.gc-hidden { display: none !important; }

/* ── Toolbar ──────────────────────────────── */
.gc-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.gc-btn-view {
    padding: 10px 24px;
    border: 2px solid var(--gc-blu);
    border-radius: var(--gc-radius);
    background: var(--gc-bianco);
    color: var(--gc-blu);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    font-size: .9em;
    text-transform: uppercase;
    letter-spacing: .05em;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.gc-btn-view:hover {
    background: var(--gc-blu);
    color: var(--gc-giallo);
}

.gc-btn-view.gc-btn-active {
    background: var(--gc-blu);
    color: var(--gc-giallo);
    border-color: var(--gc-blu);
}

/* ── Tabella elenco ───────────────────────── */
.gc-table {
    width: 100%;
    border-collapse: collapse;
}

.gc-table thead {
    background: var(--gc-blu);
    color: var(--gc-giallo);
}

.gc-table th {
    padding: 12px 14px;
    text-align: left;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    font-size: .82em;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.gc-table th:first-child { border-radius: var(--gc-radius) 0 0 0; }
.gc-table th:last-child  { border-radius: 0 var(--gc-radius) 0 0; border-right: none;}
.gc-th-km { text-align: right; }

.gc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gc-bordo);
    vertical-align: middle;
}
.gc-table td:first-child {border-left: none;}
.gc-table td:last-child {border-right: none;}

table.gc-table thead:first-child tr:first-child th{
border-top:none;
border-left: none;
}

/* Righe zebrate leggere */
.gc-gita-row:nth-child(even) td,.gc-gita-row:nth-child(odd) td {
    background: var(--gc-grigio-bg);
}

/*.gc-gita-row:hover td {
    background: #eaf0fb;
}*/

/* Riga passata */
.gc-gita-row.gc-past td {
    color: var(--gc-past);
}
.gc-gita-row.gc-past:nth-child(even) td, .gc-gita-row.gc-past:nth-child(odd) td{
    background: white;
}

/* Intestazione mese */
.gc-month-row td {
    padding: 20px 14px 6px;
    background: transparent !important;
    border-bottom: 2px solid var(--gc-giallo);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gc-blu);
}

/* Colonne */
.gc-td-data  { white-space: nowrap; font-weight: 600; }
.gc-td-km    { white-space: nowrap; text-align: right; }
.gc-td-diff  { white-space: nowrap; }
.gc-td-nome  { font-weight: 600; }

/* Pallini difficoltà */
.gc-diff {
    font-size: 1em;
    letter-spacing: 2px;
    color: var(--gc-blu);
}
.gc-gita-row.gc-past .gc-diff {
    color: var(--gc-past);
}

/* Nessuna gita */
.gc-empty {
    text-align: center;
    padding: 32px;
    color: var(--gc-past);
}

/* ── Calendario ───────────────────────────── */
.gc-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.gc-cal-nav button {
    background: var(--gc-blu);
    color: var(--gc-giallo);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4em;
    cursor: pointer;
    line-height: 1;
    transition: background .2s;
}

.gc-cal-nav button:hover {
    background: var(--gc-blu-light);
}
#gc-prev{
padding: 0 16px 8px 12px;
}
#gc-next{
padding: 0 12px 8px 14px;
}

#gc-month-label {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gc-blu);
}

/* Intestazione giorni */
.gc-cal-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--gc-blu);
    border-radius: var(--gc-radius) var(--gc-radius) 0 0;
}

.gc-cal-head span {
    text-align: center;
    padding: 8px 4px;
    color: var(--gc-giallo);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    font-size: .75em;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Griglia giorni */
.gc-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--gc-bordo);
    border-top: none;
    border-radius: 0 0 var(--gc-radius) var(--gc-radius);
    overflow: hidden;
}

.gc-day {
    min-height: 80px;
    padding: 6px 8px;
    border-right: 1px solid var(--gc-bordo);
    border-bottom: 1px solid var(--gc-bordo);
    box-sizing: border-box;
    background: var(--gc-bianco);
}

.gc-day:nth-child(7n) { border-right: none; }

.gc-day--empty {
    background: var(--gc-grigio-bg);
    pointer-events: none;
}

.gc-day--past {
    background: var(--gc-grigio-bg);
}

.gc-day--past .gc-day-num {
    color: var(--gc-past);
}

.gc-day--today {
    background: #eaf0fb;
}

.gc-day--today .gc-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--gc-blu);
    color: var(--gc-giallo);
    border-radius: 50%;
    font-weight: 700;
}

.gc-day--has-gita {
    background: #fffbe6;
}

.gc-day--has-gita.gc-day--past {
    background: var(--gc-grigio-bg);
}

.gc-day-num {
    display: block;
    font-size: .78em;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--gc-blu);
}

.gc-event {
    display: block;
    font-size: .7em;
    margin-top: 2px;
    padding: 2px 5px;
    background: var(--gc-giallo);
    color: var(--gc-blu);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

/* ── Responsive ───────────────────────────── */
@media ( max-width: 700px ) {

    .gc-table thead { display: none; }

    .gc-table,
    .gc-table tbody,
    .gc-table tr,
    .gc-table td { display: block; width: 100%; }

    .gc-gita-row {
        margin-bottom: 12px;
        border: 1px solid var(--gc-bordo);
        border-radius: var(--gc-radius);
        overflow: hidden;
    }

    .gc-gita-row td {
        display: flex;
        gap: 8px;
        border-bottom: 1px solid var(--gc-bordo);
        padding: 8px 12px;
    }

    .gc-gita-row td:last-child { border-bottom: none; }

    .gc-gita-row td::before {
        content: attr(data-label);
        font-weight: 700;
        min-width: 90px;
        color: var(--gc-blu);
        flex-shrink: 0;
    }

    .gc-day { min-height: 48px; }
    .gc-event { display: none; }
    .gc-day--has-gita::after {
        content: '●';
        display: block;
        font-size: .6em;
        color: var(--gc-blu);
        text-align: center;
    }
}
