/* Guesty Quote Styles */
.wdm-guesty-quote-result {
    margin-top: 10px;
    display: none;
    font-size: 14px; 
    border: none;
    padding: 0;
    background-color: #f9f9f900;
}

/* Checkout and Change buttons */
.wdm-checkout-btn {
    display: inline-block;
    padding: 12px 20px;
    width: 100%!important;
    background-color: #ffffff;
    font-size: 12px!important;
    letter-spacing: 2px!important;
    text-transform: uppercase!important;
    color: #9B6B43!important;
    text-align: center;
    text-decoration: none;
    border-radius: 0;
}

.wdm-checkout-btn:hover {
    background-color: #044236!important;
}
/* Change button styles */
.wdm-change-btn {
    display: inline-block;
    width: 100%!important;
    margin-top: 10px;
    padding: 0!important;
    background-color: #9B6B43!important;
    color: #ffffff!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: #000000!important;
}

/* Calendar styles */
#wdm-guesty-new-datepicker {
    width: 100%;
}
#wdm-guesty-date-input {
  width: 100%;
  padding: 10px;
  font-size: 12px;
  color: #9B6B43!important;
  background-color: #e3dbcc00!important;
  border: 1px solid #ccc;
  border-radius: 0!important;
  padding: 17px 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: #044236; /* Change placeholder color */
    padding: 18px 10px!important;
    font-family: var(--e-global-typography-e30d7ad-font-family), Sans-serif!important;
    font-size: var(--e-global-typography-e30d7ad-font-size)!important;
    text-transform: uppercase!important;
}

/* =========================================================================
   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 */
    width: 100%;
}
.wdm-property-page .booking_summary {
    max-width: 600px;
}
.wdm-property-page .booking_summary h4 {
    font-size: 1.2rem;
    font-weight: 400;
}

.booking-summary-table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    border: 0px solid #9B6B43;
    font-size: 14px;
}

.booking-summary-table th,
.booking-summary-table td {
    padding: 8px;
    border: 0;
    background-color: transparent;
}

.booking-summary-table th {
    text-align: left;
    color: #000000;
    font-weight: 500;
    width: 50%;
}

.booking-summary-table td {
    text-align: right;
    color: #000000;
}

/* Highlight total row */
.booking-summary-table tr.total-price th,
.booking-summary-table tr.total-price td {
    font-weight: 700;
    background-color: rgba(155, 107, 67, 0.08);
}


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

.wdm-property-page .wdm-checkout-btn {
    padding: 12px 20px;
    background-color: #9B6B43 ;
    color: #ffffff !important; /* Text color */
    /* ... other styles from your code ... */
}
.wdm-property-page .wdm-checkout-btn:hover {
    background-color: #044236; /* Accent color */
}

.wdm-property-page .wdm-change-btn {
    background-color: transparent !important; 
    color: #9B6B43 !important; /* Text color */
    /* ... other styles from your code ... */
}
.wdm-property-page .wdm-change-btn:hover {
    color: #000000 !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: #044236 !important; /* Text color */
    background-color: #ffffff !important; /* Site background */
    border: 1px solid #044236; /* Secondary/Divider color */
    padding: 18px 10px!important;
    font-family: var(--e-global-typography-e30d7ad-font-family), Sans-serif!important;
    font-size: var(--e-global-typography-e30d7ad-font-size)!important;
    font-weight: 400!important;
    text-transform: var(--e-global-typography-e30d7ad-font-size)!important;
    line-height: var(--e-global-typography-e30d7ad-line-height)!important;
    letter-spacing: var(--e-global-typography-e30d7ad-letter-spacing)!important;
    /* ... 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: #ffffff !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: #9B6B43;
    font-size: 12px !important;
    font-weight: 400;
}
.wdm-property-page .flatpickr-months .flatpickr-prev-month,
.wdm-property-page .flatpickr-months .flatpickr-next-month {
    color: #9B6B43;
    fill: #9B6B43;
}

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

/* Day Cells (General) */
.wdm-property-page .flatpickr-day {
    color: #000000;
    font-size: 13px !important;
    height: 32px;
    line-height: 32px;
    border-radius: 0 !important;
}
.wdm-property-page .flatpickr-day:hover {
    background-color: #ffffff; /* 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: #ffffff !important; 
    /* Text 1 color, but with reduced opacity to signify unavailability */
    color: #9B6B43 !important; 
    border-color: #ffffff !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: #cf3040 !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: #044236 !important; /* Accent color */
    border-color: #044236 !important;
    color: #ffffff !important; /* Primary color for contrast */
}
.wdm-property-page .flatpickr-day.inRange {
    background: #9b6b4397 !important; /* Secondary/Nude color for range fill */
    border-color: #9b6b4397 !important;
    color: #000000 !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-weight: 400;
    line-height: 1.4em;
    text-wrap: nowrap;
    text-align: left;
    margin-bottom: 0;
}

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

/* Search Form Container */
/* Desktop layout */
.guesty-search-form {
    display: grid;
    grid-template-columns: repeat(10, 2fr);
    gap: 5px;
    width: 100%;
    margin-bottom: 0;
}
.small-grid  { grid-column: span 1; }
.medium-grid { grid-column: span 2; }
.large-grid  { grid-column: span 3; }
.large-xl-grid  { grid-column: span 3;}
/* Uniform height for inputs, selects, and buttons */
.guesty-search-form input,
.guesty-search-form select,
.guesty-search-form button {
    height: 56px;
    margin: 0;
}

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

    .guesty-search-form input,
    .guesty-search-form select,
    .guesty-search-form button {
        width: 100%;       /* full width */
    }
/*
    input.guesty-date-range.flatpickr-input,
    .guesty-search-form button {
        grid-column: auto;  override desktop spans 
    }*/
    .small-grid  { grid-column: span 1; }
    .medium-grid { grid-column: span 2; }
    .large-grid  { grid-column: span 2; }
    .large-xl-grid  { grid-column: span 2;}
}

