/* ==========================================================================
   INAIVOM - Alerts & Notifications
   File: app/static/css/alerts.css
   Premium Matrimony Platform
   Theme: Maroon #800020 | Gold #D4AF37 | White
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES
   ========================================================================== */

:root {
    --alert-primary: #800020;
    --alert-primary-dark: #5f0018;
    --alert-gold: #d4af37;

    --alert-success: #198754;
    --alert-success-bg: #edf8f2;

    --alert-danger: #dc3545;
    --alert-danger-bg: #fff1f2;

    --alert-warning: #b7791f;
    --alert-warning-bg: #fff9e8;

    --alert-info: #0d6efd;
    --alert-info-bg: #eef5ff;

    --alert-neutral: #5f6368;
    --alert-neutral-bg: #f5f5f7;

    --alert-white: #ffffff;
    --alert-text: #252525;
    --alert-muted: #6c757d;
    --alert-border: #e7e7eb;

    --alert-radius: 12px;
    --alert-radius-lg: 16px;

    --alert-shadow:
        0 8px 30px rgba(24, 20, 22, 0.08);

    --alert-shadow-hover:
        0 12px 36px rgba(24, 20, 22, 0.12);

    --alert-transition: 0.25s ease;
}


/* ==========================================================================
   2. BASE ALERT
   ========================================================================== */

.alert,
.inaivom-alert {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 12px;

    width: 100%;

    margin: 0 0 16px;
    padding: 14px 46px 14px 16px;

    border: 1px solid var(--alert-border);
    border-left: 4px solid var(--alert-primary);
    border-radius: var(--alert-radius);

    background: var(--alert-white);
    color: var(--alert-text);

    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);

    font-size: 0.9rem;
    line-height: 1.55;

    overflow-wrap: anywhere;

    transition:
        transform var(--alert-transition),
        box-shadow var(--alert-transition),
        opacity var(--alert-transition);
}

.alert:hover,
.inaivom-alert:hover {
    box-shadow: var(--alert-shadow);
}


/* ==========================================================================
   3. ALERT ICON
   ========================================================================== */

.alert-icon,
.inaivom-alert-icon {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 1px;

    border-radius: 50%;

    background: rgba(128, 0, 32, 0.08);
    color: var(--alert-primary);

    font-size: 0.95rem;
}


/* ==========================================================================
   4. ALERT CONTENT
   ========================================================================== */

.alert-content,
.inaivom-alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title,
.inaivom-alert-title {
    display: block;

    margin: 0 0 3px;

    color: inherit;

    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
}

.alert-message,
.inaivom-alert-message {
    margin: 0;

    color: inherit;

    font-size: 0.84rem;
    line-height: 1.55;
}

.alert-message + .alert-message {
    margin-top: 5px;
}


/* ==========================================================================
   5. SUCCESS
   ========================================================================== */

.alert-success {
    border-color: rgba(25, 135, 84, 0.2);
    border-left-color: var(--alert-success);

    background: var(--alert-success-bg);
    color: #11633e;
}

.alert-success .alert-icon,
.alert-success .inaivom-alert-icon {
    background: rgba(25, 135, 84, 0.12);
    color: var(--alert-success);
}


/* ==========================================================================
   6. DANGER / ERROR
   ========================================================================== */

.alert-danger,
.alert-error {
    border-color: rgba(220, 53, 69, 0.2);
    border-left-color: var(--alert-danger);

    background: var(--alert-danger-bg);
    color: #9f2632;
}

.alert-danger .alert-icon,
.alert-error .alert-icon,
.alert-danger .inaivom-alert-icon,
.alert-error .inaivom-alert-icon {
    background: rgba(220, 53, 69, 0.11);
    color: var(--alert-danger);
}


/* ==========================================================================
   7. WARNING
   ========================================================================== */

.alert-warning {
    border-color: rgba(212, 175, 55, 0.35);
    border-left-color: var(--alert-gold);

    background: var(--alert-warning-bg);
    color: #75520d;
}

.alert-warning .alert-icon,
.alert-warning .inaivom-alert-icon {
    background: rgba(212, 175, 55, 0.18);
    color: #8a6d10;
}


/* ==========================================================================
   8. INFORMATION
   ========================================================================== */

.alert-info {
    border-color: rgba(13, 110, 253, 0.18);
    border-left-color: var(--alert-info);

    background: var(--alert-info-bg);
    color: #084eaf;
}

.alert-info .alert-icon,
.alert-info .inaivom-alert-icon {
    background: rgba(13, 110, 253, 0.1);
    color: var(--alert-info);
}


/* ==========================================================================
   9. PRIMARY / BRAND
   ========================================================================== */

