/*!* Appointment Modal Styles - Following Pattern Guidelines *!*/
/*!* All styles namespaced to prevent conflicts *!*/

/*!* Flatpickr calendar z-index fix - must be above modal *!*/
/*.flatpickr-calendar {*/
/*    z-index: 1060 !important; !* Bootstrap modal is 1055 *!*/
/*}*/

/*!* Floating label support for appointment modals *!*/
/*#appointment-modal .form-floating label,*/
/*#appointment-modal-view .form-floating label {*/
/*    color: var(--bs-gray-600);*/
/*    font-size: 0.875rem;*/
/*}*/

/*#appointment-modal .form-floating > .form-control:focus ~ label,*/
/*#appointment-modal .form-floating > .form-select:focus ~ label {*/
/*    color: var(--bit-primary);*/
/*}*/

/*!* Compact floating styles as per form-style-guide *!*/
/*#appointment-modal.compact-floating .form-floating {*/
/*    margin-bottom: 0.75rem;*/
/*}*/

/*#appointment-modal.compact-floating .form-floating label {*/
/*    padding: 0.375rem 0.75rem;*/
/*}*/

/*!* Enhanced switch styling for enabled/disabled toggle *!*/
/*#appointment-modal .form-check-input[type="checkbox"][role="switch"],*/
/*#appointment-modal-view .form-check-input[type="checkbox"][role="switch"] {*/
/*    width: 3em;*/
/*    height: 1.5em;*/
/*    background-color: var(--bs-gray-400);*/
/*    border-color: var(--bs-gray-400);*/
/*    cursor: pointer;*/
/*}*/

/*#appointment-modal .form-check-input[type="checkbox"][role="switch"]:checked,*/
/*#appointment-modal-view .form-check-input[type="checkbox"][role="switch"]:checked {*/
/*    background-color: var(--bit-primary);*/
/*    border-color: var(--bit-primary);*/
/*}*/

/*!* Autocomplete field styling is now globally defined in theme_forms.css *!*/

/*!* Resource slot sections *!*/
/*#appointment-modal .resource-slot-section,*/
/*#appointment-modal-view .resource-slot-section {*/
/*    position: relative;*/
/*}*/

/*#appointment-modal .resource-slot-section:not(:last-child),*/
/*#appointment-modal-view .resource-slot-section:not(:last-child) {*/
/*    border-bottom: 1px solid var(--bs-gray-200);*/
/*}*/

/*!* Duration field - prevent wrapping *!*/
/*#appointment-modal .duration-field input[type="number"],*/
/*#appointment-modal .duration-field .form-control {*/
/*    white-space: nowrap;*/
/*    display: inline-block;*/
/*    min-width: 80px;*/
/*}*/

/*!* Ensure duration inputs stay on one line *!*/
/*#appointment-modal input[name*="[duration]"] {*/
/*    display: inline-block !important;*/
/*    width: auto !important;*/
/*    min-width: 80px;*/
/*}*/

/*!* Badge styling consistency *!*/
/*#appointment-modal .badge,*/
/*#appointment-modal-view .badge {*/
/*    padding: 0.35em 0.65em;*/
/*    font-weight: 500;*/
/*    font-size: 0.75rem;*/
/*}*/

/*!* Responsive adjustments *!*/
/*@media (max-width: 768px) {*/
/*    #appointment-modal .row > [class*="col-"],*/
/*    #appointment-modal-view .row > [class*="col-"] {*/
/*        margin-bottom: 0.5rem;*/
/*    }*/
/*    */
/*    #appointment-modal .form-floating,*/
/*    #appointment-modal-view .form-floating {*/
/*        margin-bottom: 1rem;*/
/*    }*/
/*}*/
/* ===== Bulk Create (employee/calendar/appointment/_bulk_new_form.html.twig) =====
 * Only the Booking Preview list scrolls, not the whole modal. The right column's
 * stack is pinned to the column (which stretches to the settings column's height),
 * so the preview card takes whatever height is left under Time Slots and scrolls inside. The left
 * settings column keeps overflow visible so its TomSelect dropdowns aren't clipped. */
.bulk-new-preview-scroll { max-height: 300px; overflow-y: auto; }

@media (min-width: 768px) {
    /* No viewport-based height: the settings column sets the row's height and the
       preview fills beside it, so the modal itself never needs a scrollbar. */
    .bulk-new-layout { min-height: 360px; }
    .bulk-new-col-preview { position: relative; }
    .bulk-new-preview-stack {
        position: absolute;
        inset: 0 calc(var(--bs-gutter-x) * .5);
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .bulk-new-preview-stack > .accordion { flex: 0 0 auto; }
    .bulk-new-preview-stack .bulk-new-preview {
        flex: 1 1 auto;
        min-height: 180px;
        display: flex;
        flex-direction: column;
    }
    .bulk-new-preview-stack .bulk-new-preview-scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }
}

/* Bulk Create settings column, compacted so it fits without a vertical scrollbar.
   Beats accordion.css's global !important paddings by specificity. */
.bulk-new-settings .accordion-button {
    min-height: 36px !important;
    padding: 0.2rem 0.85rem !important;
}
.bulk-new-settings .accordion-body {
    padding: 0.6rem 0.75rem !important;
}
.bulk-new-settings .form-label { margin-bottom: 2px !important; }
.bulk-new-settings .form-text {
    margin-top: 2px;
    font-size: 0.75rem !important;
    line-height: 1.3;
}
