/* Shared modals: important-notes + addon (eVisa info + application) */

.important-notes-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2100;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

.important-notes-modal.active {
    display: flex;
}

.important-notes-container {
    background: #fff;
    width: min(540px, 100%);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    padding: 1.5rem 1.35rem;
    position: relative;
    z-index: 1;
    max-height: min(80vh, calc(100dvh - 2rem));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    margin: 0 auto;
}

.important-notes-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.important-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.important-notes-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.important-notes-description {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
}

.important-notes-summary {
    margin: 0;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 0.9rem 1rem;
    border-radius: 16px;
    line-height: 1.6;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
}

.important-notes-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.35rem 0;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-light);
    border-radius: 12px;
    box-sizing: border-box;
    width: 100%;
}

.important-notes-content .note-item {
    background: transparent;
    margin-top: 0;
    padding: 0.85rem 1rem;
    gap: 0.7rem;
    align-items: flex-start;
    box-sizing: border-box;
    width: 100%;
    border-radius: 0;
}

html[dir="rtl"] .important-notes-modal .note-item,
html[dir="rtl"] .important-notes-content .note-item {
    flex-direction: row;
    text-align: right;
}

html[dir="rtl"] .important-notes-modal .note-item i,
html[dir="rtl"] .important-notes-content .note-item i {
    margin-left: 0;
    margin-right: 0;
    order: 0;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

html[dir="rtl"] .important-notes-modal .note-item span,
html[dir="rtl"] .important-notes-content .note-item span {
    text-align: right;
}

.important-notes-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
}

.important-notes-actions .btn-primary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 640px) {
.important-notes-modal {
        align-items: flex-end;
        padding: 0.75rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

.important-notes-container {
        width: 100%;
        max-width: 100%;
        border-radius: 18px;
        padding: 1.15rem 1rem 1.1rem;
        gap: 0.85rem;
        max-height: min(88dvh, calc(100dvh - 1.5rem));
    }

.important-notes-header h3 {
        font-size: 1rem;
        padding-inline-end: 1.75rem;
        line-height: 1.35;
    }

.important-notes-description {
        font-size: 0.88rem;
        line-height: 1.45;
    }

.important-notes-summary {
        padding: 0.8rem 0.9rem;
        font-size: 0.9rem;
        border-radius: 14px;
    }

.important-notes-content .note-item {
        padding: 0.75rem 0.9rem;
        border-radius: 0;
        margin-top: 0;
    }

.important-notes-content .note-item span {
        font-size: 0.88rem;
        line-height: 1.45;
    }

.important-notes-modal .modal-close {
        position: absolute;
        top: 0.85rem;
        inset-inline-end: 0.85rem;
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.important-notes-actions {
        margin-top: 0.25rem;
    }

#confirmImportantNotes {
        min-height: 48px;
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }
}

#confirmImportantNotes {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.important-notes-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-light);
    cursor: pointer;
}

/* Add-on Modal */

.addon-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.addon-modal.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.addon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.addon-container {
    position: relative;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 620px;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1001;
    animation: slideUp 0.3s ease-out;
}

.addon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: white;
}

.addon-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.addon-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.addon-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.addon-body {
    padding: 1.5rem;
    max-height: calc(80vh - 110px);
    overflow-y: auto;
    color: var(--text-dark);
}

.addon-body p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.addon-body ul {
    padding-left: 1.5rem;
    margin: 0 0 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

html[dir='rtl'] .addon-body ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

.duration-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4caf50;
    flex-shrink: 0;
}

@media (max-width: 640px) {
.addon-container {
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }

.addon-header {
        padding: 1.25rem;
    }

.addon-body {
        padding: 1.25rem;
    }
}

#confirmImportantNotes.loading,
#confirmImportantNotes.btn-loading {
    min-height: 48px;
}