.alert-primary,
.alert-brand {
    border-color: rgba(128, 0, 32, 0.18);
    border-left-color: var(--alert-primary);

    background: #fff7f9;
    color: var(--alert-primary-dark);
}

.alert-primary .alert-icon,
.alert-brand .alert-icon,
.alert-primary .inaivom-alert-icon,
.alert-brand .inaivom-alert-icon {
    background: rgba(128, 0, 32, 0.09);
    color: var(--alert-primary);
}


/* ==========================================================================
   10. PREMIUM / GOLD
   ========================================================================== */

.alert-premium,
.alert-gold {
    border-color: rgba(212, 175, 55, 0.38);
    border-left-color: var(--alert-gold);

    background:
        linear-gradient(
            135deg,
            #fffdf7 0%,
            #fff9e8 100%
        );

    color: #69520c;
}

.alert-premium .alert-icon,
.alert-gold .alert-icon,
.alert-premium .inaivom-alert-icon,
.alert-gold .inaivom-alert-icon {
    background: rgba(212, 175, 55, 0.18);
    color: #8a6d10;
}


/* ==========================================================================
   11. NEUTRAL
   ========================================================================== */

.alert-secondary,
.alert-neutral {
    border-color: #e2e2e6;
    border-left-color: var(--alert-neutral);

    background: var(--alert-neutral-bg);
    color: #4f5357;
}

.alert-secondary .alert-icon,
.alert-neutral .alert-icon {
    background: rgba(95, 99, 104, 0.09);
    color: var(--alert-neutral);
}


/* ==========================================================================
   12. CLOSE BUTTON
   ========================================================================== */

.alert-close,
.alert .btn-close,
.inaivom-alert-close {
    position: absolute;

    top: 50%;
    right: 13px;

    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    transform: translateY(-50%);

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: currentColor;

    font-size: 1rem;

    opacity: 0.58;

    cursor: pointer;

    transition:
        opacity var(--alert-transition),
        background var(--alert-transition),
        transform var(--alert-transition);
}

.alert-close:hover,
.alert .btn-close:hover,
.inaivom-alert-close:hover {
    background: rgba(0, 0, 0, 0.06);

    opacity: 1;
}

.alert-close:focus-visible,
.alert .btn-close:focus-visible,
.inaivom-alert-close:focus-visible {
    outline: 3px solid rgba(128, 0, 32, 0.15);
    outline-offset: 1px;
}


/* ==========================================================================
   13. ALERT LINKS
   ========================================================================== */

.alert a,
.inaivom-alert a {
    color: inherit;

    font-weight: 700;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.alert a:hover,
.inaivom-alert a:hover {
    text-decoration-thickness: 2px;
}


/* ==========================================================================
   14. ALERT ACTIONS
   ========================================================================== */

.alert-actions,
.inaivom-alert-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 11px;
}

.alert-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-height: 34px;

    padding: 6px 11px;

    border: 1px solid currentColor;
    border-radius: 8px;

    background: transparent;
    color: inherit;

    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        background var(--alert-transition),
        color var(--alert-transition),
        opacity var(--alert-transition);
}

.alert-action:hover {
    background: currentColor;
    color: var(--alert-white);

    text-decoration: none;
}


/* ==========================================================================
   15. COMPACT ALERT
   ========================================================================== */

.alert-compact {
    align-items: center;

    padding-top: 10px;
    padding-bottom: 10px;

    font-size: 0.82rem;
}

.alert-compact .alert-icon {
    width: 27px;
    height: 27px;

    flex-basis: 27px;

    font-size: 0.8rem;
}


/* ==========================================================================
   16. LARGE ALERT
   ========================================================================== */

.alert-lg {
    padding: 20px 52px 20px 20px;

    border-radius: var(--alert-radius-lg);
}

.alert-lg .alert-icon {
    width: 42px;
    height: 42px;

    flex-basis: 42px;

    font-size: 1.15rem;
}

.alert-lg .alert-title {
    font-size: 1rem;
}

.alert-lg .alert-message {
    font-size: 0.88rem;
}


/* ==========================================================================
   17. OUTLINED ALERT
   ========================================================================== */

.alert-outline {
    background: var(--alert-white);
}

.alert-outline.alert-success {
    border-color: var(--alert-success);
    color: var(--alert-success);
}

.alert-outline.alert-danger,
.alert-outline.alert-error {
    border-color: var(--alert-danger);
    color: var(--alert-danger);
}

.alert-outline.alert-warning {
    border-color: var(--alert-gold);
    color: #80620c;
}

.alert-outline.alert-info {
    border-color: var(--alert-info);
    color: var(--alert-info);
}

