/* Guesty Quote Styles */
.wdm-guesty-quote-result {
    margin-top: 10px;
    display: none;
    font-size: 14px;
    border: none;
    padding: 0;
    background-color: #f9f9f900;
}
/* Booking summary styles */
.booking_summary{
    max-width: 600px;
}
/* Checkout and Change buttons */
.wdm-checkout-btn {
    display: inline-block;
    padding: 12px 20px;
    width: 100%!important;
    background-color: #e3dbcc;
    font-size: 12px!important;
    letter-spacing: 2px!important;
    text-transform: uppercase!important;
    color: #7A7365!important;
    text-align: center;
    text-decoration: none;
    border-radius: 0;
}

.wdm-checkout-btn:hover {
    background-color: #B9CED3;
}
/* Change button styles */
.wdm-change-btn {
    display: inline-block;
    width: 100%!important;
    margin-top: 10px;
    padding: 0!important;
    background-color: #e3dbcc00!important;
    color: #7A7365!important;
    text-transform: uppercase!important;
    font-size: 12px!important;
    letter-spacing: 2px!important;
    border: none!important;
    border-radius: 0!important;
    cursor: pointer;
}

.wdm-change-btn:hover {
    color: #4E4E4E!important;
}

/* Calendar styles */
#wdm-guesty-new-datepicker {
    width: 100%;
}
#wdm-guesty-date-input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  color: #7A7365!important;
  background-color: #e3dbcc00!important;
  border: 1px solid #ccc;
  border-radius: 0!important;
  padding: 12px;
  box-sizing: border-box; 
  cursor: pointer; 
}
.wdm-guesty-day {
    padding: 8px;
    border: 1px solid #ccc;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.wdm-guesty-day.disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.wdm-guesty-day.selected {
    background-color: #2a8fff;
    color: #fff;
}

.wdm-guesty-day.in-range {
    background-color: #a0cfff;
}

/* Style the placeholder text */
#wdm-guesty-date-input::placeholder {
  color: #999; /* Change placeholder color */
  font-style: italic;
}

/* =========================================================================
   GUESSY WIDGET STYLES (Scoped to .wdm-property-page)
   ========================================================================= */

/* --- 1. GUESSY QUOTE RESULT & BOOKING SUMMARY --- */

.wdm-property-page .wdm-guesty-quote-result {
    margin-top: 10px;
    display: none;
    font-size: 14px;
    border: none;
    padding: 0;
    background-color: #FDFCF800; /* Site background transparent */
}
.wdm-property-page .booking_summary {
    max-width: 600px;
}

/* --- 2. CHECKOUT AND CHANGE BUTTONS --- */

.wdm-property-page .wdm-checkout-btn {
    padding: 12px 20px;
    background-color: #E3DBCC; /* Secondary/Nude color */
    color: #7A7365 !important; /* Text color */
    /* ... other styles from your code ... */
}
.wdm-property-page .wdm-checkout-btn:hover {
    background-color: #B9CED3; /* Accent color */
}

.wdm-property-page .wdm-change-btn {
    background-color: transparent !important; 
    color: #7A7365 !important; /* Text color */
    /* ... other styles from your code ... */
}
.wdm-property-page .wdm-change-btn:hover {
    color: #4E4E4E !important; /* Text 2 color */
}

/* --- 3. CUSTOM DATE INPUT FIELD AND WARNING --- */

.wdm-property-page #wdm-guesty-new-datepicker {
    width: 100%;
}
.wdm-property-page #wdm-guesty-date-input {
    color: #7A7365 !important; /* Text color */
    background-color: #FDFCF8 !important; /* Site background */
    border: 1px solid #E3DBCC; /* Secondary/Divider color */
    /* ... other styles from your code ... */
}
.wdm-property-page #min-nights-warning {
    color: #CC6670 !important; /* Clear error color */
    /* ... other styles from your code ... */
}

