/* Modal System - compiled CSS (no Tailwind @apply dependency) */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2200;
    transition: opacity 0.3s ease;
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-container {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 24px 64px rgba(2, 8, 23, 0.28);
    max-width: 32rem;
    width: 100%;
    transform: translateY(0) scale(1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-backdrop.hidden .modal-container {
    transform: translateY(4px) scale(0.96);
    opacity: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 2rem 1.5rem;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 0 2rem 1.5rem;
    color: #374151;
}

.modal-footer {
    padding: 0 2rem 2rem;
    display: flex;
    gap: 0.75rem;
}

.modal-btn {
    border: 0;
    padding: 0.8rem 1rem;
    border-radius: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    flex: 1;
    text-align: center;
}

.modal-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #475569);
}

.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.modal-btn-secondary {
    color: #1f2937;
    background: #e5e7eb;
}

.modal-btn-secondary:hover {
    background: #d1d5db;
}

.modal-btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

.modal-icon {
    margin: 0 auto 1.5rem;
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(2, 8, 23, 0.2);
}

.modal-icon-success {
    background: linear-gradient(135deg, #34d399, #059669);
}

.modal-icon-error {
    background: linear-gradient(135deg, #f87171, #dc2626);
}

.modal-icon-warning {
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

.modal-icon-info {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
}

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
}

.check-icon {
    width: 6rem;
    height: 6rem;
    position: relative;
    border-radius: 9999px;
    border: 4px solid #10b981;
    box-sizing: content-box;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.icon-line {
    height: 0.375rem;
    background: #10b981;
    display: block;
    border-radius: 0.125rem;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(16, 185, 129, 0.2);
}

.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: white;
}

@keyframes rotate-circle {
    0% { transform: rotate(-45deg); }
    5% { transform: rotate(-45deg); }
    12% { transform: rotate(-405deg); }
    100% { transform: rotate(-405deg); }
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 14px; top: 45px; }
}

@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 8px; top: 38px; }
}

/* Responsive */
@media (max-width: 640px) {
    .modal-container {
        max-width: calc(100vw - 1.5rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .modal-header {
        padding-top: 1.25rem;
        padding-bottom: 1rem;
    }

    .modal-body {
        padding-bottom: 1rem;
    }

    .modal-footer {
        padding-bottom: 1.25rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
}










