/* =========================================================
   CUSTOM EVENTS CALENDAR
   FullCalendar 7 - Classic
   ========================================================= */

.cec-calendar-wrapper {
    width: 100%;
    color: #666;
}


/* =========================================================
   CALENDARIO
   ========================================================= */

.cec-event-calendar {
    width: 100%;
    font-size: 13px;
}


/* =========================================================
   HEADER MESE
   ========================================================= */

.cec-event-calendar > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}


/* Titolo "agosto 2026" */

.cec-event-calendar [role="heading"] {
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    color: #666 !important;
    text-transform: capitalize;
}


/* =========================================================
   FRECCE
   ========================================================= */

.cec-event-calendar button {
    width: 32px !important;
    height: 32px !important;

    padding: 0 !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    border: 0 !important;
    border-radius: 50% !important;

    background: transparent !important;
    color: #666 !important;

    box-shadow: none !important;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}


.cec-event-calendar button:hover {
    background: #F59C00 !important;
    color: #fff !important;
}


.cec-event-calendar button svg {
    width: 17px;
    height: 17px;
}


/* =========================================================
   HEADER GIORNI
   ========================================================= */

.cec-event-calendar [role="columnheader"] {
    padding: 8px 0 !important;

    font-size: 10px !important;
    font-weight: 600 !important;

    color: #999 !important;

    text-transform: uppercase;
    letter-spacing: .05em;
}


/* =========================================================
   GRIGLIA
   ========================================================= */

/*
 * Le celle della v7 sono role="gridcell".
 */

.cec-event-calendar [role="gridcell"] {
    position: relative;

    min-width: 0;

    background: #fff;

    border-top: 1px solid #eeeeee;
    border-left: 1px solid #eeeeee;

    cursor: default;

    transition:
        background .15s ease;
}


/*
 * Ultima colonna
 */

.cec-event-calendar [role="gridcell"]:last-child {
    border-right: 1px solid #eeeeee;
}


/*
 * Ultima riga
 */

.cec-event-calendar [role="row"]:last-child [role="gridcell"] {
    border-bottom: 1px solid #eeeeee;
}


/* =========================================================
   NUMERI DEI GIORNI
   ========================================================= */

/*
 * FullCalendar 7 usa un div con aria-hidden="true"
 * per il numero.
 */

.cec-event-calendar
[role="gridcell"]
[aria-hidden="true"] {

    display: flex !important;

    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    margin: 5px auto;

    border-radius: 50%;

    font-size: 12px !important;
    line-height: 1 !important;

    font-weight: 500;

    color: #666;

    transition:
        background .2s ease,
        color .2s ease;
}


/* =========================================================
   HOVER GIORNO
   ========================================================= */

.cec-event-calendar
[role="gridcell"][data-date]:hover {

    background: #fffaf2;
}


.cec-event-calendar
[role="gridcell"][data-date]:hover
[aria-hidden="true"] {

    background: #fff0d9;

    color: #F59C00;
}


/* =========================================================
   GIORNI FUORI MESE
   ========================================================= */

/*
 * Luglio e settembre visibili nel calendario di agosto.
 */

.cec-event-calendar
[role="gridcell"][data-date^="2026-07"],
.cec-event-calendar
[role="gridcell"][data-date^="2026-09"] {

    background: #fafafa;
}


.cec-event-calendar
[role="gridcell"][data-date^="2026-07"]
[aria-hidden="true"],
.cec-event-calendar
[role="gridcell"][data-date^="2026-09"]
[aria-hidden="true"] {

    color: #bbb;
}


/* =========================================================
   OGGI
   ========================================================= */

/*
 * FullCalendar mette aria-current="date"
 * sulla cella di oggi.
 */

.cec-event-calendar
[role="gridcell"][aria-current="date"] {

    background: #f3faf5;
}


.cec-event-calendar
[role="gridcell"][aria-current="date"]
[aria-hidden="true"] {

    background: #48AF66;

    color: #fff;

    font-weight: 700;
}


/* =========================================================
   GIORNI CON EVENTO
   ========================================================= */

/*
 * Il nostro JS aggiunge .cec-has-event alla cella.
 */

.cec-event-calendar
[role="gridcell"].cec-has-event {

    cursor: pointer;
}


/*
 * Pallino verde sotto il numero.
 */

.cec-event-calendar
[role="gridcell"].cec-has-event::after {

    content: "";

    position: absolute;

    left: 50%;
    bottom: 4px;

    width: 5px;
    height: 5px;

    margin-left: -2.5px;

    border-radius: 50%;

    background: #E09900;
}


/*
 * Hover sugli eventi
 */

.cec-event-calendar
[role="gridcell"].cec-has-event:hover {

    background: #f3faf5;
}


/*
 * Giorno con evento: numero in grassetto
 */

.cec-event-calendar
[role="gridcell"].cec-has-event
[aria-hidden="true"] {

    font-weight: 700;
}


/* =========================================================
   GIORNO SELEZIONATO
   ========================================================= */