/* --- 4. FLATPCIKR CALENDAR ELEMENTS --- */

/* --- 4. FLATPCIKR CALENDAR ELEMENTS (Updated Day States) --- */

/* Main Calendar Panel */
.wdm-property-page .flatpickr-calendar {
    background-color: #FDFCF8 !important; /* Site background */
    border: 1px solid #E3DBCC;
    box-shadow: 0 4px 15px rgba(16, 16, 16, 0.15);
    border-radius: 0;
    z-index: 9999;
}

/* Month/Year Navigation */
.wdm-property-page .flatpickr-current-month .flatpickr-monthTitle,
.wdm-property-page .flatpickr-current-month .flatpickr-monthTitle .cur-year {
    color: #7A7365;
    font-size: 12px !important;
    font-weight: 400;
}
.wdm-property-page .flatpickr-months .flatpickr-prev-month,
.wdm-property-page .flatpickr-months .flatpickr-next-month {
    color: #B9CED3;
    fill: #B9CED3;
}

/* Weekdays */
.wdm-property-page .flatpickr-weekdays {
    background-color: #F3F0E9; /* Ivory */
}
.wdm-property-page .flatpickr-weekday {
    color: #7A7365;
    font-size: 11px !important;
}

/* Day Cells (General) */
.wdm-property-page .flatpickr-day {
    color: #4E4E4E;
    font-size: 13px !important;
    height: 32px;
    line-height: 32px;
    border-radius: 0 !important;
}
.wdm-property-page .flatpickr-day:hover {
    background-color: #DFDEDA; /* BRAND #2 (Light hover) */
    border-color: #DFDEDA;
}

/* --- Blocked/Disabled/Passed Dates --- */
.wdm-property-page .flatpickr-day.flatpickr-disabled {
    /* Use Site Background or Ivory for background */
    background: #FDFCF8 !important; 
    /* Text 1 color, but with reduced opacity to signify unavailability */
    color: #7A7365 !important; 
    border-color: #FDFCF8 !important;
    cursor: not-allowed !important;
    opacity: 0.45; /* **Lowered opacity for clearer visual fade** */
    text-decoration: none; /* Ensure no strikethrough is present */
}
/* Ensure hover doesn't activate on disabled days */
.wdm-property-page .flatpickr-day.flatpickr-disabled:hover {
    background: #FDFCF8 !important; 
    border-color: #FDFCF8 !important;
}

/* --- Min Nights Violation (Error State) --- */
.wdm-property-page .flatpickr-calendar .flatpickr-days .flatpickr-day.min-nights-violation,
.wdm-property-page .flatpickr-calendar .flatpickr-days .flatpickr-day.min-nights-violation:hover {
    /* **Use Ivory background with a red warning text for high contrast error** */
    background: #F3F0E9 !important; /* Ivory background */
    color: #CC6670 !important; /* Clear error red (Same as #min-nights-warning) */
    border: 1px dashed #CC667050 !important; /* **Added dashed border for visual distinction** */
    cursor: not-allowed !important;
    opacity: 1; 
}

/* --- Selected & Range Dates (Active States) --- */
.wdm-property-page .flatpickr-day.selected,
.wdm-property-page .flatpickr-day.startRange,
.wdm-property-page .flatpickr-day.endRange {
    background: #B9CED3 !important; /* Accent color */
    border-color: #B9CED3 !important;
    color: #101010 !important; /* Primary color for contrast */
}
.wdm-property-page .flatpickr-day.inRange {
    background: #E3DBCC !important; /* Secondary/Nude color for range fill */
    border-color: #E3DBCC !important;
    color: #4E4E4E !important;
}

.wdm-property-page span.cur-month {
    font-size: 15px;
}

.wdm-property-page input.numInput.cur-year {
    font-size: 14px;
}

