/**
 * Beds24 & WPRentals Frontend Calendar & Widget Styles
 *
 * Ensures accurate visual reflection of booked, closed, and past dates
 * on single property calendars and booking widgets.
 */

/* Disabled / Booked dates in WPRentals Calendar */
.wpestate_calendar.calendar-reserved,
.wpestate_calendar.calendar-reserved.disabled,
.wpestate_calendar.calendar-reserved.off,
.beds24-booked-cell {
    background-color: #d8efe6 !important;
    color: #8fa89b !important;
    cursor: not-allowed !important;
    position: relative;
    opacity: 0.75;
    pointer-events: none !important;
}

.wpestate_calendar.calendar-reserved:hover,
.beds24-booked-cell:hover {
    background-color: #d8efe6 !important;
}

/* Past Dates */
.wpestate_calendar.past_dates,
.wpestate_calendar.past_dates.disabled {
    background-color: #f4f6f8 !important;
    color: #b0b8c1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Today highlight */
.wpestate_calendar.today_date {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    font-weight: bold;
}

/* Datepicker popup styling */
.ui-datepicker td.ui-datepicker-unselectable.ui-state-disabled span {
    background-color: #f7f9fa;
    color: #bcc3ca;
    text-decoration: line-through;
    opacity: 0.6;
}

/* Daily Price labels inside WPRentals Calendar cells */
.wprentals_front_calendar_price {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
    letter-spacing: -0.2px;
}

.calendar-today .wprentals_front_calendar_price {
    color: #ffffff !important;
}

.calendar-reserved .wprentals_front_calendar_price {
    color: #94a3b8 !important;
    opacity: 0.7;
    text-decoration: line-through;
}

/* Datepicker & popup calendar prices */
.wpestate_show_price_calendar {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Minimum nights moon indicator */
.wprentals_front_calendar_nights {
    font-weight: 500;
    color: #64748b;
}

/* ==========================================================================
   PALAU SA FONT LUXURY SEARCH EXPERIENCE (BEDS24 LIVE SYNC)
   ========================================================================== */

/* 1. Hide blank unconfigured WPRentals filters on search results */
.page-template-advanced_search_results .wprentals_classic_search_title_wrapper .advanced_filters,
.page-template-advanced_search_results #property_list_filters,
.page-template-advanced_search_results .property_list_filters_search {
    display: none !important;
}

/* 2. Top Search Summary Bar */
.beds24-search-summary-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 24px;
    margin: 20px 0 25px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: inherit;
}

.beds24-summary-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.beds24-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.beds24-summary-item .beds24-icon {
    font-size: 24px;
    line-height: 1;
}

.beds24-item-text {
    display: flex;
    flex-direction: column;
}

.beds24-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    font-weight: 600;
}

.beds24-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2px;
}

.beds24-summary-sep {
    width: 1px;
    height: 36px;
    background: #e2e8f0;
}

.beds24-summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.beds24-badge {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.beds24-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* 3. Section Header */
.beds24-section-header {
    margin-bottom: 25px;
}

.beds24-section-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.beds24-section-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* 4. Property Card Refinements */
.listing_wrapper.property_unit_v4,
.listing_wrapper.property_unit_v2 {
    border-radius: 12px !important;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eef2f6;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.listing_wrapper.property_unit_v4:hover,
.listing_wrapper.property_unit_v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Hide default simple price on unit card when beds24 footer is active */
.listing_wrapper:has(.beds24-card-footer) .wprentals-card-unit-details-wrapper > div[itemprop="offers"] {
    display: none !important;
}

/* 5. Beds24 Card Booking Footer */
.beds24-card-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.beds24-card-pricing {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.beds24-price-primary {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.beds24-val-night {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.beds24-lbl-night {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.beds24-price-total {
    font-size: 13px;
    color: #334155;
}

.beds24-price-total strong {
    font-weight: 700;
    color: #0f172a;
}

.beds24-tax-note {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}

/* 6. VER Y RESERVAR Luxury CTA Button */
.beds24-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #8d6e63 !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(141, 110, 99, 0.25) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.beds24-btn-action:hover,
.beds24-btn-action:focus {
    background-color: #6d4c41 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(109, 76, 65, 0.35) !important;
    text-decoration: none !important;
}

.beds24-btn-action svg {
    transition: transform 0.2s ease;
}

.beds24-btn-action:hover svg {
    transform: translateX(3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .beds24-search-summary-bar {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    .beds24-summary-sep {
        display: none;
    }
    .beds24-summary-left {
        width: 100%;
        justify-content: space-between;
    }
    .beds24-section-title {
        font-size: 22px;
    }
}

