/* =========================================
   MODAL POPUP NOTIFICATION STYLES (OPTIMIZED)
   ========================================= */

/* Modal Overlay */
.modal-notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.modal-notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - OPTIMIZED SMALLER SIZE */
.modal-notification {
    position: relative;
    width: 90%;
    max-width: 480px;
    /* Reduced from 550px */
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    /* Slightly smaller radius */
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 85vh;
    /* Prevent overflow on small screens */
    display: flex;
    flex-direction: column;
}

.modal-notification-overlay.active .modal-notification {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal Header - COMPACT */
.modal-notification__header {
    background: var(--gradient-primary);
    padding: 18px 22px;
    /* Reduced from 24px 28px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.modal-notification__title {
    font-family: var(--font-primary);
    font-size: 19px;
    /* Reduced from 22px */
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
    letter-spacing: -0.3px;
}

.modal-notification__close {
    width: 36px;
    /* Reduced from 40px */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 20px;
    /* Reduced from 24px */
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    flex-shrink: 0;
}

.modal-notification__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Modal Body - COMPACT */
.modal-notification__body {
    padding: 24px 22px;
    /* Reduced from 32px 28px */
    overflow-y: auto;
    flex: 1;
}

/* Custom scrollbar */
.modal-notification__body::-webkit-scrollbar {
    width: 6px;
}

.modal-notification__body::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

.modal-notification__body::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 3px;
}

.modal-notification__body::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

.modal-notification__content {
    margin-bottom: 20px;
    /* Reduced from 24px */
}

.modal-notification__text {
    font-size: 14px;
    /* Reduced from 15px */
    color: var(--color-gray-700);
    line-height: 1.6;
    margin-bottom: 14px;
    /* Reduced from 16px */
}

.modal-notification__text strong {
    color: var(--color-gray-900);
    font-weight: 600;
}

.modal-notification__email {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.modal-notification__email:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.modal-notification__highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(245, 159, 11, 0.05) 100%);
    border-left: 3px solid var(--color-secondary);
    padding: 14px 16px;
    /* Reduced from 16px 20px */
    border-radius: var(--radius-md);
    margin: 16px 0;
    /* Reduced from 20px 0 */
}

.modal-notification__highlight-title {
    font-family: var(--font-primary);
    font-size: 13px;
    /* Reduced from 14px */
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    /* Reduced from 8px */
}

.modal-notification__highlight-text {
    font-size: 13px;
    /* Reduced from 14px */
    color: var(--color-gray-700);
    line-height: 1.5;
    margin: 0;
}

/* Modal Button - COMPACT */
.modal-notification__button {
    width: 100%;
    padding: 14px 28px;
    /* Reduced from 16px 32px */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 15px;
    /* Reduced from 16px */
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.4),
        0 0 0 0 rgba(37, 99, 235, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Reduced from 10px */
    position: relative;
    overflow: hidden;
}

.modal-notification__button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.modal-notification__button:hover::before {
    width: 300px;
    height: 300px;
}

.modal-notification__button:hover {
    transform: translateY(-2px);
    /* Reduced from -3px */
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.5),
        0 0 25px rgba(37, 99, 235, 0.3);
}

.modal-notification__button i {
    font-size: 16px;
    /* Reduced from 18px */
    transition: transform 0.3s ease;
}

.modal-notification__button:hover i:last-child {
    transform: translateX(3px);
    /* Reduced from 4px */
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-notification {
        max-width: 90%;
        max-height: 80vh;
    }

    .modal-notification__header {
        padding: 16px 18px;
    }

    .modal-notification__title {
        font-size: 17px;
    }

    .modal-notification__body {
        padding: 20px 18px;
    }

    .modal-notification__text {
        font-size: 13px;
    }

    .modal-notification__button {
        padding: 13px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-notification-overlay {
        padding: 16px;
    }

    .modal-notification {
        max-width: 100%;
        border-radius: 12px;
    }

    .modal-notification__header {
        padding: 14px 16px;
    }

    .modal-notification__title {
        font-size: 16px;
    }

    .modal-notification__body {
        padding: 18px 16px;
    }

    .modal-notification__close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .modal-notification__highlight {
        padding: 12px 14px;
    }

    .modal-notification__button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Landscape mode on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .modal-notification {
        max-height: 90vh;
    }

    .modal-notification__body {
        padding: 16px 18px;
    }
}