@charset "utf-8";



/* --- 1. STRUTTURA GENERALE --- */
.calendar-liturgic {
    padding: 18px;
    background-color: #f4f4f9;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

/* Centratura Input Anno */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.controls input {
    display: block;
    text-align: center;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- 2. LEGENDA: CENTRATURA E COLORI --- */
.legend {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center;
    gap: 20px;
    margin: 20px auto;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    max-width: fit-content;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 15px;
}

/* Quadratini Colore */
.color-box {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 1px solid #333 !important;
    border-radius: 3px;
    vertical-align: middle;
}

/* Classi colori (Sia per Legenda che per Tabella) */
.white, .liturgical-white { background-color: #ffffff !important; }
.red, .liturgical-red { background-color: #ff0000 !important; }
.violet, .liturgical-violet { background-color: #A020F0 !important; }
.green, .liturgical-green { background-color: #008000 !important; }

/* --- 3. TABELLA DESKTOP --- */
#calendar-output table {
    width: 100%;
    border-collapse: separate !important; 
    border-spacing: 0;
    background-color: #F8F4E3;
    margin-top: 0px;
    border: 3px solid #ccc !important;
    border-radius: 8px;
}

/* RIGHE TRA I GIORNI */
#calendar-output td, #calendar-output th {
    padding: 8px 5px;
    border-bottom: 1px solid #ccc !important;
    border-right: 1px solid #ccc !important;
    color: #333;
}

/* Rimuove bordo destro dall'ultima colonna */
#calendar-output td:last-child, #calendar-output th:last-child {
    border-right: none !important;
}

/* STACCO TRA I MESI (Fascia Bianca) */
.month-separator td {
    background-color: #530D0D !important;
    color: #DAA520 !important;
    text-align: center;
    font-weight: bold;
    font-size: 28px !important;
    padding: 12px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Crea lo spazio pulito tra i mesi */
    border-top: 40px solid #f4f4f9 !important;
    border-right: none !important;
}

/* No stacco per il primo mese (Gennaio) */
#calendar-output tr:first-child .month-separator td {
    border-top: none !important;
}

/* Intestazioni Colonne */
.column-header th {
    background-color: #eee;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

/* --- 4. EVIDENZIAZIONI RIGHE --- */
.sunday { background-color: #fff9c4 !important; }
.agostiniano-bg { background-color: #e3f2fd !important; }
.liturgical-solennity { background-color: #fffde7; }

/* --- 5. PULSANTI E CONTENITORI AZIONI --- */
.calendar-actions {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Aumentato lo spazio tra i blocchi di pulsanti */
    align-items: center;
    margin-bottom: 30px;
    padding: 10px;
}

/* Distanzia i pulsanti dentro lo stesso blocco */
.calendar-actions div, .calendar-actions p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; 
    margin: 25px 1;
}

.btn-style {
    background-color: white;
    border: 2px solid #4a6741;
    padding: 12px 20px; /* Più grandi per essere cliccati meglio su mobile */
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    min-width: 200px;
    transition: 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media screen and (max-width: 524px) {
	
	
	#calendar-output tr:not(.month-separator) {
    margin-left: 2px !important;  /* Piccolo margine a sinistra */
    margin-right: 2px !important; /* Piccolo margine a destra */
    width: calc(100% - 4px) !important; /* Stringe la card per far vedere i bordi */
}
	
	
	
    /* 1. Reset totale del contenitore per evitare tagli a destra */
	.top-bar .site-title {
        font-size: 25px; /* Ancora più piccolo */
    }
	.top-bar .logo-container img {
        width: 60px; /* Riduci ulteriormente la dimensione del logo */
    }

    .top-bar .search-bar input[type="text"],
    .top-bar .search-bar button {
        padding: 6px 10px; /* Padding minimale */
        font-size: 12px;
    }
    .calendar-liturgic {
        padding: 5px !important;
        margin: 1px !important;
        width: 98% !important;
        overflow-x: hidden !important; /* Impedisce lo scroll laterale */
    }
#calendar-output tr:not(.month-separator) {
    margin-left: 2px !important;  /* Piccolo margine a sinistra */
    margin-right: 2px !important; /* Piccolo margine a destra */
    width: calc(98% - 1px) !important; /* Stringe la card per far vedere i bordi */
}
    /* 2. Nascondi l'intestazione (Tipo, Data, ecc.) */
    .column-header, thead {
        display: none !important;
    }

    /* 3. Forza ogni elemento a riga singola (Block layout) */
    #calendar-output table, 
    #calendar-output tbody, 
    #calendar-output tr, 
    #calendar-output td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. MESE: Finalmente al centro e pieno schermo */
    .month-separator {
        margin: 20px 0 10px 0 !important;
        background-color: #530D0D !important;
    }

    .month-separator td {
        text-align: center !important;
        padding: 12px 5px !important;
        color: #DAA520 !important;
        font-size: 18px !important;
        font-weight: bold !important;
        border: none !important;
        /* Rimuove lo spazio che Dreamweaver aggiunge a sinistra */
        margin: 0 !important; 
    }
    
    /* Elimina la scritta "Tipo:" o "O:" dal titolo mese */
    .month-separator td::before {
        content: none !important;
        display: none !important;
    }

    /* 5. GIORNI: Card compatte e pulite */
    #calendar-output tr:not(.month-separator) {
        margin-bottom: 8px !important;
        border: 1px solid #ddd !important;
        border-radius: 6px;
        background-color: #fff;
        padding: 5px 0 !important;
    }

    #calendar-output td {
        position: relative !important;
        padding: 5px 10px 5px 105px !important; /* Spazio per etichetta */
        min-height: 28px !important;
        border: none !important;
        border-bottom: 1px solid #f2f2f2 !important;
        font-size: 13px !important;
        text-align: left !important;
    }

    /* 6. ETICHETTE (DATA, GIORNO, ecc.) */
    #calendar-output td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 5px;
        width: 90px;
        font-weight: bold;
        color: #888;
        font-size: 11px;
        text-transform: uppercase;
    }
	/* Etichette Card Mobile */
    #calendar-output td:nth-of-type(1)::before { content: "Tipo:"; }
    #calendar-output td:nth-of-type(2)::before { content: "Data:"; }
    #calendar-output td:nth-of-type(3)::before { content: "Giorno:"; }
    #calendar-output td:nth-of-type(4)::before { content: "Mese:"; }
    #calendar-output td:nth-of-type(5)::before { content: "Tempo:"; }
    #calendar-output td:nth-of-type(6)::before { content: "Celebrazione:"; }
    #calendar-output td:nth-of-type(7)::before { content: "Colore:"; }
}