/* ========================================================
   FUTURISTIC CYBER DIALOG SYSTEM - FISIP UBK ENTERPRISE
   Ultra-Modern, Fancy Neo-Glassmorphism Popup System
   Consistent across All Platforms (Desktop, Tablet, iOS, Android)
   ======================================================== */

.app-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 12, 24, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

.app-dialog-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.app-dialog-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, rgba(24, 30, 52, 0.96) 0%, rgba(13, 17, 34, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.7),
                0 0 45px -10px rgba(235, 60, 0, 0.25),
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    padding: 32px 28px 26px;
    text-align: center;
    transform: scale(0.88) translateY(24px);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.app-dialog-backdrop.active .app-dialog-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Cyber Glow Accent Line at top */
.app-dialog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--dialog-accent, #EB3C00), transparent);
    box-shadow: 0 0 18px var(--dialog-accent, #EB3C00);
    border-radius: 2px;
}

/* Pulsing Badge Icon */
.app-dialog-icon-wrapper {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-dialog-icon-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--dialog-accent-glow, rgba(235, 60, 0, 0.4)) 0%, transparent 70%);
    animation: futuristicPulseRing 2.4s infinite ease-in-out;
}

.app-dialog-icon-circle {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1.5px solid var(--dialog-accent, #EB3C00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: var(--dialog-accent, #EB3C00);
    box-shadow: 0 0 25px var(--dialog-accent-glow, rgba(235, 60, 0, 0.35)),
                inset 0 0 15px var(--dialog-accent-glow, rgba(235, 60, 0, 0.2));
}

@keyframes futuristicPulseRing {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.18);
        opacity: 0.9;
    }
}

/* Dialog Typography */
.app-dialog-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.app-dialog-message {
    font-size: 0.92rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 26px;
    word-break: break-word;
}

/* Actions */
.app-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.app-dialog-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1;
    text-decoration: none;
    outline: none;
}

.app-dialog-btn:active {
    transform: scale(0.96);
}

/* Primary / Confirm Button */
.app-dialog-btn-primary {
    background: linear-gradient(135deg, var(--dialog-accent, #EB3C00), #ff6633);
    color: #ffffff;
    box-shadow: 0 6px 20px -2px var(--dialog-accent-glow, rgba(235, 60, 0, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-dialog-btn-primary:hover {
    background: linear-gradient(135deg, #ff4d12, #ff7744);
    box-shadow: 0 8px 25px 0px var(--dialog-accent-glow, rgba(235, 60, 0, 0.65));
}

/* Cancel / Close Button */
.app-dialog-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

.app-dialog-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

/* Theme Variants */
/* 1. Error / Oopss Variant */
.app-dialog-card.type-error {
    --dialog-accent: #f43f5e;
    --dialog-accent-glow: rgba(244, 63, 94, 0.5);
    border-color: rgba(244, 63, 94, 0.3);
}

.app-dialog-card.type-error .app-dialog-btn-primary {
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    box-shadow: 0 6px 22px -2px rgba(225, 29, 72, 0.5);
}

.app-dialog-card.type-error .app-dialog-btn-primary:hover {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    box-shadow: 0 8px 26px 0px rgba(244, 63, 94, 0.7);
}

/* 2. Confirm / Danger Variant */
.app-dialog-card.type-danger {
    --dialog-accent: #ef4444;
    --dialog-accent-glow: rgba(239, 68, 68, 0.5);
    border-color: rgba(239, 68, 68, 0.25);
}

.app-dialog-card.type-danger .app-dialog-btn-primary {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 6px 20px -2px rgba(220, 38, 38, 0.5);
}

/* 3. Confirm / Cyber Blue Variant */
.app-dialog-card.type-confirm {
    --dialog-accent: #06b6d4;
    --dialog-accent-glow: rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.25);
}

.app-dialog-card.type-confirm .app-dialog-btn-primary {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 6px 20px -2px rgba(8, 145, 178, 0.5);
}

/* 4. Success Variant */
.app-dialog-card.type-success {
    --dialog-accent: #10b981;
    --dialog-accent-glow: rgba(16, 185, 129, 0.5);
    border-color: rgba(16, 185, 129, 0.25);
}

.app-dialog-card.type-success .app-dialog-btn-primary {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 6px 20px -2px rgba(5, 150, 105, 0.5);
}

/* Responsive on Mobile Devices (<= 576px) */
@media (max-width: 576px) {
    .app-dialog-backdrop {
        padding: 14px;
        align-items: flex-end;
    }

    .app-dialog-card {
        max-width: 100%;
        border-radius: 22px 22px 18px 18px;
        padding: 26px 18px 22px;
    }

    .app-dialog-icon-wrapper {
        width: 66px;
        height: 66px;
        margin-bottom: 16px;
    }

    .app-dialog-icon-circle {
        width: 58px;
        height: 58px;
        font-size: 1.6rem;
    }

    .app-dialog-title {
        font-size: 1.22rem;
    }

    .app-dialog-message {
        font-size: 0.88rem;
        margin-bottom: 22px;
    }

    .app-dialog-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .app-dialog-btn {
        width: 100%;
        min-height: 48px;
    }
}
