/* ===== TEF MODAL ===== */

.tef-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.tef-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.tef-modal {
    background: var(--tef-surface);
    border: 1px solid var(--tef-border);
    border-radius: var(--tef-radius);
    width: 100%;
    max-width: 620px;
    box-shadow: var(--tef-shadow);
    transform: translateY(10px) scale(.98);
    transition: transform .2s ease;
}

.tef-modal-overlay.is-open .tef-modal {
    transform: translateY(0) scale(1);
}

/* ===== HEADER ===== */
.tef-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--tef-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tef-modal-title {
    font-weight: 600;
    color: var(--tef-text);
}

.tef-modal-close {
    all: unset;
    cursor: pointer;
    font-size: 18px;
    color: var(--tef-text-muted);
}

.tef-modal-close:hover {
    color: var(--tef-text);
}

/* ===== BODY ===== */
.tef-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== FOOTER ===== */
.tef-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--tef-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== SIZE MODIFIERS ===== */
.tef-modal-sm { max-width: 420px; }
.tef-modal-lg { max-width: 820px; }

/* =========================
   TEF Modal – Mobile Width
========================= */
@media (max-width: 768px) {

    .tef-modal {
        width: calc(100% - 32px);
        max-width: 420px;
        margin: 0 auto;
        border-radius: 18px;
    }

    .tef-modal-lg {
        max-width: 420px;
    }
}
