/* MDG Reservas 0.5.8 — CTA final + zona horaria local + horario semanal editable */
.mdg-reservas-box {
    --mdg-accent: #9e1f63;
    --mdg-blue: #3696D1;
    --mdg-blue-soft: #eef7fc;
    --mdg-accent-soft: #fbf3f7;
    --mdg-border: #ead7e2;
    --mdg-text: #262126;
    --mdg-muted: #70666d;
    margin: 12px 0 28px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--mdg-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(80, 38, 59, .08);
    color: var(--mdg-text);
    position: relative;
    overflow: hidden;
}

.mdg-reservas-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mdg-accent);
}

.mdg-reservas-box h3 {
    margin: 0 0 22px;
    color: var(--mdg-accent);
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.08;
}

.mdg-reservas-box label {
    display: block;
    margin: 0 0 9px;
    font-weight: 600;
    line-height: 1.4;
}

/* Preguntas principales: un poco más grandes para facilitar la lectura. */
.mdg-booking-question-wrap label,
.mdg-booking-source-wrap > label {
    font-size: 19px;
    line-height: 1.4;
}

.mdg-step-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 13px;
    font-size: 18px;
}

.mdg-step-heading-first { margin-top: 2px; }

.mdg-step-number {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    border-radius: 999px;
    background: var(--mdg-blue-soft);
    color: var(--mdg-blue);
    font-weight: 800;
    font-size: 15px;
    box-shadow: inset 0 0 0 1px rgba(54,150,209,.10);
}

.mdg-booking-stage + .mdg-booking-stage,
.mdg-booking-step {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--mdg-border);
}

.mdg-booking-stage[hidden],
.mdg-booking-step[hidden] { display: none !important; }

.mdg-booking-stage.is-active { animation: mdgStepIn .22s ease-out; }

@keyframes mdgStepIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.mdg-stage-content[hidden] { display: none !important; }

.mdg-stage-summary {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d8eaf5;
    border-radius: 12px;
    background: var(--mdg-blue-soft);
    color: var(--mdg-text);
    text-align: left;
    font: inherit;
    line-height: 1.4;
    cursor: pointer;
}

.mdg-stage-summary[hidden] { display: none !important; }
.mdg-stage-summary::after {
    content: "Cambiar";
    float: right;
    margin-left: 12px;
    color: var(--mdg-blue);
    font-size: 13px;
    font-weight: 700;
}

.mdg-date-picker-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0;
    border: 1px solid var(--mdg-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(80, 38, 59, .05);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mdg-date-picker-wrap:hover,
.mdg-date-picker-wrap:focus-within {
    border-color: var(--mdg-blue);
    box-shadow: 0 0 0 3px rgba(54,150,209,.10);
}

.mdg-date-display {
    display: block;
    padding: 14px 16px;
    color: var(--mdg-text);
    font-size: 17px;
    line-height: 1.35;
    pointer-events: none;
}

.mdg-date-picker-wrap input[type="date"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.mdg-booking-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 11px;
}

.mdg-slot {
    min-height: 52px;
    padding: 12px;
    border: 1.5px solid var(--mdg-accent);
    border-radius: 13px;
    background: #fff;
    color: var(--mdg-accent);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.mdg-slot:hover { background: var(--mdg-accent-soft); transform: translateY(-1px); }
.mdg-slot:disabled { opacity: .45; cursor: wait; transform: none; }
.mdg-slot.mdg-slot-extra { display: none; }
.mdg-booking-slots.is-expanded .mdg-slot.mdg-slot-extra { display: block; }

.mdg-slot.is-selected {
    background: var(--mdg-blue);
    color: #fff;
    border-color: var(--mdg-blue);
    box-shadow: 0 5px 14px rgba(54,150,209,.24);
}
.mdg-slot.is-selected::before { content: "✓ "; font-weight: 800; }

.mdg-slots-more {
    display: block;
    margin: 14px auto 0;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    color: var(--mdg-blue);
    font-size: 15px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.mdg-slots-more[hidden] { display: none !important; }

.mdg-booking-help {
    margin: 0 0 14px;
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--mdg-accent-soft);
    color: var(--mdg-muted);
    line-height: 1.45;
}
.mdg-booking-help:empty { display: none !important; }

.mdg-booking-question-wrap textarea,
.mdg-booking-source-wrap select,
.mdg-booking-source-other-wrap input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--mdg-border);
    border-radius: 12px;
    background: #fff;
    color: var(--mdg-text);
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mdg-booking-question-wrap textarea {
    min-height: 170px;
    padding: 13px 14px;
    resize: vertical;
    overflow-y: auto;
}

.mdg-booking-source-wrap select,
.mdg-booking-source-other-wrap input { min-height: 49px; padding: 10px 13px; }

.mdg-booking-question-wrap textarea:focus,
.mdg-booking-source-wrap select:focus,
.mdg-booking-source-other-wrap input:focus {
    outline: none;
    border-color: var(--mdg-blue);
    box-shadow: 0 0 0 3px rgba(54,150,209,.10);
}

.mdg-booking-source-other-wrap { margin-top: 14px; }


.mdg-booking-cta-wrap {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--mdg-border);
}
.mdg-booking-cta-wrap:empty {
    display: none;
}

