/* ================= Generic Modal (shared) ================= */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;

    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);

    z-index: 9999;
    padding: 20px;
}

.modal[open] {
    display: grid;
}

/* generic card-style modal */
.modal-card {
    width: 100%;
    max-width: 420px;
    background: #f7f3ec;
    color: #2b2b2b;
    border: 1px solid #e6dfd5;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    overflow: hidden;

    position: relative;
    z-index: 2;

    transform: scale(.97);
    opacity: 0;
    transition: transform .15s ease, opacity .15s ease;
}

.modal[open] .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal[open] .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal-head {
    padding: 14px 16px;
    font-weight: 700;

    /*   background: #efe9df;
    border-bottom: 1px solid #e2d8c8; */
}

.modal-body {
    padding: 22px 22px 18px;
    display: grid;
    gap: 14px;
}

.modal-foot {
    padding: 16px 22px 18px;
    /* border-top: 1px solid #e2d8c8; */
    display: flex;
    gap: 18px;
    justify-content: flex-end;
}

.modal-foot .btn {
    min-width: 90px;
}

.modal-foot .btn.ghost {
    background: #f7f3ec;
    color: #444;
    /* border: 1px solid #cfc5b6; */
}

@media (max-width: 600px) {

    .modal-card {
        max-width: 92vw;
        border-radius: 16px;
    }

    .modal-foot {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .modal-foot .btn {
        width: 100%;
    }
}