/* Kenfig Club Booking System Styles */

/* General Wrapper */
.kc-booking-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 1100px; /* Updated from 1000px to 1100px */
    margin: 20px auto;
    padding: 25px;
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.kc-booking-wrapper h1 {
    font-size: 1.5em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    text-transform: capitalize;
}

/* Mobile optimisation */
@media (max-width: 600px) {
  .kc-booking-wrapper h1 {
    font-size: 1rem;   /* smaller for mobiles */
    line-height: 1.3;
    word-wrap: break-word;
  }
}

.kc-booking-wrapper p {
    font-size: 1.1em;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* Section Titles */
.kc-section-title, .bpa-front-module-heading {
    font-size: 1.6em;
    color: #34495e;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-transform: capitalize;
    text-align: center; /* Center section titles */
}

/* Multi-step Tabs (bpa-front-tabs) */
.bpa-front-tabs {
    display: flex; /* Changed from inline-flex to flex for better responsiveness */
    flex-direction: column; /* Vertical tabs */
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden; /* Contains children with rounded corners */
}

.bpa-front-tab-menu {
    display: flex;
    flex-direction: row; /* Horizontal menu at the top for smaller screens */
    border-bottom: 1px solid #e0e0e0; /* Separator for horizontal menu */
    background-color: #f0f0f0;
}

.bpa-front-tab-menu--item {
    flex: 1; /* Distribute items evenly */
    padding: 15px 10px;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-right: 1px solid #e0e0e0; /* Separator between items */
    transition: all 0.3s ease;
    cursor: pointer;
}

.bpa-front-tab-menu--item:last-child {
    border-right: none;
}

.bpa-front-tab-menu--item:hover:not(.bpa-front-disabled-menu-item) {
    background-color: #e9e9e9;
    color: #333;
}

.bpa-front-tab-menu--item.__bpa-is-active {
    background-color: #007bff;
    color: #fff;
    cursor: default;
    border-color: #007bff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.bpa-front-tab-menu--item.__bpa-is-active .bpa-front-tm--item-icon svg {
    fill: #fff; /* Fill SVG icons with white when active */
}

.bpa-front-tab-menu--item.bpa-front-disabled-menu-item {
    opacity: 0.6;
    cursor: not-allowed;
    color: #888;
    background-color: #f8f8f8;
}

.bpa-front-tab-menu--item.bpa-front-disabled-menu-item .bpa-front-tm--item-icon svg {
    fill: #888; /* Dim disabled SVG icons */
}

.bpa-front-tm--item-icon svg {
    width: 24px;
    height: 24px;
    fill: #555; /* Default SVG icon color */
    transition: fill 0.3s ease;
}

.bpa-front-tm--item-label {
    font-size: 0.9em;
}

.bpa-front-tabs--panel-body {
    padding: 20px;
    background-color: #fff;
}

.bpa-front-tab-panel {
    display: none; /* Hidden by default */
}

.bpa-front-tab-panel.__bpa-is-active {
    display: block; /* Show active panel */
}

/* Default Card Style for Panels */
.bpa-front-default-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bpa-front-dc--body {
    padding: 20px;
}

.bpa-front-dc--footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
}

.bpa-front-tabs--foot {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

/* Service Selection (Step 1) */
.bpa-front-module--service-items-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.bpa-fm--si--col {
    flex: 1 1 auto; /* Allow items to grow/shrink */
    max-width: 300px; /* Max width for each service item */
}

.bpa-front-module--service-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: #fff;
}

.bpa-front-module--service-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.bpa-front-module--service-item.__bpa-is-selected {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    background-color: #e6f2ff; /* Light blue background for selected */
}

.bpa-front-si-card {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.bpa-front-si-card--checkmark-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #007bff;
    font-size: 28px;
    display: none; /* Hidden by default, shown when selected */
}

.bpa-front-module--service-item.__bpa-is-selected .bpa-front-si-card--checkmark-icon {
    display: block;
}

.bpa-front-si__default-img svg {
    width: 48px;
    height: 48px;
    fill: #007bff;
}

.bpa-front-si__card-body {
    flex-grow: 1;
}

.bpa-front-si__card-body--heading {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.bpa-front-si-cb__specs {
    display: flex;
    gap: 15px;
    font-size: 0.95em;
    color: #666;
}

.bpa-front-si-cb__specs-item strong {
    color: #2c3e50;
}

.--is-service-price {
    font-weight: bold;
    color: #28a745; /* Green for price */
}

/* Date & Time Selection (Step 2) */
.bpa-front--dt__wrapper {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px;
    margin-top: 20px;
}

.bpa-front--dt__col {
    flex: 1;
    min-width: 300px; /* Ensure columns don't get too small */
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

.bpa-front--dt__calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kc-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    padding: 0 10px;
}

.kc-current-month-year {
    font-size: 1.3em;
    font-weight: 700;
    color: #34495e;
    margin: 0;
}

.kc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    gap: 5px;
    text-align: center;
}

