/**
 * AKBAR KHAN TRUST
 * Global Modal Component
 * File: /public_html/assets/css/components/modals.css
 */

.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 2000);

    display: none;
    align-items: center;
    justify-content: center;

    padding: 1rem;

    overflow-y: auto;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;

    background: rgb(15 23 42 / 0.55);
}

.modal-dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 32rem);
    margin: auto;

    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 0.75rem;

    box-shadow: var(
        --shadow-xl,
        0 20px 50px rgb(0 0 0 / 0.2)
    );

    overflow: hidden;
}

.modal-sm .modal-dialog {
    width: min(100%, 24rem);
}

.modal-lg .modal-dialog {
    width: min(100%, 48rem);
}

.modal-xl .modal-dialog {
    width: min(100%, 72rem);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: 1rem 1.25rem;

    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 2rem;
    height: 2rem;

    border: 0;
    background: transparent;

    color: var(--color-text-secondary, #64748b);

    cursor: pointer;
}

.modal-close:hover {
    color: var(--color-text, #0f172a);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;

    padding: 1rem 1.25rem;

    border-top: 1px solid var(--color-border, #e2e8f0);
}