/**
 * Copyright (c) 2026-2060, Arya Wiramukti Reksakembara. Alright Reserved
 *
 * Futuristic Glassmorphism JS Dialog & Toast Styles
 * Sleek, cyber-modern, smooth animations
 */

:root {
    --dlg-bg: rgba(15, 23, 42, 0.88);
    --dlg-border: rgba(99, 102, 241, 0.35);
    --dlg-glow: rgba(99, 102, 241, 0.25);
    --dlg-text: #f8fafc;
    --dlg-text-muted: #94a3b8;
    --dlg-primary: #6366f1;
    --dlg-primary-hover: #4f46e5;
    --dlg-success: #10b981;
    --dlg-danger: #f43f5e;
    --dlg-warning: #f59e0b;
}

/* Modal Overlay */
.dlg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    box-sizing: border-box;
}

.dlg-overlay.dlg-show {
    opacity: 1;
    visibility: visible;
}

/* Modal Box */
.dlg-box {
    background: var(--dlg-bg);
    border: 1px solid var(--dlg-border);
    box-shadow: 0 0 35px var(--dlg-glow), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 32px 28px;
    text-align: center;
    color: var(--dlg-text);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.dlg-overlay.dlg-show .dlg-box {
    transform: scale(1) translateY(0);
}

/* Icon Container with futuristic aura */
.dlg-icon-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dlg-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dlg-primary), transparent);
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
}

.dlg-icon-wrapper.success::after { background: var(--dlg-success); }
.dlg-icon-wrapper.danger::after, .dlg-icon-wrapper.error::after { background: var(--dlg-danger); }
.dlg-icon-wrapper.warning::after { background: var(--dlg-warning); }

.dlg-icon {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Title & Content */
.dlg-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.dlg-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dlg-text-muted);
    margin: 0 0 24px;
    word-break: break-word;
}

/* Prompt Input */
.dlg-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 24px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dlg-input:focus {
    border-color: var(--dlg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.09);
}

.dlg-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Action Buttons */
.dlg-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.dlg-btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.dlg-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.dlg-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
}

.dlg-btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.dlg-btn-danger:hover {
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.6);
    transform: translateY(-1px);
}

.dlg-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dlg-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ================= TOAST NOTIFICATIONS ================= */
.dlg-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.dlg-toast {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(120%);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.dlg-toast.dlg-toast-visible {
    transform: translateX(0);
}

.dlg-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.dlg-toast-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #f1f5f9;
}

.dlg-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-left: 6px;
    transition: color 0.15s;
}

.dlg-toast-close:hover {
    color: #fff;
}

.dlg-toast.toast-success { border-left: 4px solid var(--dlg-success); }
.dlg-toast.toast-error { border-left: 4px solid var(--dlg-danger); }
.dlg-toast.toast-warning { border-left: 4px solid var(--dlg-warning); }
.dlg-toast.toast-info { border-left: 4px solid var(--dlg-primary); }
