/**
 * Universal Modal System Styles
 *
 * @version 1.0.0
 * @author Gemini Code Assist
 */

/* --- Keyframes for Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* --- Modal Container & Backdrop --- */
.modal-container {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0.3s, opacity 0.3s;
}

.modal-container[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease-out;
}

.modal-container[aria-hidden="true"] {
    animation: fadeOut 0.3s ease-in forwards;
}

/* --- Modal Content Box --- */
.modal-content {
    background-color: white;
    border-radius: 1.5rem; /* 24px */
    padding: 2rem; /* 32px */
    max-width: 28rem; /* 448px */
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.modal-container[aria-hidden="false"] .modal-content {
    animation: slideUp 0.3s ease-out;
}

.modal-container[aria-hidden="true"] .modal-content {
    animation: slideDown 0.3s ease-in forwards;
}

/* --- Modal Icon --- */
.modal-icon {
    width: 4rem; /* 64px */
    height: 4rem; /* 64px */
    margin: 0 auto 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-icon svg, .modal-icon i {
    width: 2rem; /* 32px */
    height: 2rem; /* 32px */
}
.modal-icon .animate-spin {
    animation: spin 1s linear infinite;
}


/* Icon Colors (translate from Tailwind) */
.bg-blue-100 { background-color: #DBEAFE; }
.text-blue-600 { color: #2563EB; }
.bg-orange-100 { background-color: #FFEDD5; }
.text-orange-600 { color: #EA580C; }
.bg-red-100 { background-color: #FEE2E2; }
.text-red-600 { color: #DC2626; }
.bg-green-100 { background-color: #D1FAE5; }
.text-green-600 { color: #059669; }
.bg-cyan-100 { background-color: #CFFAFE; }
.text-cyan-600 { color: #0891B2; }

/* --- Title & Message --- */
.modal-title {
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    color: #1e293b; /* slate-800 */
    margin-bottom: 0.75rem; /* 12px */
}

.modal-message {
    color: #475569; /* slate-600 */
    margin-bottom: 1.5rem; /* 24px */
    line-height: 1.6;
}

/* --- Progress Bar --- */
.modal-progress-container {
    display: none; /* Hidden by default */
    width: 100%;
    background-color: #e5e7eb; /* gray-200 */
    border-radius: 9999px;
    height: 1.25rem; /* 20px */
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.modal-progress-bar {
    height: 100%;
    width: 0%;
    background-image: linear-gradient(to right, #2563EB, #0891B2); /* from-blue-600 to-cyan-500 */
    border-radius: 9999px;
    transition: width 0.3s ease-in-out;
}

.modal-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 0.75rem; /* 12px */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
/* --- Buttons --- */
.modal-buttons {
    display: flex;
    gap: 0.75rem; /* 12px */
    flex-direction: column-reverse;
}

@media (min-width: 640px) {
    .modal-buttons {
        flex-direction: row;
    }
}

.modal-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem; /* 12px */
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.modal-btn-confirm {
    background-image: linear-gradient(to right, #2563EB, #0891B2); /* from-blue-600 to-cyan-500 */
    color: white;
}
.modal-btn-danger {
    background-image: linear-gradient(to right, #DC2626, #EA580C); /* from-red-600 to-orange-500 */
    color: white;
}
.modal-btn-cancel {
    background-color: white;
    border: 2px solid #e2e8f0; /* border-gray-200 */
    color: #334155; /* text-gray-700 */
}
.modal-btn-cancel:hover {
    background-color: #f8fafc; /* bg-gray-50 */
}