/* --- UI Framework Styles --- */

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    background: #ffffff;
    border-left: 4px solid #10b981;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #1e293b;
    min-width: 250px;
}

.custom-toast.show { transform: translateX(0); }

.custom-toast.toast-error { border-color: #ef4444; }
.custom-toast.toast-error i { color: #ef4444; font-size: 1.2rem; }
.custom-toast.toast-success i { color: #10b981; font-size: 1.2rem; }
.custom-toast.toast-info { border-color: #3b82f6; }
.custom-toast.toast-info i { color: #3b82f6; font-size: 1.2rem; }

/* Modal/Alert Overlays */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    backdrop-filter: blur(4px);
}

.custom-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.custom-modal-overlay.show .custom-modal { transform: scale(1); }

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { margin: 0; font-size: 1.2rem; color: #0f172a; font-weight: 700; }

.close-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #94a3b8; transition: 0.2s;}
.close-btn:hover { color: #ef4444; }

.modal-body { padding: 1.5rem; color: #475569; font-size: 1rem; line-height: 1.6; }

.modal-footer {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel, .btn-confirm {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: 0.2s ease;
}

.btn-cancel { background: #e2e8f0; color: #475569; }
.btn-cancel:hover { background: #cbd5e1; }

.btn-confirm { background: #125e3a; color: white; box-shadow: 0 4px 6px rgba(18, 94, 58, 0.2); }
.btn-confirm:hover { background: #0d462a; transform: translateY(-1px); }
.btn-confirm:active { transform: translateY(0); }

/* --- MASTER LEVEL LOADING STATES --- */
/* Skeleton Shimmer Effect */
.skeleton {
    background: #e2e8f0;
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f8fafc 40px, #e2e8f0 80px);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-text { height: 1.2rem; margin-bottom: 0.5rem; width: 100%; border-radius: 4px; }
.skeleton-text.short { width: 60%; }
.skeleton-img { width: 100%; height: 150px; border-radius: 12px 12px 0 0; }

/* Button Loading State */
.btn-loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none;
    transition: all 0.3s ease;
}
.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

/* Form inputs disabled transition */
input:disabled, select:disabled, textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #f8fafc;
}

/* Fade in animation for loaded content */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-loading * { opacity: 0 !important; }

