.mcm-calendar-widget {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-family: inherit;
    box-sizing: border-box;
}
.mcm-calendar-widget *,
.mcm-calendar-widget *::before,
.mcm-calendar-widget *::after {
    box-sizing: border-box;
}
.mcm-calendar-widget h3 {
    margin-top: 0;
}
.mcm-price {
    color: #555;
}
.mcm-min-nights-note {
    color: #8a6d3b;
    font-size: 13px;
    margin-top: -8px;
}
.mcm-datepicker-container {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.mcm-datepicker-container label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 4px;
}
.mcm-datepicker-container input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.mcm-availability-message {
    margin: 10px 0;
    font-weight: 600;
}

/* Selettore ospiti e configurazione alternativa */
.mcm-guests-config-container {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mcm-guests-config-container select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.mcm-special-config-label {
    font-size: 14px;
}
.mcm-availability-message.mcm-ok {
    color: #1a7f37;
}
.mcm-availability-message.mcm-error {
    color: #b32d2e;
}
.mcm-booking-form label {
    display: block;
    margin-bottom: 12px;
}
.mcm-booking-form input[type="text"],
.mcm-booking-form input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.mcm-total-price {
    font-size: 16px;
    font-weight: 700;
}
.mcm-submit-booking {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}
.mcm-submit-booking:hover {
    background: #33334d;
}
.mcm-submit-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.mcm-payment-choice {
    text-align: center;
}
.mcm-payment-choice p {
    margin: 0 0 12px;
    font-weight: 600;
}
.mcm-pay-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    margin: 0 6px 8px;
}
.mcm-pay-btn:hover {
    background: #33334d;
}
.mcm-pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.mcm-pay-paypal {
    background: #003087;
}
.mcm-pay-paypal:hover {
    background: #002266;
}
.mcm-booking-result {
    margin-top: 16px;
}

/* Modulo registrazione ospiti */
.mcm-guest-registration {
    max-width: 600px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.mcm-guests-list {
    margin: 12px 0;
}
.mcm-guest-summary {
    padding: 8px 12px;
    background: #eef7ee;
    border-radius: 4px;
    margin-bottom: 6px;
    color: #1a7f37;
}
.mcm-house-manual-links {
    background: #fff8e6;
    border: 2px solid #e8b64a;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
    text-align: center;
}
.mcm-house-manual-links p {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    color: #7a5200;
}
.mcm-house-manual-links .mcm-manual-lang-select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-right: 8px;
    font-size: 15px;
}
.mcm-house-manual-links .mcm-open-manual {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.mcm-guest-form .mcm-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.mcm-guest-form .mcm-form-row label {
    flex: 1;
    min-width: 200px;
    font-size: 14px;
}
.mcm-guest-form input[type="text"],
.mcm-guest-form input[type="date"],
.mcm-guest-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 4px;
}
.mcm-autocomplete-results {
    position: relative;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 180px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}
.mcm-autocomplete-item {
    padding: 8px;
    cursor: pointer;
}
.mcm-autocomplete-item:hover {
    background: #f0f0f0;
}
.mcm-submit-guest {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
}
.mcm-guest-form-result {
    margin-top: 10px;
    font-weight: 600;
}
.mcm-guest-form-result.mcm-ok {
    color: #1a7f37;
}
.mcm-guest-form-result.mcm-error {
    color: #b32d2e;
}

/* Selettore lingua */
.mcm-lang-switcher {
    margin-bottom: 16px;
    text-align: right;
}
.mcm-lang-switcher select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Riquadro info soggiorno + contatore ospiti */
.mcm-stay-info-box {
    background: #f0f4ff;
    border: 1px solid #c7d6ff;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 6px;
}
.mcm-guests-count-line {
    display: inline-block;
    margin-top: 4px;
    font-weight: 600;
    color: #1a1a2e;
}
.mcm-add-more-note {
    font-size: 13px;
    color: #666;
    margin: 6px 0 16px;
}
.mcm-doc-note {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 4px 0 12px;
}
.mcm-doc-note-capo {
    background: #fff7e6;
    color: #7a5a12;
}
.mcm-doc-note-member {
    background: #eef8f0;
    color: #1a7f37;
}

