/* =============================================================================
 * Book Now modal — overlay dialog.
 *
 * Markup lives in includes/book-now-modal.php (rendered once, reused on every
 * page via includes/header.php).
 * ========================================================================== */

.stylux-book-now-modal[hidden] {
    display: none !important;
}

.stylux-book-now-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: inherit;
}

.stylux-book-now-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 8, 0.62);
    backdrop-filter: blur(2px);
    animation: stylux-book-now-fade 0.22s ease;
}

.stylux-book-now-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 60px -12px rgba(20, 14, 8, 0.5),
                0 0 0 1px rgba(156, 106, 60, 0.18);
    animation: stylux-book-now-pop 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    color: #221a13;
}

@keyframes stylux-book-now-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes stylux-book-now-pop {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .stylux-book-now-modal__backdrop,
    .stylux-book-now-modal__dialog {
        animation: none;
    }
}

.stylux-book-now-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 26px 6px;
}

.stylux-book-now-modal__header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #221a13;
    line-height: 1.3;
}

.stylux-book-now-modal__header p {
    font-size: 13.5px;
    margin: 6px 0 0;
    color: #6b6b6b;
    line-height: 1.55;
}

.stylux-book-now-modal__close {
    appearance: none;
    -webkit-appearance: none;
    background: #FAF6F0;
    border: 1px solid rgba(156, 106, 60, 0.22);
    color: #221a13;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stylux-book-now-modal__close:hover,
.stylux-book-now-modal__close:focus-visible {
    background: #9c6a3c;
    color: #fff;
    border-color: #9c6a3c;
    outline: none;
    transform: rotate(90deg);
}

.stylux-book-now-modal__close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.stylux-book-now-modal__form {
    padding: 4px 26px 22px;
}

/* Row layout — used to put two fields side-by-side. Collapses to a single
 * column on small screens via the media query at the bottom of this file. */
.stylux-book-now-modal__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.stylux-book-now-modal__field {
    margin-bottom: 14px;
    min-width: 0; /* prevent inputs from overflowing the grid track */
}

.stylux-book-now-modal__field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #221a13;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.stylux-book-now-modal__field label .req {
    color: #c0392b;
}

.stylux-book-now-modal__field label .opt {
    color: #9c8b78;
    font-weight: 500;
    font-size: 11.5px;
    margin-left: 4px;
    letter-spacing: 0;
}

.stylux-book-now-modal__field input,
.stylux-book-now-modal__field textarea {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid rgba(34, 26, 19, 0.18);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    font-size: 14px;
    color: #221a13;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.stylux-book-now-modal__field input:focus,
.stylux-book-now-modal__field textarea:focus {
    border-color: #9c6a3c;
    box-shadow: 0 0 0 3px rgba(156, 106, 60, 0.15);
    outline: none;
}

.stylux-book-now-modal__field textarea {
    resize: vertical;
    min-height: 92px;
    max-height: 240px;
}

.stylux-book-now-modal__field.is-invalid input,
.stylux-book-now-modal__field.is-invalid textarea {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.stylux-book-now-modal__error {
    display: none;
    color: #c0392b;
    font-size: 12px;
    margin-top: 5px;
}

.stylux-book-now-modal__field.is-invalid .stylux-book-now-modal__error {
    display: block;
}

.stylux-lead-recaptcha {
    max-width: 100%;
    overflow: hidden;
}

.stylux-lead-recaptcha .g-recaptcha {
    transform-origin: left top;
}

/* Honeypot — hidden from real users but reachable for naive bots. */
.stylux-book-now-modal__honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.stylux-book-now-modal__submit {
    margin-top: 4px;
    width: 100%;
    background: #9c6a3c;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.stylux-book-now-modal__submit:hover:not(:disabled),
.stylux-book-now-modal__submit:focus-visible {
    background: #221a13;
    transform: translateY(-1px);
    outline: none;
}

.stylux-book-now-modal__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.stylux-book-now-modal__submit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}

/* Inline notice. The shared stylux-lead-form__notice class adds success/error
 * state. When hidden, the element takes no vertical space. */
.stylux-book-now-modal__notice {
    margin: 0 26px 14px;
    padding: 0;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    display: none;
    border: 1px solid transparent;
    transition: padding 0.2s ease, background 0.2s ease;
}

.stylux-lead-form__notice--visible {
    display: block;
    padding: 11px 14px;
}

.stylux-lead-form__notice--success {
    background: rgba(47, 122, 77, 0.1);
    border-color: rgba(47, 122, 77, 0.35);
    color: #1f5a37;
}

.stylux-lead-form__notice--error {
    background: rgba(192, 57, 43, 0.08);
    border-color: rgba(192, 57, 43, 0.35);
    color: #8b2c22;
}

.stylux-book-now-modal__foot {
    padding: 4px 26px 22px;
    font-size: 12px;
    color: #6b6b6b;
    text-align: center;
}

@media (max-width: 480px) {
    .stylux-book-now-modal { padding: 12px; }
    .stylux-book-now-modal__header,
    .stylux-book-now-modal__form,
    .stylux-book-now-modal__notice,
    .stylux-book-now-modal__foot { padding-left: 20px; padding-right: 20px; }
    .stylux-book-now-modal__header h2 { font-size: 18px; }
    .stylux-book-now-modal__field .g-recaptcha { transform: scale(.92); transform-origin: left top; margin-bottom: -6px; }

    /* Side-by-side fields collapse to single column on phones. */
    .stylux-book-now-modal__row {
        grid-template-columns: 1fr;
    }
}

/* When the modal is open, freeze background scroll. */
body.stylux-book-now-open {
    overflow: hidden;
}
