/* --- BAP Frontend Booking Form Styles --- */
.bap-wrapper {
    position: relative;
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #333;
}

.bap-form-step {
    margin-bottom: 1.5em;
}

.bap-step-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 1em;
    color: #222;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5em;
}

.bap-form-field {
    margin-bottom: 1em;
}

.bap-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.bap-form-field select,
.bap-form-field input[type="text"],
.bap-form-field input[type="email"],
.bap-form-field input[type="tel"],
.bap-form-field input[type="date"] {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out;
}

.bap-form-field select:focus,
.bap-form-field input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* --- Time Slot Styles --- */
.bap-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.bap-time-slot {
    padding: 0.75em;
    font-size: 1em;
    text-align: center;
    border: 1px solid #0073aa;
    background: #fdfdfd;
    color: #0073aa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.bap-time-slot:hover,
.bap-time-slot:focus {
    background: #f0f8ff;
    border-color: #005a87;
    outline: none;
}

.bap-time-slot.selected {
    background: #0073aa;
    color: #fff;
    border-color: #005a87;
    font-weight: bold;
}

/* --- Customer Details & Submission Styles --- */
.bap-customer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

@media (max-width: 500px) {
    .bap-customer-details {
        grid-template-columns: 1fr;
    }
}

.bap-submit-button {
    display: block;
    width: 100%;
    padding: 1em;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    border: none;
    background: #2ea44f;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 1.5em;
}

.bap-submit-button:hover,
.bap-submit-button:focus {
    background: #2c974b;
    outline: none;
}

.bap-confirmation-message {
    padding: 1.5em;
    background: #e7f7e8;
    border: 1px solid #c7e8ca;
    border-left-width: 4px;
    border-left-color: #2ea44f;
    border-radius: 4px;
    text-align: center;
}

/* --- Loader/Spinner --- */
.bap-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.bap-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: bap-spin 1s linear infinite;
}

@keyframes bap-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Inline Datepicker Styles --- */
#bap-datepicker-inline .ui-datepicker {
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: none;
    background: transparent;
}

#bap-datepicker-inline .ui-datepicker-header {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 0.75em 0;
    position: relative;
}

/* --- REVERTED: Calendar Navigation Button Styles --- */
#bap-datepicker-inline .ui-datepicker-prev,
#bap-datepicker-inline .ui-datepicker-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5em;
}
#bap-datepicker-inline .ui-datepicker-prev { left: 5px; }
#bap-datepicker-inline .ui-datepicker-next { right: 5px; }
/* --- END REVERTED STYLES --- */


#bap-datepicker-inline .ui-datepicker-title {
    font-weight: bold;
    font-size: 1.1em;
}

#bap-datepicker-inline .ui-datepicker-calendar {
    width: 100%;
    border-collapse: collapse;
}

#bap-datepicker-inline .ui-datepicker-calendar th {
    padding: 0.5em;
    color: #555;
    font-weight: normal;
    font-size: 0.9em;
}

#bap-datepicker-inline .ui-datepicker-calendar td {
    padding: 2px;
}

#bap-datepicker-inline .ui-state-default {
    display: block;
    padding: 0.75em;
    font-size: 1em;
    text-align: center;
    border: 1px solid #ccc;
    background: #fdfdfd;
    color: #0073aa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

#bap-datepicker-inline .ui-state-hover {
    background: #f0f8ff;
    border-color: #005a87;
}

#bap-datepicker-inline .ui-state-active {
    background: #0073aa;
    color: #fff;
    border-color: #005a87;
    font-weight: bold;
}

/* Unavailable dates */
#bap-datepicker-inline .ui-datepicker-unselectable .ui-state-default {
    background: #e9e9e9;
    color: #aaa;
    border-color: #ddd;
    cursor: default;
    opacity: 0.7;
}