/* =========================================
   1. GLOBAL VARIABLES & TYPOGRAPHY
   ========================================= */
:root {
    --ww-primary: #2c3e50; /* Dark Navy - Professional */
    --ww-accent: #e67e22;  /* Orange/Gold - Call to Action */
    --ww-bg-light: #f8f9fa;
    --ww-border-radius: 8px;
    --ww-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --ww-transition: all 0.3s ease;
}

.workways-btn {
    cursor: pointer;
    transition: var(--ww-transition);
    font-family: inherit;
}

/* =========================================
   2. SEARCH PAGE (CUSTOM AVAILABILITY BAR)
   ========================================= */

.wwp-availability-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Spacing between inputs */
    background: #ffffff;
    padding: 20px;
    border-radius: var(--ww-border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    align-items: flex-end; /* Aligns button with inputs */
    margin-bottom: 40px; /* Space below search bar */
}

/* Inputs & Selects - STRICT ALIGNMENT FIX */
.wwp-availability-bar input[type="date"],
.wwp-availability-bar select {
    margin-top: 0 !important; /* <--- FIXED: Align with button */
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #f9f9f9;
    width: 100%;
    transition: border-color 0.2s;
    height: 45px !important; /* <--- FIXED: Force matching height */
    box-sizing: border-box;
    display: block;
    line-height: normal; /* Fixes safari alignment */
}

.wwp-availability-bar input:focus,
.wwp-availability-bar select:focus {
    border-color: var(--ww-accent);
    background-color: #fff;
    outline: none;
}

/* Check Availability Button */
#check-availability-btn {
    background-color: var(--ww-accent) !important; /* Orange */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0 25px;
    height: 45px !important; /* <--- FIXED: Exact match */
    line-height: 45px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex: 0 0 auto;
}

#check-availability-btn:hover {
    background-color: #d35400 !important; /* Darker Orange on hover */
    transform: translateY(-1px);
}

/* Force hide the availability checker calendar on listing cards */
.jet-listing-grid__item .workways-calendar,
.workways-room-card .workways-calendar {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* =========================================
   MAKE WHOLE CARD CLICKABLE (Stretched Link)
   ========================================= */

/* Ensure the card is the reference point */
.workways-room-card {
    position: relative; 
}

/* Expand the button's hit area to fill the card */
.workways-book-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits above content */
    cursor: pointer;
}

/* Optional: Add a hover effect to the whole card to indicate clickability */
.workways-room-card:hover {
    border-color: var(--ww-accent);
    cursor: pointer;
}

/* =========================================
   SEARCH BAR STYLING
   ========================================= */