/* Selettore ospiti e configurazione alternativa */
.mcm-guests-config-container {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mcm-guests-config-container select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.mcm-special-config-label {
    font-size: 14px;
}
.mcm-special-config-label.mcm-disabled {
    opacity: 0.5;
}
.mcm-special-config-note {
    font-size: 12px;
    color: #777;
    margin: 0;
}
.mcm-guests-config-container input.mcm-coupon-code {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}
.mcm-coupon-message {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}
.mcm-coupon-message.mcm-ok {
    color: #1a7f37;
}
.mcm-coupon-message.mcm-error {
    color: #b32d2e;
}

/* Griglia calendario mensile */
.mcm-cal-grid-container {
    margin-bottom: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
}
.mcm-cal-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}
.mcm-cal-grid-header button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.mcm-cal-grid-header button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.mcm-cal-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.mcm-cal-grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.mcm-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.2;
    border: 1px solid rgba(0,0,0,0.08);
    font-weight: 600;
}
.mcm-cal-day small {
    font-size: 9px;
    opacity: 0.85;
    font-weight: 400;
}
.mcm-cal-day-empty {
    background: transparent;
    border: none;
}
.mcm-cal-day-past {
    background: #f0f0f0;
    color: #b0b0b0;
    border-color: transparent;
    font-weight: 400;
}
.mcm-cal-day-available {
    background: #9fe3ac;
    color: #0d4d1c;
    cursor: pointer;
}
.mcm-cal-day-available:hover {
    background: #7fd690;
}
.mcm-cal-day-booked {
    background: #f4a3a1;
    color: #6e1615;
    border-color: transparent;
}
.mcm-cal-day-selected {
    background: #1a1a2e !important;
    color: #fff !important;
    cursor: pointer;
    border-color: #1a1a2e !important;
}
.mcm-cal-day-in-range {
    background: #9dbcf2;
    color: #10204d;
    cursor: pointer;
}
.mcm-cal-day-too-short {
    background: repeating-linear-gradient(45deg, #ecd9a0, #ecd9a0 4px, #dfc57a 4px, #dfc57a 8px);
    color: #5c4813;
    cursor: not-allowed;
}
.mcm-cal-grid-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #444;
}

@media (max-width: 400px) {
    .mcm-calendar-widget {
        padding: 14px;
    }
    .mcm-cal-day {
        font-size: 11px;
    }
    .mcm-cal-grid-header {
        font-size: 14px;
    }
}
.mcm-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mcm-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.15);
    box-sizing: border-box;
}
.mcm-legend-available {
    background: #9fe3ac;
}
.mcm-legend-booked {
    background: #f4a3a1;
}

/* Con il riquadro "Offerta settimanale" in mezzo, la nota del soggiorno
   minimo non deve risalire (margine negativo pensato per stare sotto il prezzo) */
.mcm-weekly-note + .mcm-min-nights-note {
    margin-top: 0;
}


/* ---- Elenco "Settimane disponibili" [mcm_settimane] ----
   Stesso riquadro del calendario; regole con !important dove il tema
   (Divi) sovrascrive colori e stili dei link. */
.mcm-weeks {
    max-width: 480px;
    width: 100%;
    margin: 0 auto 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    box-sizing: border-box;
}
.mcm-weeks h3 {
    margin: 0 0 12px;
    padding: 0;
    font-size: 20px;
    line-height: 1.25;
}
.mcm-week-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fafafa;
}
.mcm-week-dates { font-weight: 600; font-size: 15px; line-height: 1.3; }
.mcm-week-sub { font-size: 12px; color: #666; line-height: 1.4; margin-top: 2px; }
.mcm-week-price { text-align: right; white-space: nowrap; }
.mcm-week-price s { color: #999; font-size: 12px; }
.mcm-week-price strong { font-size: 17px; color: #1a1a2e; }
.mcm-weeks a.mcm-week-book,
.mcm-weeks a.mcm-week-book:visited {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 16px;
    background: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.4 !important;
    text-decoration: none !important;
}
.mcm-weeks a.mcm-week-book:hover { background: #33334d !important; }
@media (max-width: 480px) {
    .mcm-weeks { padding: 14px; }
    .mcm-week-row { flex-wrap: wrap; }
    .mcm-week-price { text-align: left; }
}


/* Giorno occupato dalla notte, ma valido come giorno di partenza
   (il prossimo ospite arriva nel pomeriggio): metà verde, metà rossa */
.mcm-cal-day-checkout-ok {
    background: linear-gradient(135deg, #9fe3ac 50%, #f4a3a1 50%);
    color: #0d4d1c;
    cursor: pointer;
}
.mcm-cal-day-checkout-ok:hover {
    background: linear-gradient(135deg, #7fd690 50%, #f4a3a1 50%);
}
.mcm-cal-day-checkout-ok.mcm-cal-day-too-short {
    background: repeating-linear-gradient(45deg, #ecd9a0, #ecd9a0 4px, #dfc57a 4px, #dfc57a 8px);
    color: #5c4813;
}
