/* ===== Modal Base ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

/* ===== Modal Dialog ===== */
.modal-dialog {
    background: #fff;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.25s ease;
}

/* ===== When modal is active ===== */
.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* ===== Modal Sections ===== */
.modal-header, .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
}
.modal-footer {
    border-top: 1px solid #ddd;
}
.modal-body {
    padding: 1rem;
}

/* ===== Close Button ===== */
.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}
.btn-close-modal::before {
    content: "×";
}

/* ===== Buttons ===== */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}
.btn-primary {
    background: #007bff;
    color: #fff;
}
.btn-secondary {
    background: #6c757d;
    color: #fff;
}
.btn:hover {
    opacity: 0.9;
}

/* ===== Prevent Background Scroll ===== */
body.modal-open {
    overflow: hidden;
}

.modal-body {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.375rem;
    align-items: center;
}
.modal-body input, .modal-body select {
    padding: 0.375rem;
    border: 1px solid var(--gray-500);
}