/* 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-e30d7ad-font-family), Sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    line-height: var(--e-global-typography-e30d7ad-line-height);
    letter-spacing: 1px;
    color: #ffffff!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-e30d7ad-font-family), Sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    line-height: var(--e-global-typography-e30d7ad-line-height);
    letter-spacing: 1px;
    color: #ffffff;
    border: 0px solid #E3DBCC61;
    border-radius: 0px;
    padding: 21px 20px 20px 20px;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff45!important;
}

.guesty-search-form select option,
.guesty-home-search-form select option,
form.guesty-archive-search-form select option {
  background-color: #ffffff;
 /* Sets background color of dropdown options */
  color: #9B6B43;
}

/* 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-e30d7ad-font-family), Sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    line-height: var(--e-global-typography-e30d7ad-line-height);
    letter-spacing: 1px;
    color: #FDFCF8;
    border: none;
    border-radius: 0;
    padding: 17px 20px 17px 20px;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff45!important;
}

/* Search Button */
.guesty-search-form button,
.guesty-home-search-form button,
.guesty-archive-search-form button {
    font-family: var(--e-global-typography-e30d7ad-font-family), Sans-serif!important;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase!important;
    line-height: var(--e-global-typography-e30d7ad-line-height)!important;
    letter-spacing: var(--e-global-typography-e30d7ad-letter-spacing)!important;
    color: var(--e-global-color-7066d3b)!important;
    background-color: #9B6B43;
    border: none!important;
    border-radius: 0px!important;
    width: 100%;
    cursor: pointer;
    display: block;
    text-align: center;
    margin: 0;
}
.guesty-search-form button:hover,
.guesty-home-search-form button:hover,
.guesty-archive-search-form button:hover {
    color: #ffffff;
    background-color: #044236;
}

/* 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-e30d7ad-font-family), Sans-serif;
    font-size: var(--e-global-typography-e30d7ad-font-size);
    font-weight: var(--e-global-typography-e30d7ad-font-weight);
    text-transform: var(--e-global-typography-e30d7ad-font-size);
    color: #9B6B43;
}

.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-e30d7ad-font-family), Sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    line-height: var(--e-global-typography-e30d7ad-line-height);
    letter-spacing: 1px;
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 17px 20px 17px 20px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff45!important;
}

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

.p.guesty-search-results-total{
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
input.guesty-date-range.flatpickr-input::placeholder {
    color: #ffffff!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%;
    }

    .guesty-search-form {
        display: grid;
        grid-template-columns: repeat(2, 8fr);
        gap: 5px;
        width: 100%;
        margin-bottom: 0;
    }
    .small-grid  { grid-column: span 1; }
    .medium-grid { grid-column: span 2; }
    .large-grid  { grid-column: span 2; }
    .large-xl-grid  { grid-column: span 2;}
    
}

/* 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); }
}