/* ═══════════════════════════════════════════════════════════════════════════
   mdg98-new-booking-calendar — Stili personalizzati
  ! Bootstrap 5 viene caricato dal CDN nel file principale del plugin.
   Modifica qui l'aspetto del calendario e dell'area admin.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── COLORAZIONE GIORNI ─────────────────────────────────────────────────────── */
/* Colori identici al vecchio plugin (calendar.css + logica dayRender) */

/* Prenotazione allday in attesa → fc-waiting del vecchio */
.fc .mdgbc-day-waiting {
    background-color: rgb(253, 227, 167) !important;
}

/* Prenotazione allday confermata, o tutte le fasce occupate → rosso */
.fc .mdgbc-day-red {
    background-color: rgba(241, 130, 141, 1) !important;
}

/* Almeno una fascia oraria occupata (non tutte) → fc-half-full del vecchio */
.fc .mdgbc-day-half-full {
    background-color: rgba(255, 246, 143, 1) !important;
}

/* ─── CALENDARIO FULLCALENDAR ─────────────────────────────────────────────── */

/*! Prenotazione "in attesa" (approvato = 0) → giallo */
.fc-waiting,
.fc-waiting .fc-event-main {
    background-color: #ffc107 !important;
    border-color:     #e0a800 !important;
    color:            #212529 !important;
}

/* ─── FRONTEND: WRAPPER ──────────────────────────────────────────────────────
   Modifica padding e sfondo generale del componente shortcode
   ─────────────────────────────────────────────────────────────────────────── */
.mdgbc-wrapper {
    padding: 2rem 0;
    color: #212529;
}

/* ─── FRONTEND: CONTENITORE CALENDARIO ──────────────────────────────────────
   Card sottile intorno a FullCalendar
   ─────────────────────────────────────────────────────────────────────────── */
#mdgbc-calendar {
    background:    #fff;
    border-radius: 0.75rem;
    box-shadow:    0 1px 12px rgba(0,0,0,.07);
    padding:       1.25rem;
    overflow:      hidden;
}
#mdgbc-calendar td{
    border-radius: 0.5rem;
    border: 1px solid #9ca3af;
}

/* Bordi grid molto chiari */
.fc .fc-scrollgrid          { border: none !important; }
.fc .fc-scrollgrid-section > * { border: none !important; }
.fc td, .fc th              { border-color: #f2f2f2 !important; }

/* Toolbar (mese + frecce) */
.fc .fc-toolbar-title {
    font-size:   1.05rem;
    font-weight: 700;
    color:       #212529;
}
.fc .fc-button {
    font-size:        0.82rem;
    padding:          0.25rem 0.65rem;
    background-color: #f8f9fa;
    border-color:     #dee2e6;
    color:            #495057;
    box-shadow:       none !important;
}
.fc .fc-button:hover,
.fc .fc-button:focus {
    background-color: #e9ecef;
    border-color:     #dee2e6;
    color:            #212529;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #c00076;
    border-color:     #c00076;
    color:            #fff;
}

/* Intestazioni giorni settimana */
.fc .fc-col-header-cell {
    font-size:      0.75rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color:          #9ca3af;
    background:     transparent;
    border:         none !important;
    padding:        0.5rem 0;
}

/* Numeri del giorno */
.fc .fc-daygrid-day-number {
    font-size: 0.82rem;
    color:     #6b7280;
    padding:   0.3rem 0.5rem;
}

/* Oggi */
.fc .fc-day-today {
    background-color: #fdf0f8 !important;
}
.fc .fc-day-today .fc-daygrid-day-number {
    background:    #c00076;
    color:         #fff;
    border-radius: 50%;
    width:         1.5rem;
    height:        1.5rem;
    display:       flex;
    align-items:   center;
    justify-content: center;
    padding:       0;
    margin:        0.2rem;
    font-size:     0.78rem;
    font-weight:   700;
}

/* Hover giorno selezionabile */
.fc .fc-daygrid-day:not(.fc-day-disabled):hover {
    background-color: #fdf0f8;
    cursor: pointer;
    transition: background-color .1s;
}

/* Range selezionato (highlight) */
.fc .fc-highlight {
    background-color: rgba(192,0,118,.1) !important;
}

/* Giorni disabilitati (passati) */
.fc .fc-day-disabled {
    background-color: #fafafa !important;
    opacity: .5;
}

/* ─── FRONTEND: FEEDBACK SELEZIONE ──────────────────────────────────────────
   Alert informativo che mostra data e fascia selezionate
   ─────────────────────────────────────────────────────────────────────────── */
#mdgbc-current-selection {
    font-size:    0.875rem;
    font-weight:  500;
    background:   #fdf0f8;
    border:       1.5px solid #f0a8d9;
    border-radius: 0.5rem;
    color:        #7a0049;
    padding:      0.75rem 1rem;
    margin-bottom: 1.25rem;
    transition:   all .15s;
}

