/* ==========================================================================
   Caleran Booking Widget — Shared Styles
   Version: 1.0.6
   License: GNU General Public License v2 or later
   License URI: http://www.gnu.org/licenses/gpl-2.0.html
   ========================================================================== */
.cbw-wrapper {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 800px;
    margin: 0 auto;    
}
.cbw-wrapper *,
.cbw-wrapper *::before,
.cbw-wrapper *::after {
    box-sizing: border-box;
}

/* Shared label styles */
.cbw-wrapper label {
    display: block;
    font-weight: 800;
    color: #202020;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Required field indicator */
.cbw-required {
    color: #a90d0d;
    font-weight: 800;
    margin-left: 2px;
}

/* Shared input styles */
.cbw-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fafafa;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}
.cbw-wrapper input[type="text"]:focus {
    border-color: #354f93;
    background: #fff;
}
.cbw-wrapper input[type="text"]::placeholder {
    color: #999;
}

/* Shared select styles */
.cbw-wrapper select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 7px;
    color: #333;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s;
    cursor: pointer;
}
.cbw-wrapper select:focus {
    border-color: #354f93;
    background-color: #fff;
}

/* Shared button styles */
.cbw-submit {
    display: inline-block;
    font-size: 15px;
    line-height: 1.4;
    background: #354f93;
    border: 2px solid #354f93;
    border-radius: 4px;
    text-transform: uppercase !important;
    transition: background 0.2s;
    white-space: nowrap;
}
.cbw-submit:hover {
    background: #F6C85C;
    border: 2px solid #F6C85C;
}
.cbw-submit:focus {
    outline: 2px solid #F6C85C;
    outline-offset: 2px;
}

/* ==========================================================================
   Inline (Horizontal) Layout — [booking_widget]
   ========================================================================== */

.cbw-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}
.cbw-field {
    /* fills a grid cell naturally */
}
.cbw-btn-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

@media (max-width: 600px) {
    .cbw-row {
        grid-template-columns: 1fr;
    }
    .cbw-btn-wrap {
        grid-column: 1;
    }
    .cbw-wrapper:not(.cbw-stacked) .cbw-submit {
        width: 100%;
    }
}

/* ==========================================================================
   Stacked (Vertical) Layout — [booking_widget_stacked]
   ========================================================================== */
.cbw-stacked {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.cbw-stacked-row {
    /* fills a grid cell naturally */
}
.cbw-stacked-row:last-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}
.cbw-stacked .cbw-submit {
    min-width: 200px;
}

@media (max-width: 600px) {
    .cbw-stacked {
        grid-template-columns: 1fr;
    }
    .cbw-stacked-row:last-child {
        grid-column: 1;
    }
    .cbw-stacked .cbw-submit {
        width: 100%;
    }
}

/* ==========================================================================
   Popup Modal — [booking_widget_popup]
   ========================================================================== */

/* Overlay — full screen, scrollable so tall forms don't clip */
.cbw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 800;
    overflow-y: auto;
    padding: 40px 16px;
}
.cbw-modal-overlay.cbw-modal-open {
    display: block;
}

/* Prevent body scroll while modal is open */
body.cbw-no-scroll {
    overflow: hidden;
}

/* Modal container */
.cbw-modal {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 32px 36px;
}

/* Close button */
.cbw-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #202020;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.cbw-modal-close:hover {
    color: #202020;
}
.cbw-modal-close:focus {
    outline: 2px solid #354f93;
    outline-offset: 2px;
}

/* Override wrapper card styles inside modal — form already has the modal frame */
.cbw-modal .cbw-wrapper {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* Caleran calendar uses z-index:9999; ensure it renders above the modal (z-index:99999) */
.caleran-container,
.caleran-container-mobile,
.caleran-input {
    z-index: 999999 !important;
}

@media (max-width: 600px) {
    .cbw-modal {
        padding: 48px 16px 24px;
    }
}