/* GUST ADMIN / ACCOUNT / RESERVATION DATA PREVIEW */

        .guesty-reservation {
            display: grid;
            grid-template-columns: 1fr;
            margin: 0 auto;
            overflow: hidden;
            border-top:1px solid #E3DBCC;
            padding-top:20px;
        }
        .guesty-map{
            width: 100%;
            margin-top:20px;
        }
        .guesty-map iframe{
            width: 100%;
            min-height:280px;
        }

        
        .res-status{
            display:none;
        }
        .guesty-reservation-image img {
            width: 100%;
            object-fit: cover;
            display: block;
            aspect-ratio:3/2!important;
        }

        .guesty-reservation-details {
            padding: 20px 25px 20px 0;
            display: grid;
            gap: 4px;
            align-content: start;
        }

        .guesty-reservation-details h4 {
            margin-top: 0;
            font-size: 1.4rem;
            color: var(--e-global-color-primary);
        }

        .guesty-reservation-details p {
            margin: 4px 0;
            color: var(--e-global-color-text);
        }
        /* Desktop / Tablet */
@media (min-width: 700px) {
    .guesty-reservation {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 25px;
    }

    .guesty-map {
        grid-column: 1 / -1;
    }
}

/* Mobile (one column stacked) */
@media (max-width: 699px) {
    .guesty-reservation {
        grid-template-columns: 1fr;
        padding-top:0;
    }

    .guesty-reservation-details {
        padding: 15px 0;
    }

    .guesty-reservation-image img {
        border-radius: 10px;
    }
    .guesty-reservation-details h4 {
        margin-top: 0;
        font-size: 1.2rem;
        color: var(--e-global-color-primary);
    }
    .guesty-map iframe{
        width: 100%;
        min-height:200px;
    }
}
/* Payment Lines Styling */
.wdm-payment-lines p {
    color: var(--e-global-color-text);
    font-family: "Lato", Sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    line-height: 1.4em;
    text-wrap: nowrap;
    letter-spacing: 2px;
    text-align: left;
    margin-bottom: 0;
}

/* =======================
   Guesty Search Form Theme
   ======================= */

/* Search Form Container */
/* Desktop layout */
.guesty-search-form {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    gap: 5px;
    width: 100%;
    margin-bottom: 0;
}

/* Uniform height for inputs, selects, and buttons */
.guesty-search-form input,
.guesty-search-form select,
.guesty-search-form button {
    height: 56px;
    margin: 0;
}

/* Date Range Input spans two columns */
input.guesty-date-range.flatpickr-input {
    grid-column: 2 / span 2;
}

/* Search Button spans two columns */
.guesty-search-form button {
    grid-column: 5 / span 2;
    margin: 0;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .guesty-search-form {
        grid-template-columns: 1fr; /* single column */
        gap: 10px; /* slightly bigger gap for readability */
    }

    .guesty-search-form input,
    .guesty-search-form select,
    .guesty-search-form button {
        width: 100%;       /* full width */
        grid-column: auto; /* remove column spans */
    }

    input.guesty-date-range.flatpickr-input,
    .guesty-search-form button {
        grid-column: auto; /* override desktop spans */
    }
}