.kc-weekday {
    font-weight: 600;
    color: #777;
    padding: 8px 0;
    font-size: 0.9em;
}

.kc-day-cell {
    padding: 10px 0;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #333;
    border: 1px solid #eee;
}

.kc-day-cell:hover:not(.kc-day-cell--disabled):not(.kc-day-cell--selected) {
    background-color: #e9f5ff;
    border-color: #a0d3ff;
}

.kc-day-cell--disabled {
    background-color: #f0f0f0;
    color: #bbb;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.7;
}

.kc-day-cell--selected {
    background-color: #007bff;
    color: #fff;
    font-weight: 700;
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Time Slots (within Date & Time) */
.bpa-front--dt__time-slots {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bpa-front--dt__ts-heading .bpa-front-module-heading {
    margin-top: 0;
    margin-bottom: 0;
    border-bottom: none;
    text-align: left;
}

.bpa-front--dt__ts-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bpa-front--dt__ts-body--row {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.bpa-front--dt-ts__sub-heading {
    font-size: 1.2em;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    text-align: center;
}

.bpa-front--dt__ts-body--items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.bpa-front--dt__ts-body--item {
    background-color: #e6ffe6; /* Light green for available */
    color: #28a745;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 0.95em; /* Added font-size */
}

.bpa-front--dt__ts-body--item:hover:not(.__bpa-is-disabled):not(.__bpa-is-selected) {
    background-color: #d4ffd4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* IMPORTANT: Styles for disabled booking slots - ADDED/UPDATED HERE */
.bpa-front--dt__ts-body--item.__bpa-is-disabled {
    opacity: 0.5; /* Make it semi-transparent */
    cursor: not-allowed; /* Change cursor to 'not-allowed' */
    background-color: #f0f0f0; /* Grey background */
    border-color: #ddd; /* Lighter border */
    pointer-events: none; /* Crucial: Prevents click events */
    text-decoration: line-through; /* Add strikethrough to indicate unavailability */
}

.bpa-front--dt__ts-body--item.__bpa-is-selected {
    background-color: #007bff; /* Primary blue */
    color: #fff;
    border-color: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transform: scale(1.02);
}

/* Basic Details (Step 3) */
.bpa-front-module--basic-details .kc-form-group {
    margin-bottom: 15px;
}

/* Summary (Step 4) */
.kc-summary-details p {
    text-align: left;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
}
.kc-summary-details p strong {
    color: #2c3e50;
    display: inline-block; /* Ensures strong doesn't break line */
    min-width: 120px; /* Align values */
}
#summary_final_price {
    font-size: 1.3em;
    font-weight: bold;
    color: #28a745;
}

/* General Form Elements (re-used from signup form, but adding here for completeness) */
.kc-form-group {
    margin-bottom: 20px;
}

.kc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.kc-input,
.kc-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kc-input:focus,
.kc-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.kc-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none; /* For buttons used as links */
}

.kc-button--primary {
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.kc-button--primary:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.kc-button--secondary {
    background-color: #6c757d;
    color: #fff;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.2);
}

.kc-button--secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.3);
    transform: translateY(-2px);
}

.kc-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.kc-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 1em;
    text-align: center;
    color: #333;
    background-color: #f0f8ff; /* Light blue */
    border: 1px solid #cceeff;
    display: none; /* Hidden by default, shown by JS */
}

.kc-form-message.error {
    background-color: #ffe6e6; /* Light red */
    border-color: #ffcccc;
    color: #d9534f;
}

.kc-form-message.success {
    background-color: #e6ffe6; /* Light green */
    border-color: #ccffcc;
    color: #28a745;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .kc-booking-wrapper {
        margin: 10px;
        padding: 15px;
        gap: 15px;
    }

    .kc-booking-wrapper h1 {
        font-size: 2em;
    }

    .kc-section-title, .bpa-front-module-heading {
        font-size: 1.4em;
    }

    .bpa-front-tab-menu {
        flex-direction: column; /* Stack tabs vertically on small screens */
        border-bottom: none;
    }

    .bpa-front-tab-menu--item {
        border-right: none;
        border-bottom: 1px solid #e0e0e0; /* Add bottom border for stacked items */
    }
    .bpa-front-tab-menu--item:last-child {
        border-bottom: none;
    }

    .bpa-front--dt__wrapper {
        flex-direction: column; /* Stack calendar and time slots */
    }

    .bpa-front--dt__col {
        min-width: unset; /* Remove min-width to allow full width */
        width: 100%;
    }

    .bpa-front--dt__ts-body--items {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .kc-button {
        padding: 10px 15px;
        font-size: 1em;
    }

    .bpa-front-tabs--foot {
        flex-direction: column;
        gap: 10px;
    }

    .bpa-front-tabs--foot .kc-button {
        width: 100%;
    }
}
