/* DTL Prenotazione - Frontend Styles */
.dtl-pren-wrapper { width: 100%; max-width: 480px; margin: 0 auto; background: #dedede; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.08); font-family: inherit; }
.dtl-cal-container { width: 100%; background: #efefef; }
.dtl-cal-header { background: #ba1269; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; min-height: 54px; box-sizing: border-box; }
.dtl-cal-month-title { font-size: 17px; font-weight: 500; letter-spacing: .4px; text-transform: uppercase; color: #fff; margin: 0 auto; }
.dtl-cal-nav, .dtl-cal-nav:focus, .dtl-cal-nav:hover { background: transparent !important; border: none !important; color: #fff !important; padding: 4px !important; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important; }
.dtl-cal-nav-placeholder { width: 28px; height: 28px; display: inline-block; }
.dtl-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #7c0034; color: #fff; text-align: center; padding: 9px 0; }
.dtl-cal-weekday { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.dtl-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: #efefef; }
.dtl-cal-cell { aspect-ratio: 1 / .92; min-height: 54px; display: flex; align-items: center; justify-content: center; border-right: 1px solid #ececec; border-bottom: 1px solid #ececec; box-sizing: border-box; user-select: none; transition: background .15s ease; }
.dtl-cal-cell:nth-child(7n) { border-right: none; }
.dtl-cal-num { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 18px; font-weight: 400; line-height: 1; transition: all .15s ease; }
.dtl-cal-cell.is-outside, .dtl-cal-cell.is-disabled { background: #f0f0f0; color: #bcbcbc; cursor: default; }
.dtl-cal-cell.is-available { background: #fff; color: #111; cursor: pointer; }
.dtl-cal-cell.is-available:hover { background: #f5e9f0; }
.dtl-cal-cell.is-today .dtl-cal-num { border: 2px solid #2ea2cc; }
.dtl-cal-cell.is-selected { background: #dcdcdc !important; }
.dtl-cal-cell.is-selected .dtl-cal-num { background: #fff; color: #000; font-weight: 500; box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* Card Appuntamento */
.dtl-pren-day-card-wrap { padding: 16px 16px 18px; }
.dtl-pren-day-card-wrap:empty { display: none; padding: 0; }
.dtl-pren-card.malia-custom-appt-list { background: #fff !important; border-radius: 14px !important; padding: 22px 24px !important; margin: 0 !important; box-shadow: 0 3px 12px rgba(0,0,0,.05) !important; border: none !important; text-align: left !important; box-sizing: border-box !important; }
.dtl-pren-card .malia-service-block { text-align: left !important; margin-bottom: 18px !important; }
.dtl-pren-card .malia-service-sub, .dtl-pren-card .malia-datetime-sub { display: block !important; font-size: 14px !important; font-weight: 400 !important; color: #444 !important; line-height: 1.3 !important; margin-bottom: 3px !important; }
.dtl-pren-card .malia-service-title { display: block !important; font-size: 20px !important; font-weight: 700 !important; color: #000 !important; line-height: 1.25 !important; margin: 0 !important; padding: 0 !important; }
.dtl-pren-card .malia-datetime-block { text-align: left !important; margin-bottom: 16px !important; }
.dtl-pren-card .malia-datetime-val { display: block !important; font-size: 19px !important; font-weight: 700 !important; color: #000 !important; line-height: 1.25 !important; margin: 0 !important; }
.dtl-pren-card .malia-card-divider { border: none !important; border-top: 1px solid #e2e8f0 !important; margin: 16px 0 !important; width: 100% !important; display: block !important; }
.dtl-pren-card .malia-btn-wrap button.new-appt, .dtl-btn-primary { display: block !important; width: 100% !important; max-width: 340px !important; margin: 0 auto !important; background: #7c0134 !important; color: #fff !important; font-size: 16px !important; font-weight: 600 !important; padding: 13px 20px !important; border-radius: 5px !important; border: none !important; cursor: pointer !important; text-align: center !important; line-height: 1.4 !important; transition: background .15s ease; }
.dtl-pren-card .malia-btn-wrap button.new-appt:hover, .dtl-btn-primary:hover { background: #5c0126 !important; }
.dtl-slot-row-spaced { margin-top: 22px; padding-top: 18px; border-top: 2px dashed #ececec; }
.dtl-no-slots-msg { margin: 10px 0 0; font-size: 14px; color: #555; }

/* Modal Popup */
.dtl-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 999999; display: none; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box; backdrop-filter: blur(2px); }
.dtl-modal-overlay.is-open { display: flex; }
.dtl-modal-box { background: #fff; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: 14px; padding: 22px 22px 20px; position: relative; box-shadow: 0 16px 40px rgba(0,0,0,.25); box-sizing: border-box; text-align: left; }
.dtl-modal-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: none !important; background: #f3f4f6 !important; color: #333 !important; border-radius: 50% !important; font-size: 22px !important; line-height: 1 !important; padding: 0 !important; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dtl-modal-close:hover { background: #e5e7eb !important; }
.dtl-modal-header { margin-bottom: 14px; padding: 0 28px 12px 0; border-bottom: 1px solid #ececec; }
.dtl-modal-badge { display: block; font-size: 13px; color: #555; margin-bottom: 2px; }
.dtl-modal-title { margin: 0 0 6px !important; font-size: 18px !important; font-weight: 700 !important; color: #000 !important; line-height: 1.25 !important; }
.dtl-modal-datetime { display: inline-block; background: #fdf2f8; color: #7c0134; font-weight: 700; font-size: 13.5px; padding: 4px 10px; border-radius: 6px; }
.dtl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.dtl-form-field { display: flex; flex-direction: column; }
.dtl-form-field label { font-size: 12.5px; font-weight: 600; color: #333; margin-bottom: 4px; }
.dtl-form-field input, .dtl-form-field select { width: 100%; padding: 9px 11px !important; font-size: 14px !important; border: 1px solid #d1d5db !important; border-radius: 6px !important; background: #fff !important; color: #111 !important; box-sizing: border-box !important; height: 38px !important; }
.dtl-form-field input:focus, .dtl-form-field select:focus { outline: none !important; border-color: #ba1269 !important; box-shadow: 0 0 0 2px rgba(186,18,105,.15) !important; }
.dtl-form-feedback { margin-top: 12px; padding: 10px 12px; border-radius: 6px; font-size: 13.5px; line-height: 1.4; }
.dtl-form-feedback.is-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dtl-form-feedback.is-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.dtl-modal-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
.dtl-btn-cancel { flex: 0 0 auto; background: #f3f4f6 !important; color: #374151 !important; border: 1px solid #d1d5db !important; border-radius: 5px !important; padding: 13px 18px !important; font-size: 15px !important; font-weight: 600 !important; cursor: pointer !important; text-align: center !important; line-height: 1.4 !important; transition: background .15s ease; }
.dtl-btn-cancel:hover { background: #e5e7eb !important; color: #111827 !important; }
.dtl-btn-primary { flex: 1 1 auto; max-width: 100% !important; margin: 0 !important; }

@media (max-width: 540px) {
    .dtl-cal-cell { min-height: 46px; }
    .dtl-cal-num { width: 36px; height: 36px; font-size: 16px; }
    .dtl-modal-box { padding: 18px 16px 16px; max-height: 90vh; }
    .dtl-form-grid { gap: 8px 10px; }
    .dtl-form-field input, .dtl-form-field select { height: 36px !important; padding: 7px 9px !important; }
}
@media (max-width: 380px) { .dtl-form-grid { grid-template-columns: 1fr; } }
