/* Pokumo Web — Custom CSS */
/* Tailwind CSS handles most styling. Only truly custom styles go here. */

/* Smooth transitions for HTMX swaps */
.htmx-swapping {
    opacity: 0;
    transition: opacity 200ms ease-out;
}

.htmx-settling {
    opacity: 1;
    transition: opacity 200ms ease-in;
}

/* Progress bar animation */
@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-animated {
    animation: progress-pulse 2s ease-in-out infinite;
}

/* Crop card hover effect */
.crop-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crop-card:hover {
    transform: translateY(-1px);
}

/* Countdown timer font */
.font-mono {
    font-variant-numeric: tabular-nums;
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(2px);
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .crop-card {
        padding: 0.75rem;
    }
}

/* Water droplet animation */
@keyframes droplet-fill {
    from { transform: scale(0.8); opacity: 0.5; }
    to { transform: scale(1); opacity: 1; }
}

.droplet-filled {
    animation: droplet-fill 0.3s ease-out;
}

/* ---------------------------------------------------------------------------
   HTMX Indicator (loading spinner)
   By default .htmx-indicator is hidden. When the element (or an ancestor)
   has the .htmx-request class, the indicator becomes visible.
   --------------------------------------------------------------------------- */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
}

.htmx-request .water-btn-text {
    display: none;
}

/* ---------------------------------------------------------------------------
   Toast animations
   --------------------------------------------------------------------------- */
@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
