/*
 * Vanilla UI component styles (Bootstrap replacement) — paired with assets/js/ui.js.
 * Base styling for modals, dropdown menus and tab panes. Component-specific look
 * (login dropdown, faceted-search filters, testimonial modals) is layered on top by
 * header.css / the relevant block stylesheets.
 */

/* ---- Modal -------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10500;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10400;
    background: rgba(17, 19, 43, 0.5);
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: flex-start;
}

.modal-sm {
    max-width: 300px;
}

.modal-content {
    position: relative;
    width: 100%;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(17, 19, 43, 0.2);
    pointer-events: auto;
}

.btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 150ms ease;
}

.btn-close:hover {
    opacity: 1;
}

/* ---- Dropdown (base; positioning added by consumers) ------------------- */
.dropdown-menu {
    display: none;
}

.dropdown-menu.show {
    display: block;
}

/* ---- Tab panes ---------------------------------------------------------- */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}
