/* =========================================
   Import Google Fonts
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* =========================================
   Book Buddies Form - Main Wrapper & Typography
========================================= */
#bb-booking-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Outfit', sans-serif;
    color: #4a4a4a;
    background: #ffffff;
}

fieldset.bb-step { border: none; padding: 0; margin: 0; min-width: 0; }

#bb-booking-wrapper h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    margin-bottom: 35px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* =========================================
   Progress Bar (5 Steps)
========================================= */
#bb-progressbar {
    display: flex; justify-content: space-between; list-style: none;
    padding: 0; margin: 0 0 60px 0; position: relative;
}
#bb-progressbar::before {
    content: ''; position: absolute; top: 15px; left: 0;
    width: 100%; height: 1px; background: #eaeaea; z-index: 1;
}
#bb-progressbar li {
    position: relative; z-index: 2; text-align: center;
    font-size: 14px; color: #999; background: #fff;
    padding: 0 15px; display: flex; align-items: center;
    gap: 12px; font-weight: 400;
}
#bb-progressbar li::before {
    content: '1'; width: 32px; height: 32px; background: #f4f4f4;
    border-radius: 50%; display: flex; justify-content: center;
    align-items: center; color: #888; font-weight: 500;
    font-size: 14px; transition: all 0.3s ease;
}

#bb-progressbar li:nth-child(1)::before { content: '1'; }
#bb-progressbar li:nth-child(2)::before { content: '2'; }
#bb-progressbar li:nth-child(3)::before { content: '3'; }
#bb-progressbar li:nth-child(4)::before { content: '4'; }
#bb-progressbar li:nth-child(5)::before { content: '5'; }

#bb-progressbar li.active { color: #2c3e50; font-weight: 500; }
#bb-progressbar li.active::before {
    background: #e694a5; color: #ffffff; content: '✓'; 
    box-shadow: 0 4px 10px rgba(230, 148, 165, 0.3);
}

/* =========================================
   Layout Grids
========================================= */
.bb-options { display: grid; gap: 20px; margin-bottom: 40px; }
.bb-grid-2 { grid-template-columns: 1fr 1fr; }
.bb-grid-1 { grid-template-columns: 1fr; }
.bb-time-grid { grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px;}

/* =========================================
   Card Styling (Service & Location)
========================================= */
.bb-card {
    display: block; border: 1px solid #e8e8e8; border-radius: 10px;
    padding: 24px; cursor: pointer; transition: all 0.25s ease-in-out;
    background: #ffffff; text-align: left; position: relative; overflow: hidden;
}
.bb-card:hover { border-color: #dcdcdc; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.bb-card-content strong {
    display: block; font-size: 18px; margin-bottom: 8px;
    color: #1a1a1a; font-weight: 600; font-family: 'Outfit', sans-serif;
}
.bb-card-content span { font-size: 14px; color: #666; line-height: 1.6; font-weight: 300; }
.bb-options input[type="radio"] { display: none; }
.bb-card:has(input[type="radio"]:checked) {
    border-color: #e694a5; background-color: #fcf6f7; box-shadow: 0 0 0 1px #e694a5;
}

/* =========================================
   Date Picker Input Custom Styling
========================================= */
#bb-date-picker {
    width: 100%;
    padding: 16px 20px;
    margin-top: 10px;
    margin-bottom: 25px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #1a1a1a;
}
#bb-date-picker:hover { border-color: #dcdcdc; }
#bb-date-picker:focus, #bb-date-picker.active {
    outline: none; border-color: #e694a5; box-shadow: 0 0 0 3px rgba(230, 148, 165, 0.15);
}

