/* ============================================
   modal.css — استایل مودال سبزینه‌ها
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: modal-fade-in 0.2s ease-out;
}

.modal-box {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-slide-in 0.25s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e421f;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 0.35rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #dc2626;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    line-height: 1.7;
    color: #1f2937;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modal-slide-in {
    from { transform: translateY(-16px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

@media (max-width: 480px) {
    .modal-box {
        max-width: 100%;
        max-height: 95vh;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
