/* Custom alert modal */
.app-alert-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    /* Must stay above any modal overlays (some pages use z-index: 10000). */
    z-index: 20000;
}

.app-alert-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.app-alert {
    width: min(520px, calc(100% - 32px));
    background: #101114;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 20px 22px 18px;
    color: #FFFFFF;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.2s ease;
    position: relative;
}

.app-alert-overlay.is-open .app-alert {
    transform: translateY(0) scale(1);
}

.app-alert__title {
    margin: 0 32px 6px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
}

.app-alert__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
    max-height: 240px;
    overflow-y: auto;
    padding-right: 6px;
}

.app-alert__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.app-alert__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

.app-alert--success {
    border-color: rgba(38, 161, 123, 0.7);
}

.app-alert--success .app-alert__title {
    color: #4EFF83;
}

.app-alert--error {
    border-color: rgba(255, 85, 85, 0.7);
}

.app-alert--error .app-alert__title {
    color: #FF6B6B;
}

.app-alert--info .app-alert__title {
    color: #7AA7FF;
}

.app-alert--warning {
    border-color: rgba(255, 201, 71, 0.7);
}

.app-alert--warning .app-alert__title {
    color: #FFD166;
}

body.app-alert-lock {
    overflow: hidden;
}

.app-alert__body::-webkit-scrollbar {
    width: 6px;
}

.app-alert__body::-webkit-scrollbar-track {
    background: transparent;
}

.app-alert__body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

@media (max-width: 480px) {
    .app-alert {
        padding: 18px 18px 16px;
    }
    .app-alert__title {
        font-size: 15px;
    }
    .app-alert__body {
        font-size: 13px;
    }
}
