/* ═══════════════════════════════════════════════
   Generic System Modal — Rich Popup Component
   Triggered via TempData from any controller
   ═══════════════════════════════════════════════ */

/* ── Overlay ── */
.sys-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sys-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Card ── */
.sys-modal {
    background: #fff;
    border-radius: 20px;
    width: 420px;
    max-width: 90vw;
    padding: 0;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.sys-modal-overlay.active .sys-modal {
    transform: scale(1) translateY(0);
}

/* ── Top Accent Bar ── */
.sys-modal-accent {
    height: 5px;
}

.sys-modal-accent.success {
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}

.sys-modal-accent.error {
    background: linear-gradient(90deg, #ef4444, #f87171, #fca5a5);
}

.sys-modal-accent.info {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

.sys-modal-accent.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #fcd34d);
}

/* ── Body ── */
.sys-modal-body {
    padding: 32px 32px 24px;
    text-align: center;
}

/* ── Icon Circle ── */
.sys-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sysModalPop 0.5s ease 0.2s both;
}

.sys-modal-icon.success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.sys-modal-icon.success i {
    font-size: 2rem;
    color: #059669;
}

.sys-modal-icon.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.sys-modal-icon.error i {
    font-size: 2rem;
    color: #dc2626;
}

.sys-modal-icon.info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.sys-modal-icon.info i {
    font-size: 2rem;
    color: #2563eb;
}

.sys-modal-icon.warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.sys-modal-icon.warning i {
    font-size: 2rem;
    color: #d97706;
}

@keyframes sysModalPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Title ── */
.sys-modal-title {
    font-family: var(--heading-font, 'Rubik', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

/* ── Message ── */
.sys-modal-message {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ── Footer ── */
.sys-modal-footer {
    padding: 0 32px 28px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.sys-modal-btn {
    padding: 10px 32px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--heading-font, 'Rubik', sans-serif);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.sys-modal-btn-primary {
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sys-modal-btn-primary.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.sys-modal-btn-primary.success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.sys-modal-btn-primary.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.sys-modal-btn-primary.error:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.sys-modal-btn-primary.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.sys-modal-btn-primary.info:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.sys-modal-btn-primary.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.sys-modal-btn-primary.warning:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* ── Close Button ── */
.sys-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.2s;
    z-index: 1;
}

.sys-modal-close:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ── Confetti-like particles for success ── */
.sys-modal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.sys-modal-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: sysParticleFall 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes sysParticleFall {
    0% { transform: translateY(-20px) scale(0); opacity: 1; }
    100% { transform: translateY(60px) scale(1); opacity: 0; }
}