/* Default Mode (If used alone) */
.wwp-availability-bar-inner {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.wwp-bar-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.wwp-inputs-row {
    align-items: flex-end; 
}

/* Quick Buttons (Search Bar) */
.wwp-qbtn-filter {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
}
.wwp-qbtn-filter:hover { background: #eee; border-color: #ccc; }
.wwp-qbtn-filter.active { background: #2c3e50; color: #fff; border-color: #2c3e50; }

/* Inputs */
.wwp-input-group { flex: 1; display: flex; flex-direction: column; }
.wwp-input-group label { font-size: 0.85em; font-weight: 600; margin-bottom: 5px; color: #444; }
.wwp-input-group input, .wwp-input-group select { padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1em; height: 42px; }

/* Check Button */
.wwp-btn-group button {
    background: #2c3e50; color: white; border: none; padding: 0 20px; height: 42px;
    border-radius: 4px; cursor: pointer; font-weight: 600; text-transform: uppercase; width: 100%;
}
.wwp-btn-group button:hover { background: #34495e; }

/* =========================================
   NAKED MODE (For integration next to Filters)
   ========================================= */
.wwp-availability-bar-inner.wwp-naked {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    margin: 0;
}

.wwp-naked .wwp-inputs-row { margin-bottom: 0; gap: 10px; }

/* Force height/radius to match common JetSmartFilters defaults */
.wwp-naked input, .wwp-naked select, .wwp-naked button {
    height: 40px; 
    border-radius: 4px; 
    font-size: 14px;
}

/* Compact Quick Buttons */
.wwp-naked .wwp-buttons-row { margin-bottom: 5px; gap: 5px; }
.wwp-naked .wwp-qbtn-filter { padding: 2px 8px; font-size: 11px; text-transform: uppercase; background: #eee; border: none; }
.wwp-naked .wwp-qbtn-filter.active { background: #000; color: #fff; }
.wwp-label-sm { font-size: 11px; font-weight: bold; color: #888; align-self: center; }

/* Responsive */
@media (max-width: 768px) {
    .wwp-bar-row { flex-direction: column; }
}

/* =========================================
   FORCE BUTTON STYLING
   ========================================= */
#workways-booking-form button[type="submit"],
#workways-registration-form button[type="submit"] {
    background-color: #005580 !important;
    color: #ffffff !important;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 1;
    visibility: visible;
}

#workways-booking-form button[type="submit"]:disabled,
#workways-registration-form button[type="submit"]:disabled {
    background-color: #668da3 !important;
    cursor: not-allowed;
}

/* Fix "Low Down" issue visually by adding margin bottom */
.workways-booking-wrapper {
    padding-bottom: 50px;
}

/* =========================================
   3. FINAL BOOKING FORM STYLING (v3.5)
   ========================================= */

/* 1. High-Contrast Quick Select Buttons */
.wwp-quick-buttons .wwp-qbtn {
    background-color: #ffffff !important; /* Force white background */
    color: #2c3e50 !important;            /* Force Dark Navy Text */
    border: 1px solid #2c3e50 !important; /* Force Dark Navy Border */
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.wwp-quick-buttons .wwp-qbtn:hover {
    background-color: #f0f4f8 !important; /* Light blue hover */
}

.wwp-quick-buttons .wwp-qbtn.active {
    background-color: #2c3e50 !important; /* Dark Navy Fill */
    color: #ffffff !important;            /* White Text */
    border-color: #2c3e50 !important;
}

/* 2. FORCE One-Line Layout for Date/Time/People (Desktop) */
@media (min-width: 992px) {
    /* We use !important to override any theme defaults */
    #workways-booking-form .workways-form-grid {
        display: grid !important;
        grid-template-columns: 2fr 1fr 1fr 1fr !important; /* Date | Start | End | People */
        gap: 15px !important;
        align-items: end !important;
    }
    
    #workways-booking-form .workways-form-row {
        grid-column: span 1 !important; 
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}

/* 3. Sleek Price Display */
.workways-price-box {
    background: transparent !important;
    border-top: 1px solid #eee;
    padding: 15px 0 !important;
    margin-top: 20px !important;
    text-align: right !important;
}

.workways-price-box span {
    font-size: 0.8em;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    margin-right: 10px;
    display: inline-block !important;
}

.workways-price {
    font-size: 1.5rem !important; /* Reduced size */
    color: #2c3e50 !important;
    font-weight: 800;
}


/* ——— FINAL FIX: OVERRIDE PHP INLINE STYLES ——— */
#workways-booking-form .wwp-quick-buttons .wwp-qbtn {
    background-color: #ffffff !important;   /* White Background */
    color: #2c3e50 !important;              /* Dark Navy Text (Forces Override) */
    border: 2px solid #2c3e50 !important;   /* Dark Navy Border */
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 600 !important;
    min-width: 100px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Active State (Selected) */
#workways-booking-form .wwp-quick-buttons .wwp-qbtn.active {
    background-color: #2c3e50 !important;   /* Dark Navy Fill */
    color: #ffffff !important;              /* White Text */
    border-color: #2c3e50 !important;
}

/* Hover State */
#workways-booking-form .wwp-quick-buttons .wwp-qbtn:hover {
    background-color: #f0f4f8 !important;
    transform: translateY(-1px);
}