/* Date Range Input (flatpickr) */
.guesty-search-form .guesty-date-range,
.guesty-home-search-form .guesty-date-range,
form.guesty-archive-search-form .guesty-date-range {
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif;
    font-size: var(--e-global-typography-92a90da-font-size);
    font-weight: var(--e-global-typography-92a90da-font-weight);
    text-transform: var(--e-global-typography-92a90da-text-transform);
    line-height: var(--e-global-typography-92a90da-line-height);
    letter-spacing: var(--e-global-typography-92a90da-letter-spacing);
    color: #FDFCF8!important;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    padding: 17px 20px 17px 20px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}


/* Select Inputs */
.guesty-search-form select,
.guesty-home-search-form select,
.guesty-archive-search-form select {
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif;
    font-size: var(--e-global-typography-92a90da-font-size);
    font-weight: var(--e-global-typography-92a90da-font-weight);
    text-transform: var(--e-global-typography-92a90da-text-transform);
    line-height: var(--e-global-typography-92a90da-line-height);
    letter-spacing: var(--e-global-typography-92a90da-letter-spacing);
    color: #FDFCF8;
    border: 0px solid #E3DBCC61;
    border-radius: 0px;
    padding: 21px 20px 20px 20px;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    background-color: #F3F0E945!important;
}

.guesty-search-form select option,
.guesty-home-search-form select option,
form.guesty-archive-search-form select option {
  background-color: #FDFCF8;
 /* Sets background color of dropdown options */
  color: #7A7365;
}

/* Multi-select special styling */
.guesty-search-form select[multiple] {
    height: auto;
}

/* Number inputs */
.guesty-search-form input[type="number"],
.guesty-home-search-form input[type="number"],
.guesty-archive-search-form input[type="number"] {
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif;
    font-size: var(--e-global-typography-92a90da-font-size);
    font-weight: var(--e-global-typography-92a90da-font-weight);
    text-transform: var(--e-global-typography-92a90da-text-transform);
    line-height: var(--e-global-typography-92a90da-line-height);
    letter-spacing: var(--e-global-typography-92a90da-letter-spacing);
    color: #FDFCF8;
    border: none;
    border-radius: 0;
    padding: 17px 20px 17px 20px;
    width: 100%;
    box-sizing: border-box;
    background-color: #F3F0E945!important;
}

/* Search Button */
.guesty-search-form button,
.guesty-home-search-form button,
.guesty-archive-search-form button {
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif!important;
    font-size: var(--e-global-typography-92a90da-font-size)!important;
    font-weight: var(--e-global-typography-92a90da-font-weight)!important;
    text-transform: var(--e-global-typography-92a90da-text-transform)!important;
    line-height: var(--e-global-typography-92a90da-line-height)!important;
    letter-spacing: var(--e-global-typography-92a90da-letter-spacing)!important;
    color: var(--e-global-color-7066d3b)!important;
    background-color: #7A7365!important;
    border: none!important;
    border-radius: 0px!important;
    padding: 21px 0!important;
    width: 100%;
    cursor: pointer;
    display: block;
    text-align: center;
    margin: 0;
}

/* Labels styling */
.guesty-search-form label,
.guesty-home-search-form label,
.guesty-archive-search-form label {
    display: block;
    margin-bottom: 5px;
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif;
    font-size: var(--e-global-typography-92a90da-font-size);
    font-weight: var(--e-global-typography-92a90da-font-weight);
    text-transform: var(--e-global-typography-92a90da-text-transform);
    color: #5d5d5d;
}

.guesty-search-form .guesty-date-range, .guesty-home-search-form .guesty-date-range, form.guesty-archive-search-form .guesty-date-range {
    font-family: var(--e-global-typography-92a90da-font-family), Sans-serif;
    font-size: var(--e-global-typography-92a90da-font-size);
    font-weight: var(--e-global-typography-92a90da-font-weight);
    text-transform: var(--e-global-typography-92a90da-text-transform);
    line-height: var(--e-global-typography-92a90da-line-height);
    letter-spacing: var(--e-global-typography-92a90da-letter-spacing);
    color: #FDFCF8;
    border: none;
    border-radius: 0;
    padding: 17px 20px 17px 20px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
    background-color: #F3F0E945!important;
}

form.guesty-search-form label, p.guesty-search-results-total, .guesty-search-form input[type="number"]::placeholder {
    color: #FDFCF8;
}

.p.guesty-search-results-total{
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
input.guesty-date-range.flatpickr-input::placeholder {
    color: #FDFCF8!important; /* Change this to your desired color */
    opacity: 1;     /* Firefox lowers the opacity by default, so set to 1 */
}

/* GUESTY HOME SEARCH */

form.guesty-home-search-form, form.guesty-archive-search-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    height: 56px;
    width: 100%;
    min-width: 1100px;
}


form.guesty-home-search-form .flatpickr-calendar {
    font-size: 12px!important;
    line-height: 22px!important;
    border-radius: 0px!important;
}

form.guesty-home-search-form input, form.guesty-home-search-form select, form.guesty-home-search-form button {
    height: 56px;
}

form.guesty-archive-search-form input, form.guesty-archive-search-form select, form.guesty-archive-search-form button {
    height: 56px;
}

/* Tablet Styles (Screens smaller than 1024px) */
@media (max-width: 1024px) {
    form.guesty-home-search-form, form.guesty-archive-search-form {
        flex-wrap: wrap;       /* Allows items to move to the next line */
        height: auto;          /* Let the height grow as items stack */
        min-width: 0;          /* Removes the 1100px restriction */
        gap: 10px;             /* Adds spacing between stacked elements */
    }

    form.guesty-home-search-form label,
    form.guesty-home-search-form input, 
    form.guesty-home-search-form select, 
    form.guesty-home-search-form button,
    form.guesty-archive-search-form label,
    form.guesty-archive-search-form input, 
    form.guesty-archive-search-formm select, 
    form.guesty-archive-search-form button {
        flex: 1 1 45%;         /* Elements take up roughly half the width */
        width: 100%;
    }
    
}

/* Mobile Styles (Screens smaller than 767px) */
@media (max-width: 767px) {
    form.guesty-home-search-form, form.guesty-archive-search-form {
        flex-direction: column; /* Stack everything in a single column */
        align-items: center;
        width: 100%;
    }

    form.guesty-home-search-form label,
    form.guesty-home-search-form input, 
    form.guesty-home-search-form select, 
    form.guesty-home-search-form button,
    form.guesty-archive-search-form label,
    form.guesty-archive-search-form input, 
    form.guesty-archive-search-formm select, 
    form.guesty-archive-search-form button {
        flex: 1 1 100%;        /* Each element takes full width */
        width: 100%;
        max-width: 100%;
    }
    
    /* Optional: Adjust height for better mobile finger-tapping */
    form.guesty-home-search-form input, 
    form.guesty-home-search-form select, 
    form.guesty-home-search-form button,
    form.guesty-archive-search-form label,
    form.guesty-archive-search-form input, 
    form.guesty-archive-search-formm select, 
    form.guesty-archive-search-form button {
        height: 50px; 
    }
}

/* Spinner for the Search Button */
.guesty-search-button.loading {
    color: transparent !important;
    position: relative;
    pointer-events: none; /* Prevents double clicks */
}

.guesty-search-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: guesty-spin 0.7s linear infinite;
}

@keyframes guesty-spin {
    to { transform: rotate(360deg); }
}


.wdm-property-page .wdm-guesty-quote-result .booking_summary_compact {
    font-size: 13px;
    line-height: 1.3;
    padding: 16px;
    color: #7A7365 !important;
    background-color: #FDFCF8 !important;
    border: 1px solid #E3DBCC;
}
.booking_summary_compact .result-grid {
    display: grid;
    grid-template-columns: 30% 30% 20% 20%;
    gap: 3px 0; /* very compact */
    border-bottom: 1px solid #E3DBCC;
    padding-bottom: 12px;
    margin-bottom: 10px;
}
.booking_summary_compact .result-row {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}
.result-row-col {
    margin: 0;
    padding: 0;
    width: auto;
}
.booking_summary_compact span {
    font-weight: 500;
    color: #7a7365;
}

.booking_summary_compact details {
    margin: 6px 0;
}

.booking_summary_compact summary {
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.booking_summary_compact summary::-webkit-details-marker {
    display: none;
}

.booking_summary_compact summary::after {
    content: " ▾";
}

.booking_summary_compact .total {
    font-weight: 600;
    margin: 12px 0;
}