.alert-outline.alert-primary {
    border-color: var(--alert-primary);
    color: var(--alert-primary);
}


/* ==========================================================================
   18. SOLID ALERTS
   ========================================================================== */

.alert-solid {
    border-color: transparent;

    color: var(--alert-white);
}

.alert-solid.alert-success {
    background: var(--alert-success);
}

.alert-solid.alert-danger,
.alert-solid.alert-error {
    background: var(--alert-danger);
}

.alert-solid.alert-info {
    background: var(--alert-info);
}

.alert-solid.alert-primary {
    background: var(--alert-primary);
}

.alert-solid.alert-warning,
.alert-solid.alert-premium {
    background: var(--alert-gold);
    color: #4f3d06;
}

.alert-solid .alert-icon {
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
}


/* ==========================================================================
   19. FLASH MESSAGE CONTAINER
   ========================================================================== */

.flash-messages,
.alert-container {
    position: relative;

    width: 100%;

    margin-bottom: 20px;
}

.flash-messages:empty,
.alert-container:empty {
    display: none;
}


/* ==========================================================================
   20. FLOATING FLASH / TOAST CONTAINER
   ========================================================================== */

.flash-messages-floating,
.toast-container,
.inaivom-toast-container {
    position: fixed;

    top: 85px;
    right: 22px;
    z-index: 1080;

    width: min(390px, calc(100vw - 30px));

    display: flex;
    flex-direction: column;
    gap: 10px;

    pointer-events: none;
}

.flash-messages-floating > *,
.toast-container > *,
.inaivom-toast-container > * {
    pointer-events: auto;
}


/* ==========================================================================
   21. TOAST
   ========================================================================== */

.toast,
.inaivom-toast {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 11px;

    width: 100%;

    padding: 14px 42px 14px 14px;

    overflow: hidden;

    border: 1px solid var(--alert-border);
    border-radius: var(--alert-radius-lg);

    background: rgba(255, 255, 255, 0.98);
    color: var(--alert-text);

    box-shadow: var(--alert-shadow);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    animation: inaivom-toast-in 0.3s ease both;
}

.toast:hover,
.inaivom-toast:hover {
    box-shadow: var(--alert-shadow-hover);
}

.toast::before,
.inaivom-toast::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 4px;
    height: 100%;

    background: var(--alert-primary);
}

.toast-success::before {
    background: var(--alert-success);
}

.toast-danger::before,
.toast-error::before {
    background: var(--alert-danger);
}

.toast-warning::before {
    background: var(--alert-gold);
}

.toast-info::before {
    background: var(--alert-info);
}


/* ==========================================================================
   22. TOAST ICON
   ========================================================================== */

.toast-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(128, 0, 32, 0.08);
    color: var(--alert-primary);
}

.toast-success .toast-icon {
    background: rgba(25, 135, 84, 0.1);
    color: var(--alert-success);
}

.toast-danger .toast-icon,
.toast-error .toast-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--alert-danger);
}

.toast-warning .toast-icon {
    background: rgba(212, 175, 55, 0.17);
    color: #85690c;
}

.toast-info .toast-icon {
    background: rgba(13, 110, 253, 0.09);
    color: var(--alert-info);
}


/* ==========================================================================
   23. TOAST CONTENT
   ========================================================================== */

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    display: block;

    margin: 0 0 3px;

    color: var(--alert-text);

    font-size: 0.85rem;
    font-weight: 700;
}

.toast-message {
    margin: 0;

    color: var(--alert-muted);

    font-size: 0.78rem;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.toast-close {
    position: absolute;

    top: 9px;
    right: 9px;

    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: var(--alert-muted);

    cursor: pointer;

    transition:
        background var(--alert-transition),
        color var(--alert-transition);
}

.toast-close:hover {
    background: #f1f1f3;
    color: var(--alert-text);
}


/* ==========================================================================
   24. TOAST PROGRESS
   ========================================================================== */

.toast-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 3px;

    overflow: hidden;

    background: rgba(0, 0, 0, 0.05);
}

.toast-progress-bar {
    width: 100%;
    height: 100%;

    transform-origin: left center;

    background: var(--alert-primary);

    animation: inaivom-toast-progress 5s linear forwards;
}

.toast-success .toast-progress-bar {
    background: var(--alert-success);
}

.toast-danger .toast-progress-bar,
.toast-error .toast-progress-bar {
    background: var(--alert-danger);
}

.toast-warning .toast-progress-bar {
    background: var(--alert-gold);
}

.toast-info .toast-progress-bar {
    background: var(--alert-info);
}


/* ==========================================================================
   25. INLINE VALIDATION MESSAGES
   ========================================================================== */

