/**
 * Frontend Style - Cafe Branch Booking Pro
 * Implementation: Full-Width Bar with Centered Content
 */

/* --- 1. CORE RESET (Scoped to Plugin Only) --- */
[class^="cbb-"], [class^="cbb-"] * {
    box-sizing: border-box !important;
}

:root {
    --cbb-bg-beige: #edece6;
    --cbb-brand-tan: #c5a47e;
    --cbb-brand-blue: #0066ff;
    --cbb-text-dark: #1a1a1a;
    --cbb-white: #ffffff;
}

/* --- 2. FULL WIDTH BREAKOUT --- 
   This forces the background to span 100% of the screen width 
   without breaking the rest of your theme layout.
*/
.cbb-full-width-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #eae7de;
    padding: 20px 0;
    z-index: 10;
    overflow: hidden;
    border-radius:8px;
}

/* --- 3. CENTERED CONTENT CONTAINER --- */
.cbb-centered-container {
    max-width: 1200px; /* Aligns with standard theme containers */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 4. THE BOOKING BAR LAYOUT --- */
.cbb-booking-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

/* Individual Field Groups */
.cbb-field-group {
    flex: 1;
    min-width: 130px;
}

/* The White Input Box Styling */
.cbb-input-box {
    background: var(--cbb-white);
    height: 50px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cbb-input-box:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Select, Input, and Flatpickr Formatting */
.cbb-input-box select, 
.cbb-input-box input,
.cbb-input-box .flatpickr-input {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 40px 0 15px !important; /* Space on right for icon */
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 16px;
    color: #c7a17a;
    outline: none !important;
    appearance: none !important;
    cursor: pointer;
    box-shadow: none !important;
}

/* Icons inside the boxes */
.cbb-field-icon {
    position: absolute;
    right: 12px;
    border-left: 1px solid #f0f0f0;
    padding-left: 10px;
    height: 24px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cbb-field-icon svg {
    fill: var(--cbb-brand-tan);
}

/* Connector Labels (FOR, IN, AT) */
.cbb-connector-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: var(--cbb-text-dark);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- 5. THE SUBMIT BUTTON --- */
.cbb-main-submit-btn {
    background-color: #c7a17a;
    color: var(--cbb-white);
    border: none;
    padding: 0 35px;
    height: 50px;
    border-radius: 10px; /* Pill Shape */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.cbb-main-submit-btn:hover {
    background-color: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

/* --- 6. RESPONSIVE DESIGN --- */

/* Tablet & Laptop (Stack into two rows) */
@media (max-width: 1024px) {
    .cbb-booking-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    .cbb-field-group {
        flex: 1 1 45%; /* Two items per row */
    }
    .cbb-main-submit-btn {
        width: 100%;
    }
}

/* Mobile (Fully Vertical Stack) */
@media (max-width: 767px) {
    .cbb-full-width-wrapper {
        padding: 30px 0;
    }
    .cbb-booking-bar {
        flex-direction: column;
        gap: 10px;
    }
    .cbb-field-group {
        width: 100%;
    }
    .cbb-connector-label {
        margin: 5px 0;
        opacity: 0.6;
    }
}

/* --- 7. FLATPICKR THEME OVERRIDE --- */
.flatpickr-calendar.cbb-custom-picker {
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--cbb-bg-beige);
}

.flatpickr-day.selected {
    background: var(--cbb-brand-tan) !important;
    border-color: var(--cbb-brand-tan) !important;
}