/* VillaWell Booking Frontend Styles - Premium Redesign */

/* --- 1. Container & Card Styles --- */
form.villawell-booking-form,
.villawell-spa-booking-form,
.villawell-apartment-booking-form,
.villawell-spa-section {
    background: transparent;
    padding: 0;
    margin: 30px 0;
    border: none;
    box-shadow: none;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    float: none !important;
}

/* Background Texture / Subtle Tint matching the header */

/* Ensure content sits above the background pseudo-element */
.villawell-spa-booking-form>*,
.villawell-apartment-booking-form>* {
    position: relative;
    z-index: 1;
}

/* --- 2. Typography & Headings --- */
.villawell-spa-booking-form h3,
.villawell-apartment-booking-form h3,
.villawell-spa-section h4,
.villawell-price-display h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #183b59;
    /* Deep Blue */
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 28px;
    letter-spacing: 0.5px;
    border-bottom: 0px solid rgba(197, 160, 101, 0.2);
    /* Optional Separator */
    padding-bottom: 0px;
}

.villawell-spa-section h4 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #C5A065;
    /* Gold for subsection title */
}

/* --- 3. Form Rows & Labels --- */
.villawell-form-row {
    margin-bottom: 25px;
}

.villawell-form-row label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #183b59;
    /* Deep Blue */
    margin-bottom: 10px;
}

.villawell-form-row .required {
    color: #C5A065;
    /* Gold Asterisk */
}

.villawell-form-row small {
    display: block;
    margin-top: 8px;
    color: #7a8b9a;
    font-size: 13px;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

/* --- 4. Inputs & Selects --- */
.villawell-form-row input[type="text"],
.villawell-form-row input[type="number"],
.villawell-form-row select {
    width: 100%;
    max-width: 100%;
    /* Allow full width of container */
    padding: 14px 18px;
    border: 1px solid #e1e8ed;
    border-radius: 0px;
    /* Sharper corners for premium feel, or slight radius */
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* Focus State: Gold Glow */
.villawell-form-row input[type="text"]:focus,
.villawell-form-row input[type="number"]:focus,
.villawell-form-row select:focus {
    outline: none;
    border-color: #C5A065;
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.1);
}

/* Datepicker specific */
.villawell-datepicker {
    background-image: url('data:image/svg+xml;utf8,<svg width="18" height="20" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 2H15V0H13V2H5V0H3V2H2C0.89 2 0.0100002 2.9 0.0100002 4L0 18C0 19.1 0.89 20 2 20H16C17.1 20 18 19.1 18 18V4C18 2.9 17.1 2 16 2ZM16 18H2V7H16V18Z" fill="%23C5A065"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    cursor: pointer;
}

/* --- 5. Addons (Extras) Styling --- */
.villawell-addons {
    background: transparent;
    padding: 0;
    border: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    align-items: stretch;
}

.villawell-addon-item {
    margin-bottom: 0;
    position: relative;
    height: 100%;
}

/* Card Style Label for Checkboxes */
.villawell-addon-item label {
    display: flex;
    align-items: flex-start;
    /* Align to top */
    cursor: pointer;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 15px !important;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    padding: 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.villawell-addon-item label:hover {
    border-color: #C5A065;
    background: #fdfbf7;
    /* Very light gold tint */
}

/* Visually hide default checkbox but keep accessible? 
   Or just style it nicely. Let's keep it simple and clean first. */
.villawell-addon-item input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    border-color: #C5A065;
    background: #C5A065;
    /* Fix visible checkbox background */
    flex-shrink: 0;
    /* Prevent shrinking */
    margin-top: 2px;
    /* Align with first line of text */
}

.villawell-addon-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.villawell-addon-details .addon-name {
    font-weight: 600;
    color: #183b59;
    margin-bottom: 4px;
    display: block;
}

.required-extra {
    font-size: 10px;
    text-transform: uppercase;
    background: #f7f7f7;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: auto;
    /* Push to right */
    color: #666;
    letter-spacing: 0.5px;
}

.addon-description {
    padding-left: 0;
    /* Inside container now */
    margin-top: 2px;
    margin-bottom: 0;
    font-size: 13px !important;
    color: #7a8b9a;
    line-height: 1.4;
    display: block;
}

/* --- 6. Nights Display --- */
.villawell-nights-display {
    background: #f4fcec;
    /* Light Mint */
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    color: #183b59;
    font-family: 'Inter', sans-serif;
    border-left: 4px solid #183b59;
}

.villawell-nights-display strong {
    font-weight: 600;
}

/* --- 7. Price Display --- */
.villawell-price-display {
    background: #ffffff;
    padding: 30px;
    border-radius: 4px;
    margin-top: 40px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.villawell-price-breakdown div,
.villawell-price-breakdown td {
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 8px 0;
}

.villawell-price-breakdown span {
    font-family: 'Inter', sans-serif;
}

.villawell-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    margin-bottom: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-family: 'Playfair Display', serif;
    color: #183b59;
}

.villawell-total-price .price-amount {
    color: #C5A065;
    /* Gold */
    font-weight: 700;
    font-size: 28px;
}

/* Deposit Lines */
.villawell-deposit-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-top: none;
}

.villawell-deposit-info small {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.villawell-deposit-info small span {
    font-weight: 600;
    color: #333;
}

/* --- 8. Submit Button & Checkbox --- */
.villawell-submit-wrapper button.single_add_to_cart_button {
    background-color: #C5A065 !important;
    color: #ffffff !important;
    padding: 18px 40px !important;
    border-radius: 4px;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 2px !important;
    font-size: 14px !important;
    border: 1px solid #C5A065 !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    width: 100%;
}

.villawell-submit-wrapper button.single_add_to_cart_button:hover {
    background-color: #183b59 !important;
    border-color: #183b59 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(24, 59, 89, 0.2);
}

/* Spa Checkbox inside Apartment Form */
.villawell-form-row input[type="checkbox"]#add_spa_booking {
    width: auto;
    margin-right: 10px;
    accent-color: #C5A065;
}

/* Highlight Box for Spa Trigger */
.villawell-highlight-row {
    background: #f4fcec;
    /* Light Mint */
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #dcebd4;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.villawell-highlight-row:hover {
    border-color: #C5A065;
    box-shadow: 0 5px 15px rgba(24, 59, 89, 0.05);
}

.villawell-highlight-row label {
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #183b59 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: 'Playfair Display', serif !important;
    cursor: pointer;
}

.villawell-highlight-row input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    margin-right: 15px !important;
    accent-color: #C5A065;
}