.form-alert,
.validation-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;

    margin-top: 6px;

    font-size: 0.73rem;
    line-height: 1.4;
}

.form-alert-error,
.validation-error {
    color: var(--alert-danger);
}

.form-alert-success,
.validation-success {
    color: var(--alert-success);
}

.form-alert-warning,
.validation-warning {
    color: #8a6710;
}


/* ==========================================================================
   26. SYSTEM BANNER
   ========================================================================== */

.system-alert,
.site-alert {
    position: relative;

    width: 100%;

    padding: 10px 45px 10px 18px;

    background: var(--alert-primary);
    color: var(--alert-white);

    text-align: center;

    font-size: 0.8rem;
    font-weight: 500;
}

.system-alert a,
.site-alert a {
    color: var(--alert-gold);

    font-weight: 700;
    text-decoration: underline;
}

.system-alert-warning {
    background: var(--alert-gold);
    color: #4e3a04;
}

.system-alert-danger {
    background: var(--alert-danger);
}


/* ==========================================================================
   27. NOTIFICATION DOT
   ========================================================================== */

.notification-dot {
    display: inline-block;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--alert-danger);

    box-shadow: 0 0 0 2px var(--alert-white);
}

.notification-dot-success {
    background: var(--alert-success);
}

.notification-dot-warning {
    background: var(--alert-gold);
}

.notification-dot-info {
    background: var(--alert-info);
}


/* ==========================================================================
   28. NOTIFICATION COUNT
   ========================================================================== */

.notification-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 19px;
    height: 19px;

    padding: 0 5px;

    border: 2px solid var(--alert-white);
    border-radius: 20px;

    background: var(--alert-danger);
    color: var(--alert-white);

    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}


/* ==========================================================================
   29. EMPTY NOTIFICATION STATE
   ========================================================================== */

.notifications-empty {
    padding: 32px 18px;

    color: var(--alert-muted);

    text-align: center;
}

.notifications-empty-icon {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 12px;

    border-radius: 50%;

    background: rgba(128, 0, 32, 0.06);
    color: var(--alert-primary);

    font-size: 1.3rem;
}

.notifications-empty-title {
    margin: 0 0 5px;

    color: var(--alert-text);

    font-size: 0.9rem;
    font-weight: 700;
}

.notifications-empty-text {
    margin: 0;

    font-size: 0.78rem;
}


/* ==========================================================================
   30. DISMISS ANIMATIONS
   ========================================================================== */

.alert.is-hiding,
.inaivom-alert.is-hiding {
    opacity: 0;
    transform: translateY(-5px);
}

.toast.is-hiding,
.inaivom-toast.is-hiding {
    opacity: 0;
    transform: translateX(25px);
}


/* ==========================================================================
   31. ANIMATIONS
   ========================================================================== */

@keyframes inaivom-toast-in {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes inaivom-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* ==========================================================================
   32. MOBILE
   ========================================================================== */

@media (max-width: 575.98px) {

    .alert,
    .inaivom-alert {
        gap: 9px;

        padding:
            12px
            40px
            12px
            12px;

        border-radius: 10px;
    }

    .alert-icon,
    .inaivom-alert-icon {
        width: 28px;
        height: 28px;

        flex-basis: 28px;

        font-size: 0.82rem;
    }

    .alert-title {
        font-size: 0.84rem;
    }

    .alert-message {
        font-size: 0.78rem;
    }

    .alert-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .alert-action {
        width: 100%;
    }

    .flash-messages-floating,
    .toast-container,
    .inaivom-toast-container {
        top: 72px;
        right: 10px;
        left: 10px;

        width: auto;
    }

    .toast,
    .inaivom-toast {
        border-radius: 12px;
    }

    .system-alert,
    .site-alert {
        padding-right: 40px;
        padding-left: 12px;

        font-size: 0.74rem;
    }
}


/* ==========================================================================
   33. ACCESSIBILITY
   ========================================================================== */

.alert[role="alert"],
.inaivom-alert[role="alert"] {
    isolation: isolate;
}

@media (prefers-reduced-motion: reduce) {

    .alert,
    .inaivom-alert,
    .toast,
    .inaivom-toast,
    .toast-progress-bar {
        animation: none !important;
        transition: none !important;
    }
}


/* ==========================================================================
   34. PRINT
   ========================================================================== */

@media print {

    .flash-messages-floating,
    .toast-container,
    .inaivom-toast-container,
    .system-alert,
    .site-alert {
        display: none !important;
    }

    .alert,
    .inaivom-alert {
        border: 1px solid #cccccc;

        background: #ffffff !important;
        color: #000000 !important;

        box-shadow: none;
    }

    .alert-close,
    .btn-close {
        display: none !important;
    }
}