form.cart .single_add_to_cart_button.mdg-booking-cta-hidden { display: none !important; }

/* CTA de reserva: ancho completo y separado del hueco del selector de cantidad de WooCommerce. */
form.cart .single_add_to_cart_button:not(.mdg-booking-cta-hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 58px;
    margin: 0 !important;
    padding: 15px 22px !important;
    border: 1px solid #2F83BB !important;
    border-radius: 16px !important;
    background: #3696D1 !important;
    background-color: #3696D1 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    box-shadow: 0 7px 18px rgba(45, 48, 52, .20) !important;
    transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, opacity .2s ease;
}

form.cart .single_add_to_cart_button:not(.mdg-booking-cta-hidden)::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: -4px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") !important;
}
form.cart .single_add_to_cart_button:not(.mdg-booking-cta-hidden):hover {
    transform: translateY(-1px);
    background-color: #328DCA !important;
    box-shadow: 0 9px 22px rgba(45, 48, 52, .24) !important;
}
form.cart .single_add_to_cart_button:not(.mdg-booking-cta-hidden):active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(45, 48, 52, .18) !important;
}

.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 767px) {
    .mdg-reservas-box { padding: 20px 16px 22px; border-radius: 15px; }
    .mdg-reservas-box h3 { font-size: 31px; margin-bottom: 20px; }
    .mdg-step-heading { font-size: 17px; }
    .mdg-date-picker-wrap { max-width: none; }
    .mdg-date-display { font-size: 16px; padding: 14px; }
    .mdg-booking-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
    .mdg-slot { min-width: 0; min-height: 54px; padding: 10px 5px; font-size: 17px; }
    .mdg-stage-summary { font-size: 15px; }
    .mdg-booking-question-wrap label,
    .mdg-booking-source-wrap > label { font-size: 18px; }
    form.cart .single_add_to_cart_button:not(.mdg-booking-cta-hidden) { min-height: 58px; font-size: 18px !important; }
}

@media (max-width: 390px) {
    .mdg-booking-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mdg-slot { font-size: 15px; }
}

/* 0.5.7 · Zona horaria local del cliente */
.mdg-timezone-notice {
    margin: -2px 0 16px;
    padding: 9px 12px;
    border: 1px solid rgba(54, 150, 209, .24);
    border-radius: 10px;
    background: rgba(54, 150, 209, .07);
    color: #31576f;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 767px) {
    .mdg-timezone-notice {
        font-size: 14px;
        margin-bottom: 14px;
    }
}


/* 0.5.10 · Una sola consulta MDG por carrito */
.mdg-cart-pending-box {
    text-align: left;
}
.mdg-cart-pending-box h3 {
    margin-bottom: 10px;
}
.mdg-cart-pending-box p {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.55;
}
.mdg-cart-pending-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 10px;
    background: #3696D1;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
}
.mdg-cart-pending-button:hover,
.mdg-cart-pending-button:focus {
    color: #fff !important;
    text-decoration: none !important;
}
