/* ==============================================
   DYNAMIC MODAL SYSTEM
   מודאלים עם גודל מינימלי שגדל דינמית
   ============================================== */

/* מודאלים בסיסיים - התחלה עם גובה מינימלי */
.modal-box {
    min-height: 200px !important;
    /* גובה מינימלי */
    max-height: 90vh !important;
    /* גובה מקסימלי התורגם ל vh לתאימות */
    height: auto !important;
    /* גדילה דינמית */
}

/* מודאלים ספציפיים שצריכים להתחיל קטנים יותר */
.modal-box-dynamic {
    min-height: 150px !important;
    /* גובה מינימלי קטן יותר */
    max-height: 90vh !important;
    height: fit-content !important;
    /* מתאים לתוכן */
}

/* תמיכה בגלילה חלקה כשעובר את המקסימום */
.modal-content-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(90vh - 120px);
    /* Adjust to leave room for headers and bottom buttons */
}

/* אנימציה חלקה לפתיחת מודאל */
.modal-overlay {
    overscroll-behavior: contain;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay:not(.hidden) {
    opacity: 1 !important;
}

/* תיקון למודאלים שצריכים להיות בתחתית המסך */
.modal-bottom {
    align-items: flex-end !important;
}

/* מודאל מרכזי */
.modal-center {
    align-items: center !important;
    justify-content: center !important;
}