/* =========================================
   Time Slot Styling
========================================= */
.bb-time-slot {
    display: flex; justify-content: center; align-items: center;
    border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px;
    cursor: pointer; font-size: 15px; color: #4a4a4a;
    background: #fff; transition: all 0.2s ease; font-weight: 400;
}
.bb-time-slot:hover { border-color: #dcdcdc; background: #fafafa; }
.bb-time-slot:has(input[type="radio"]:checked) {
    border-color: #e694a5; background-color: #fcf6f7;
    color: #2c3e50; font-weight: 600; box-shadow: 0 0 0 1px #e694a5;
}

/* =========================================
   Form Inputs (Info Step) - FIXED SPACING
========================================= */
.bb-input-label { 
    display: block; 
    font-weight: 500; 
    margin-bottom: 25px; /* Creates gap between different fields */
    color: #2c3e50; 
    font-size: 15px; 
}

.bb-step input[type="text"], 
.bb-step input[type="email"], 
.bb-step textarea {
    display: block; /* Ensures input goes below the text */
    width: 100%; 
    padding: 15px 18px; 
    margin-top: 12px; /* <--- THIS IS THE FIX: Gap between text and input box */
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    font-size: 15px;
    background: #fafafa; 
    box-sizing: border-box; 
    font-family: 'Outfit', sans-serif; 
    transition: all 0.3s ease;
    color: #1a1a1a;
}
.bb-step textarea { min-height: 120px; resize: vertical; }

.bb-step input[type="text"]:focus, 
.bb-step input[type="email"]:focus, 
.bb-step textarea:focus {
    outline: none; border-color: #e694a5; background: #ffffff; box-shadow: 0 0 0 3px rgba(230, 148, 165, 0.15);
}

/* =========================================
   Buttons & Disabled State Styling
========================================= */
.bb-step button {
    padding: 14px 38px; border-radius: 40px; font-size: 15px;
    font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-family: 'Outfit', sans-serif;
}
button.next-step, #bb-submit-btn { background: #e694a5; color: #ffffff; border: none; float: right; box-shadow: 0 4px 12px rgba(230, 148, 165, 0.3); }
button.next-step:hover:not(:disabled), #bb-submit-btn:hover:not(:disabled) { background: #d47e8f; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(230, 148, 165, 0.4); }
button.prev-step { background: #ffffff; color: #4a4a4a; border: 1px solid #dcdcdc; float: left; }
button.prev-step:hover:not(:disabled) { border-color: #b0b0b0; color: #1a1a1a; background: #fafafa; }

/* Disabled Button Styles */
button.next-step:disabled, 
button.prev-step:disabled,
#bb-submit-btn:disabled {
    background: #f4f4f4 !important; color: #b0b0b0 !important;
    border: 1px solid #e0e0e0 !important; cursor: not-allowed !important;
    box-shadow: none !important; transform: none !important;
}

.bb-step::after { content: ""; clear: both; display: table; }

/* =========================================
   Confirm & Review Step
========================================= */
#bb-review-details { background: #ffffff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 30px 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
#bb-review-details ul { list-style: none; padding: 0; margin: 0; }
#bb-review-details li { padding: 20px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; font-size: 16px; align-items: center; }
#bb-review-details li strong { color: #777; font-weight: 400; }
#bb-review-details li span { color: #1a1a1a; font-weight: 500; text-align: right; }
#bb-review-details li:last-child { border-bottom: none; padding-bottom: 0; }
#bb-review-details li:first-child { padding-top: 0; }

/* =========================================
   Thank You Popup Modal
========================================= */
#bb-thank-you-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 9999; display: flex; justify-content: center; align-items: center;
}
.bb-modal-content { background: #fff; padding: 50px; border-radius: 16px; text-align: center; max-width: 450px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); margin: 0 20px; }
.bb-modal-content h2 { color: #e694a5; margin-top: 0; margin-bottom: 15px; font-size: 40px; font-family: 'Cormorant Garamond', serif; }
.bb-modal-content p { font-size: 16px; color: #666; line-height: 1.6; }
.bb-modal-content button {
    margin-top: 30px; background: #e694a5; color: #fff; border: none;
    padding: 14px 40px; border-radius: 40px; cursor: pointer; font-weight: 600; font-family: 'Outfit', sans-serif; transition: all 0.3s ease;
}
.bb-modal-content button:hover { background: #d47e8f; transform: translateY(-2px); }

/* Flatpickr Popup Calendar Theme */
.flatpickr-calendar { font-family: 'Outfit', sans-serif !important; border-radius: 10px !important; box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important; border: 1px solid #e8e8e8 !important; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: #e694a5 !important; border-color: #e694a5 !important; color: #fff !important; }
.flatpickr-day:hover { background: #fdf2f4 !important; border-color: transparent !important; color: #333 !important; }


/* =========================================
   📱 MOBILE RESPONSIVE OPTIMIZATIONS
========================================= */

@media (max-width: 768px) {
    #bb-booking-wrapper { padding: 0 20px; margin: 20px auto; }
    #bb-booking-wrapper h2 { font-size: 26px; margin-bottom: 25px; }

    #bb-progressbar { margin: 0 0 40px 0; }
    #bb-progressbar::before { top: 14px; }
    #bb-progressbar li { flex-direction: column; gap: 8px; font-size: 12px; padding: 0; line-height: 1.2; }
    #bb-progressbar li::before { width: 28px; height: 28px; font-size: 13px; z-index: 2; margin: 0 auto; }

    .bb-grid-2 { grid-template-columns: 1fr; gap: 15px; }
    .bb-time-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }

    .bb-card { padding: 18px; }
    .bb-card-content strong { font-size: 16px; margin-bottom: 6px; }
    .bb-card-content span { font-size: 13px; }

    /* Form Inputs Mobile Adjustments */
    .bb-input-label { font-size: 14px; margin-bottom: 20px; }
    .bb-step input[type="text"], 
    .bb-step input[type="email"], 
    .bb-step textarea {
        padding: 12px 16px; 
        font-size: 14px; 
        margin-top: 8px; /* Mobile gap */
    }
    .bb-step textarea { min-height: 90px; } 
}

@media (max-width: 480px) {
    #bb-booking-wrapper { padding: 0 15px; }
    #bb-booking-wrapper h2 { font-size: 24px; margin-bottom: 20px; }
    #bb-progressbar li { font-size: 10px; gap: 6px; }

    .bb-time-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .bb-time-slot { padding: 12px; font-size: 13px; }
    .bb-step button { padding: 12px 24px; font-size: 14px; }

    #bb-review-details { padding: 20px; }
    #bb-review-details li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 15px 0; }
    #bb-review-details li span { text-align: left; font-size: 14px; }
    #bb-review-details li strong { font-size: 13px; }
}