/* assets/css/generator-alerts.css */

#app-alerts-container {
    position: fixed !important;
    left: 50%;
    bottom: calc(var(--generator-total-height) + 96px);
    transform: translateX(-50%);
    width: auto;
    min-width: 300px;
    max-width: min(500px, calc(100vw - 32px));
    z-index: 2147483647 !important;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

#app-alerts-container .app-alert {
    position: relative;
    z-index: 2147483647 !important;
}

body:has(#faces-tool.show-popup) #app-alerts-container,
body:has(#faces-tool.show-popup) #app-alerts-container .app-alert,
body:has(#faces-workspace-overlay.is-visible) #app-alerts-container,
body:has(#faces-workspace-overlay.is-visible) #app-alerts-container .app-alert {
    z-index: 2147483647 !important;
}

@media (max-width: 768px) {
    #app-alerts-container {
        bottom: calc(var(--generator-total-height) + env(safe-area-inset-bottom) + 72px);
        min-width: 0;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }
}

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

@keyframes alert-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.app-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background-color: rgba(20, 20, 25, 0.95);
    border: 1px solid var(--color-border-default);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.05);
    animation: alert-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
}

.app-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.app-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-alert-text {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

.app-alert.fade-out {
    animation: alert-fade-out 0.4s ease forwards;
}

.app-alert.alert-warning {
    border-color: rgba(255, 152, 0, 0.3);
}

.app-alert.alert-warning::before {
    background-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.8);
}

.app-alert.alert-warning .app-alert-icon {
    color: #ff9800;
    filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.5));
}

.app-alert.alert-error,
.app-alert.alert-critical {
    border-color: rgba(255, 74, 74, 0.3);
}

.app-alert.alert-error::before,
.app-alert.alert-critical::before {
    background-color: var(--color-error);
    box-shadow: 0 0 10px rgba(255, 74, 74, 0.8);
}

.app-alert.alert-error .app-alert-icon,
.app-alert.alert-critical .app-alert-icon {
    color: var(--color-error);
    filter: drop-shadow(0 0 6px rgba(255, 74, 74, 0.5));
}

.app-alert.alert-success {
    border-color: rgba(76, 175, 80, 0.3);
}

.app-alert.alert-success::before {
    background-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
}

.app-alert.alert-success .app-alert-icon {
    color: #4CAF50;
    filter: drop-shadow(0 0 6px rgba(76, 175, 80, 0.5));
}