/* ─── FRONTEND: TITOLO FORM ──────────────────────────────────────────────── */
.mdgbc-wrapper h3 {
    font-size:    1rem;
    font-weight:  700;
    color:        #374151;
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
}

/* ─── FRONTEND: CAMPI FORM ───────────────────────────────────────────────── */
.mdgbc-wrapper .form-label {
    font-size:     0.8rem;
    font-weight:   600;
    color:         #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}
.mdgbc-wrapper .form-control,
.mdgbc-wrapper .form-select {
    border:        1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    padding:       0.55rem 0.875rem;
    font-size:     0.9rem;
    color:         #212529;
    background:    #fff;
    transition:    border-color .15s, box-shadow .15s;
}
.mdgbc-wrapper .form-control:focus,
.mdgbc-wrapper .form-select:focus {
    border-color: #e67bc0;
    box-shadow:   0 0 0 3px rgba(192,0,118,.08);
    outline:      none;
}
.mdgbc-wrapper .form-check-input:checked {
    background-color: #c00076;
    border-color:     #c00076;
}

/* ─── FRONTEND: PULSANTE SUBMIT ──────────────────────────────────────────── */
#mdgbc-submit {
    padding:       0.7rem 1.5rem;
    font-size:     0.9rem;
    font-weight:   700;
    letter-spacing: 0.04em;
    border-radius: 0.5rem;
    background:    #c00076;
    border-color:  #c00076;
    transition:    transform .12s, box-shadow .12s;
}
#mdgbc-submit:hover:not(:disabled) {
    transform:  translateY(-1px);
    box-shadow: 0 4px 14px rgba(192,0,118,.35);
}
#mdgbc-submit:active {
    transform: translateY(0);
}

/* ─── FRONTEND: MODALE FASCE ORARIE ─────────────────────────────────────── */
#mdgbc-timeslot-modal .modal-content {
    border:        none;
    border-radius: 0.75rem;
    box-shadow:    0 8px 30px rgba(0,0,0,.12);
}
#mdgbc-timeslot-modal .modal-header {
    border-bottom: 1px solid #f2f2f2;
    padding:       1rem 1.25rem;
}
#mdgbc-timeslot-modal .modal-title {
    font-size:   0.95rem;
    font-weight: 700;
    color:       #212529;
}
#mdgbc-timeslot-modal .modal-body {
    padding: 1rem 1.25rem;
}
#mdgbc-timeslot-modal .modal-footer {
    border-top: 1px solid #f2f2f2;
    padding:    0.75rem 1.25rem;
}

/* Righe fascia oraria nella lista */
#mdgbc-timeslot-modal .list-group-item {
    font-size:     0.9rem;
    border-color:  #f2f2f2;
    padding:       0.65rem 0.75rem;
    transition:    background .1s;
}
#mdgbc-timeslot-modal .list-group-item:hover:not(.disabled) {
    background: #fdf0f8;
}
#mdgbc-timeslot-modal .list-group-item.disabled {
    pointer-events: none;
    opacity: .55;
}
#mdgbc-timeslot-modal .form-check-input {
    width:  1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