/* Expanded Spa Section Embedded */
.villawell-spa-section {
    margin-top: 0;
    border-top: none;
    border-left: 3px solid #C5A065;
    background: #ffffff;
    padding: 20px 0 20px 30px;
    /* Indent */
    margin-left: 20px;
}

/* Responsive fixes for embedded section */
@media (max-width: 768px) {
    .villawell-spa-section {
        padding: 20px 0;
        margin-left: 0;
        border-left: none;
        border-top: 1px solid #eee;
    }
}


/* --- 9. jQuery UI Datepicker Override --- */
#ui-datepicker-div.ui-datepicker {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    box-shadow: 0 10px 30px rgba(24, 59, 89, 0.15);
    padding: 0;
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    z-index: 9999 !important;
    /* Ensure on top */
}

.ui-datepicker .ui-datepicker-header {
    background: #183b59;
    border: none;
    color: #fff;
    border-radius: 4px 4px 0 0;
    padding: 10px 0;
}

.ui-datepicker .ui-datepicker-title {
    font-family: 'Playfair Display', serif;
    font-weight: normal;
}

.ui-datepicker th {
    color: #888;
    font-weight: normal;
    font-size: 12px;
    padding: 8px 0;
}

.ui-datepicker td span,
.ui-datepicker td a {
    text-align: center;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 20px;
    margin: 0 auto;
}

.ui-datepicker-calendar .ui-state-default {
    background: transparent;
    border: none;
    color: #333;
}

.ui-datepicker-calendar .ui-state-hover {
    background: #f4fcec;
    border-radius: 4px;
    color: #183b59;
}

.ui-datepicker-calendar .ui-state-active {
    background: #C5A065 !important;
    color: #ffffff !important;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(197, 160, 101, 0.4);
}

/* --- 10. Responsive --- */
@media (max-width: 768px) {

    form.villawell-booking-form,
    .villawell-spa-booking-form,
    .villawell-apartment-booking-form {
        padding: 15px; /* Reduced from 25px to use more screen real estate */
        width: 100% !important;
        max-width: 100% !important;
    }

    .villawell-addons {
        grid-template-columns: 1fr;
        /* Stack extras */
    }

    .villawell-total-price {
        flex-direction: column;
        align-items: flex-start;
    }

    .villawell-total-price .price-amount {
        margin-top: 5px;
    }
}