/* Global Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1.2em;
    height: 1.2em;
    top: 50%;
    left: 50%;
    margin-top: -0.6em;
    margin-left: -0.6em;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Validation Styles */
.input-error {
    border-color: #ef4444 !important; /* Tailwind red-500 */
    background-color: #fef2f2 !important; /* Tailwind red-50 */
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.input-error + .error-message {
    display: block;
}

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

.toast {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    border-left: 4px solid;
}

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

.toast-success { border-left-color: #10b981; } /* emerald-500 */
.toast-error { border-left-color: #ef4444; } /* red-500 */
.toast-info { border-left-color: #3b82f6; } /* blue-500 */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9; 
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}
