/* ==========================================================================
   Modern Dialog & Toast System — Wafy & Wafiyya Alumni Platform
   Pure CSS · Smooth Micro-animations · Glassmorphism · Mobile-responsive
   ========================================================================== */

/* Dialog Backdrop Overlay */
.modern-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modern-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Dialog Container Card */
.modern-dialog-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.28), 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    padding: 30px 28px 24px;
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #161614;
    text-align: center;
}

.modern-dialog-overlay.active .modern-dialog-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Dialog Icon Badges */
.dialog-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 18px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modern-dialog-overlay.active .dialog-icon-wrapper {
    transform: scale(1.05);
}

.dialog-icon-success {
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid #a7f3d0;
}

.dialog-icon-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
}

.dialog-icon-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1.5px solid #fde68a;
}

.dialog-icon-info {
    background: #fff0eb;
    color: #ff6b47;
    border: 1.5px solid #ffd8cc;
}

/* Dialog Typography */
.dialog-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 10px;
}

.dialog-message {
    font-size: 0.92rem;
    line-height: 1.62;
    color: #64748b;
    margin-bottom: 22px;
    word-break: break-word;
    white-space: pre-line;
}

/* Copyable Code/Credential Box */
.dialog-code-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    margin: -6px 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.dialog-code-content {
    flex: 1;
    min-width: 0;
}

.dialog-code-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.dialog-code-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.04em;
    user-select: all;
}

.dialog-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.dialog-copy-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.dialog-copy-btn.copied {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* Dialog Action Buttons */
.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dialog-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dialog-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.35);
}

.dialog-btn-primary {
    background: #ff6b47;
    color: #ffffff;
}

.dialog-btn-primary:hover {
    background: #e85a38;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 107, 71, 0.28);
}

.dialog-btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.dialog-btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

.dialog-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dialog-btn-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.modern-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 36px);
}

@media (max-width: 600px) {
    .modern-toast-container {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }
}

.modern-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.04);
    padding: 12px 18px;
    min-width: 260px;
    max-width: 420px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.modern-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modern-toast.hide {
    transform: translateY(12px) scale(0.95);
    opacity: 0;
}

.modern-toast-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.modern-toast-success .modern-toast-icon { background: #ecfdf5; color: #059669; }
.modern-toast-error .modern-toast-icon { background: #fef2f2; color: #dc2626; }
.modern-toast-warning .modern-toast-icon { background: #fffbeb; color: #d97706; }
.modern-toast-info .modern-toast-icon { background: #fff0eb; color: #ff6b47; }

.modern-toast-text {
    flex: 1;
    line-height: 1.45;
}

.modern-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modern-toast-close:hover {
    color: #1e293b;
    background: #f1f5f9;
}
