/**
 * IntroTherapy - Custom CSS Overrides
 * Tailwind utilities are provided via CDN play script.
 * This file handles custom animations, component overrides, and print styles.
 */

/* Animated gradient blobs on homepage hero */
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.1); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.05); }
}

.animate-blob {
    animation: blob 12s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Practice card image overlays */
.practice-image-overlay {
    position: relative;
}
.practice-image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(38, 57, 51, 0.6));
    pointer-events: none;
}

/* Star rating hover states */
.star-btn {
    cursor: pointer;
    transition: transform 0.15s ease;
}
.star-btn:hover {
    transform: scale(1.15);
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Review rating bars */
.rating-bar-fill {
    transition: width 0.6s ease-out;
}

/* Mobile filter sidebar slide */
@media (max-width: 768px) {
    .filter-sidebar-mobile {
        position: fixed;
        inset: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .filter-sidebar-mobile.open {
        transform: translateX(0);
    }
}

/* Print styles */
@media print {
    header, footer, .no-print, .filter-sidebar, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Custom scrollbar for filter dropdowns */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f4f7f5;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cddbd2;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8c0af;
}

/* Loading spinner */
.spinner {
    border: 3px solid #e6ede8;
    border-top-color: #476854;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Tooltip for rating breakdown */
.rating-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 30;
}
.rating-trigger:hover .rating-tooltip {
    opacity: 1;
}

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

/* Hero search form on homepage */
.hero-search-form {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
