@font-face {
    font-family: 'Chillax';
    src: url('../fonts/Chillax-Variable.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    font-style: normal;
}

:root {
    --bap-primary-color: #0073aa;
    --bap-button-bg: #0085ba;
    --bap-button-text: #ffffff;
    --bap-calendar-bg: #ffffff;
}

.bap-form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Chillax', sans-serif;
    box-sizing: border-box;
}

.bap-form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}
.bap-form-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    text-align: center;
}
.bap-form-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    text-align: center;
    color: #777;
}

.bap-form-step { display: none; }
.bap-form-step.bap-active-step { display: block; }
.bap-form-fields h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.bap-form-group { margin-bottom: 15px; }
.bap-form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.bap-form-group input[type="text"],
.bap-form-group input[type="email"],
.bap-form-group input[type="tel"],
.bap-form-group select { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-family: 'Chillax', sans-serif;
}
.bap-form-group select:disabled { background-color: #f0f0f1; cursor: not-allowed; }

/* --- **MODIFIED**: Re-adding Select2 Custom Styling --- */
.bap-form-container .select2-container .select2-selection--single {
    height: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}
.bap-form-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: normal;
    padding-left: 0;
    font-family: 'Chillax', sans-serif;
}
.bap-form-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 5px;
}
.select2-dropdown {
    border-color: #ccc;
    border-radius: 4px;
    font-family: 'Chillax', sans-serif;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Chillax', sans-serif;
    padding: 8px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bap-primary-color);
    color: var(--bap-button-text);
}

/* --- Z-index Fix for Select2 inside Modals --- */
.select2-container--open {
    z-index: 99999999 !important;
}

.bap-form-container .bap-quantity-selector { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.bap-form-container .bap-quantity-btn { width: 38px; height: 38px; border: 1px solid #ccc; background-color: #f9f9f9; cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 0; transition: background-color 0.2s; }
.bap-form-container .bap-quantity-btn:hover { background-color: #e9e9e9; }
.bap-form-container .bap-quantity-btn::before { content: ''; display: inline-block; width: 16px; height: 16px; background-color: #333; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.bap-form-container .bap-quantity-decrease::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19 13H5v-2h14v2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19 13H5v-2h14v2z'/%3E%3C/svg%3E"); }
.bap-form-container .bap-quantity-increase::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/%3E%3C/svg%3E"); }
.bap-form-container #bap-quantity-display { font-weight: 600; font-size: 18px; min-width: 20px; text-align: center; }
.bap-calendar { background-color: var(--bap-calendar-bg); border: 1px solid #ddd; padding: 10px; border-radius: 4px; }
.bap-calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; }
.bap-calendar-nav { background: none; border: none; font-size: 24px; cursor: pointer; }
.bap-calendar-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.bap-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.bap-calendar-day-name { font-weight: 600; font-size: 12px; }
.bap-calendar-day { padding: 8px 0; border-radius: 4px; cursor: pointer; }
.bap-calendar-day.bap-day-disabled { color: #ccc; cursor: not-allowed; }
.bap-calendar-day.bap-day-available:hover { background-color: #e0e0e0; }
.bap-form-container .bap-calendar-day.bap-day-selected { background-color: var(--bap-primary-color); color: var(--bap-button-text); }
.bap-form-container #bap-time-slots { margin-top: 15px; }
.bap-form-container .bap-time-slot-label { display: inline-block; padding: 8px 15px; border: 1px solid #ccc; border-radius: 20px; margin: 5px; cursor: pointer; }
.bap-form-container .bap-time-slot-label input { display: none; }
.bap-form-container .bap-time-slot-label.bap-time-selected { background-color: var(--bap-primary-color); color: var(--bap-button-text); border-color: var(--bap-primary-color); }
.bap-form-container .bap-time-slot-label span { font-size: 12px; color: #666; }
.bap-form-container .bap-time-slot-label.bap-time-selected span { color: #f0f0f1; }
.bap-form-container .bap-form-navigation { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.bap-form-container .bap-form-btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; background-color: var(--bap-button-bg); color: var(--bap-button-text); font-family: 'Chillax', sans-serif; font-weight: 600; }
.bap-form-container .bap-form-btn:disabled { background-color: #ccc !important; cursor: not-allowed; }
.bap-form-container .bap-form-navigation .bap-next-btn, .bap-form-container .bap-form-navigation .bap-submit-btn { margin-left: auto; }
.bap-open-modal-button { background-color: var(--bap-button-bg); color: var(--bap-button-text); border: none; border-radius: 9999px; padding: 14px 32px; font-size: 18px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1); transition: all 0.2s ease-in-out; display: inline-block; text-decoration: none; line-height: 1.2; font-family: 'Chillax', sans-serif; text-shadow: 0 1px 1px rgba(0,0,0,0.15); }
.bap-open-modal-button:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.2), 0 2px 5px rgba(0,0,0,0.15); }
.bap-modal-overlay {
    display: none; /* Tetap tersembunyi secara default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}

/* **NEW**: This is the core of the new trigger mechanism. */
/* When the URL hash matches the modal ID, display the overlay. */
.bap-modal-overlay:target {
    display: flex;
}
.bap-modal-overlay.bap-is-visible { display: flex; }
.bap-modal { position: relative; background: #fff; max-width: 90%; width: 550px; max-height: 90vh; overflow-y: auto; border-radius: 5px; }
.bap-modal-close-btn { position: absolute; top: 10px; right: 15px; font-size: 28px; line-height: 1; border: none; background: none; cursor: pointer; color: #888; }
.bap-modal .bap-form-container { border: none; margin: 0; width: 100%; max-width: 100%; }
.bap-feedback { padding: 15px; margin-top: 15px; border-radius: 4px; }
.bap-feedback.bap-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.bap-feedback.bap-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.bap-loader { display: none; text-align: center; padding: 10px; }