.cec-event-calendar
[role="gridcell"].cec-selected-day {

    background: #48AF66 !important;
}


.cec-event-calendar
[role="gridcell"].cec-selected-day
[aria-hidden="true"] {
    background: #48AF66 !important;
    color: #fff !important;
    font-weight: 700;
}


/* =========================================================
   NASCONDI GLI EVENTI INTERNI
   ========================================================= */

/*
 * Noi non vogliamo mostrare il titolo dell'evento
 * dentro la casella del giorno.
 *
 * Vogliamo solamente il pallino e poi i dettagli sotto.
 */

.cec-event-calendar .fc-event {
    display: none !important;
}

/* =========================================================
   DETTAGLIO EVENTI DEL GIORNO
   ========================================================= */

.cec-day-events {
    margin-top: 25px;
}

.cec-day-events-inner {
    padding-top: 0;
}

.cec-day-events-inner h3 {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.3;
    padding-bottom:0;
    font-weight: 600;
    color: #666;
}


/* Singolo evento */

.cec-day-event {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 2px solid #d5d5d5;
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.cec-day-event {
    display: flex;
    flex-direction: column;
}

.cec-day-event:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

/* Immagine */

.cec-day-event-image {
    flex: 0 0 85px;
    width: 85px;
}


.cec-day-event-image img {
    display: block;
    /*width: 85px;
    height: 65px;*/
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
}
.cec-day-event-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cec-day-event-image img {
    width: 100%;
    /*height: 180px;*/
    object-fit: contain;
    object-position: center;
}
.cec-day-event-description{
  font-size:12px;
  line-height:1.35;
}
/* Contenuto */

.cec-day-event-content {
    flex: 1;
    min-width: 0;
}


.cec-day-event-date {
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    color: #48AF66;
    text-transform: uppercase;
}


.cec-day-event-content h4 {
    margin: 0;
    padding-bottom:5px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #666;
}


/* =========================================================
   PROSSIMI EVENTI
   ========================================================= */

.cec-upcoming-events {
    width: 100%;
    color: #666;
}


.cec-upcoming-events h3 {

    margin: 0 0 18px;

    font-size: 19px;
    line-height: 1.3;

    font-weight: 600;

    color: #666;
}


.cec-upcoming-event {

    display: flex;

    align-items: flex-start;

    gap: 14px;

    padding-bottom: 16px;
    margin-bottom: 16px;

    border-bottom: 1px solid #eeeeee;
}


.cec-upcoming-event:last-child {
    margin-bottom: 0;
}


.cec-upcoming-image {
    /*flex: 0 0 85px;
    width: 85px;*/
}


.cec-upcoming-image img {
    display: block;
    /*width: 85px;
    height: 65px;*/
    object-fit: cover;
    border-radius: 6px;
}


.cec-upcoming-content {
    flex: 1;
    min-width: 0;
}


.cec-upcoming-date {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #48AF66;
    text-transform: uppercase;
}


.cec-upcoming-content h4 {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #666;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .cec-event-calendar [role="heading"] {
        font-size: 17px !important;
    }

    .cec-event-calendar
    [role="gridcell"]
    [aria-hidden="true"] {

        width: 25px;
        height: 25px;

        font-size: 11px !important;
    }

    .cec-event-calendar [role="columnheader"] {
        font-size: 9px !important;
    }

    .cec-day-event,
    .cec-upcoming-event {
        gap: 10px;
    }

    .cec-day-event-image,
    .cec-upcoming-image {
        flex: 0 0 70px;
        width: 70px;
    }

    .cec-day-event-image img,
    .cec-upcoming-image img {
        width: 70px;
        height: 55px;
    }
}

.cec-event-status {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-bottom: 4px;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;

    color: #48AF66;
}

.cec-event-status-dot {
    width: 5px;
    height: 5px;

    flex: 0 0 5px;

    border-radius: 50%;

    background: #E09900;
}

.cec-no-events {
    margin: 0;

    font-size: 13px;
    line-height: 1.5;

    color: #999;
}

.cec-events-heading {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 18px;
}

.cec-events-heading h3 {
    margin: 0;
}

.cec-back-to-upcoming {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: #48AF66;
    color: #fff;

    font-size: 18px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.cec-back-to-upcoming:hover {
    background: #F59C00;
    transform: translateX(-2px);
}
.fc-classic-yth{
    gap:0;
}

/* =========================================================
   TABLET - CALENDARIO + EVENTI AFFIANCATI
   ========================================================= */

@media (min-width: 768px) and (max-width: 980px) {

    .cec-calendar-wrapper {
        display: flex;
        align-items: flex-start;
        gap: 35px;
    }

    /* Calendario */

    .cec-calendar-wrapper .cec-event-calendar {
        flex: 0 0 300px;
        width: 300px;
        max-width: 300px !important;
    }

    /* Eventi del giorno */

    .cec-calendar-wrapper .cec-day-events {
        flex: 1;
        min-width: 0;
        margin-top: 0;
    }

}