/*
 * datepicker-custom.css
 * Ripristina gli stili del wrapper e del bottone toggle di Tempus Dominus v6
 * che il preflight di Tailwind CSS v4 azzera (il bottone .td-datepicker-toggle
 * non ha classi Bootstrap e quindi perde appearance, cursor, padding).
 *
 * Questo file viene caricato DOPO tailwind.css → stili non-layered che battono
 * il @layer base del preflight.
 */

/* ── Wrapper ───────────────────────────────────────────────────────────── */
.td-datepicker {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
}

/* Fa sì che l'input occupi tutto lo spazio disponibile lasciando posto al bottone */
.td-datepicker input.datepicker {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* ── Bottone toggle calendario ──────────────────────────────────────────── */
.td-datepicker-toggle {
    cursor: pointer;
    background-color: #e9ecef;
    border: 1px solid #d2d2d2;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    /* Ripristina quel che Tailwind preflight azzera sui <button> */
    -webkit-appearance: none;
    appearance: none;
    font-size: 1rem;
    font-family: inherit;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.td-datepicker-toggle:hover,
.td-datepicker-toggle:focus {
    background-color: #d3d6da;
    color: #333;
    outline: none;
}

.td-datepicker-toggle:active {
    background-color: #c6c9cd;
}

/* ── Popup calendario (z-index sopra Bootstrap modals = 1050) ───────────── */
.tempus-dominus-widget {
    z-index: 1055 !important;
}
