/* Custom styles bridging Tailwind */

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom WebKit Scrollbar matching brand-500 (#14b8a6) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc; /* slate-50 */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #5eead4; /* teal-300 / brand-300 approx */
    border-radius: 4px;
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: #14b8a6; /* brand-500 */
}

/* Specific horizontal scrollbar class (used in progress bar) */
.custom-scrollbar::-webkit-scrollbar {
    height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* slate-300 */
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* slate-400 */
}

/* Smooth input transitions */
input, textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drag and drop active state */
.dragover {
    background-color: #f0fdfa !important; /* brand-50 */
    border-color: #14b8a6 !important; /* brand-500 */
    transform: scale(1.02);
}

/* Button Active state */
button[type="submit"]:active {
    transform: scale(0.98);
}

/* Button disabled state */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Custom background animations */
@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseSlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

.animate-slow-spin {
    animation: slowSpin 60s linear infinite;
    transform-origin: 50% 50%;
}

.animate-pulse-slow {
    animation: pulseSlow 8s ease-in-out infinite;
    transform-origin: 50% 50%;
}

/* Fade in animation for toast */
@keyframes slideDownAndFadeIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#toast:not(.hidden) {
    animation: slideDownAndFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

/* Form Step Transitions */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(12px) scale(0.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.active-step {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}