/* ─── ADMIN — META BOX ITEM ───────────────────────────────────────────────── */
/* WP admin sovrascrive alcuni stili Bootstrap — forza la larghezza corretta */
#mdgbc-admin-tab-content,
#mdgbc-admin-tab-content .tab-pane,
#mdgbc-admin-tab-content .card {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

/* Bootstrap modals in WP admin: z-index superiore all'interfaccia WP */
.mdgbc-wrapper ~ .modal,
#mdgbc-confirm-action-modal,
#mdgbc-notify-modal,
#mdgbc-mail-modal,
#mdgbc-delete-modal,
#mdgbc-field-modal {
    z-index: 100050;
}
.modal-backdrop {
    z-index: 100040;
}
/* Rimuove il padding interno del meta box WP per dare spazio ai tab */
.post-type-item #mdgbc_item_meta .inside {
    padding: 0;
    margin:  0;
}

/* Tab bar Bootstrap 5 */
#mdgbc-admin-tabs {
    padding: 0.75rem 0.75rem 0;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}
#mdgbc-admin-tabs .nav-link {
    font-size: 0.85rem;
    font-weight: 300;
    color: #495057;
    border: none;
    border-radius: 0.4rem 0.4rem 0 0;
}
#mdgbc-admin-tabs .nav-link.active {
    font-weight: 600;
}

/* Contenuto tab */
#mdgbc-admin-tab-content {
    padding: 1.25rem;
}

/* ─── ADMIN — LISTA PRENOTAZIONI ──────────────────────────────────────────── */

/* Hover card prenotazione */
.card {
    transition: box-shadow .15s;
}
.card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

/* ─── ADMIN — FORM BUILDER PREVIEW ───────────────────────────────────────────── */
/* Ogni card occupa la colonna Bootstrap del campo: preview del layout reale del form */

.mdgbc-field-item {
    background:   #fff;
    border:       1.5px solid #e5e7eb;
    /* border-left:  3px solid #c00076; */
    border-radius: 0.4rem;
    padding:      0.55rem 0.7rem;
    display:      flex;
    justify-content: space-between;
    align-items:  center;
    min-height:   52px;
    /* transition:   border-color .12s, box-shadow .12s; */
    transition:   box-shadow .12s;
}
.mdgbc-field-item:hover {
    /* border-color: #c00076; */
    box-shadow:   0 2px 8px rgba(192,0,118,.08);
}
/* Campi hidden: tratteggiati e più leggeri */
.mdgbc-field-hidden {
    border-left-style: dashed;
    border-style:      dashed;
    opacity:           .6;
}
.mdgbc-field-info    { overflow: hidden; }
.mdgbc-field-label {
    font-size:     .85rem;
    font-weight:   600;
    color:         #212529;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}
.mdgbc-field-meta {
    display:     flex;
    gap:         .4rem;
    margin-top:  2px;
    align-items: center;
}
.mdgbc-field-type {
    font-size:      .68rem;
    color:          #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.mdgbc-field-width {
    font-size:   .68rem;
    /* color:       #c00076; */
    font-weight: 600;
}
.mdgbc-field-inlista {
    font-size:    .65rem;
    background:   #fdf0f8;
    /* color:        #7a0049; */
    border-radius: .2rem;
    padding:      .1rem .35rem;
}
.mdgbc-field-actions {
    display:     flex;
    gap:         .25rem;
    flex-shrink: 0;
    margin-left: .5rem;
}
.mdgbc-field-actions button {
    background:    transparent;
    border:        1px solid #e5e7eb;
    border-radius: .3rem;
    padding:       .2rem .45rem;
    font-size:     .78rem;
    color:         #9ca3af;
    cursor:        pointer;
    line-height:   1.2;
    transition:    all .1s;
}
/* .mdgbc-field-actions button:first-child:hover {
    border-color: #c00076;
    color:        #c00076;
    background:   #fdf0f8;
}
.mdgbc-field-actions button:last-child:hover {
    border-color: #fca5a5;
    color:        #dc2626;
    background:   #fef2f2;
} */
