/**
 * Ekima Stays Filters - Minimal CSS
 *
 * Provides subtle visual feedback for active filter state,
 * loading states, and "See More" button styling.
 * Designed to not override Elementor styles.
 *
 * @package Ekima\StaysFilters
 * @since 1.1.0
 */

/* ==========================================================================
   Active State
   ========================================================================== */

/* Active state indicator - subtle and non-intrusive */
.ekima-filters [class*="ekima-filter--"].is-active,
.ekima-filters > .is-active {
    position: relative;
    background-color:var(--e-global-color-9d40945)!important;
    color:white!important;
}

/* Hover state for better UX */
.ekima-filters [class*="ekima-filter--"]:hover,
.ekima-filters > *:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Reset opacity for active items on hover */
.ekima-filters [class*="ekima-filter--"].is-active:hover,
.ekima-filters > .is-active:hover {
    opacity: 1;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

/* Disabled state during loading */
.ekima-filters.is-loading [class*="ekima-filter--"],
.ekima-filters.is-loading > * {
    pointer-events: none;
    opacity: 0.5;
    cursor: wait !important;
}

.ekima-filters [class*="ekima-filter--"].is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Grid loading state */
.elementor-widget-loop-grid.is-loading .elementor-loop-container {
    position: relative;
    min-height: 200px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* Loading spinner overlay */
.elementor-widget-loop-grid.is-loading .elementor-loop-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ekima-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes ekima-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==========================================================================
   See More Button
   ========================================================================== */

/* Base styling - minimal to not conflict with Elementor */
.ekima-filter--see-more {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ekima-filter--see-more:hover {
    opacity: 0.8;
}

/* Disabled state when no more posts */
.ekima-filter--see-more.is-disabled,
.ekima-filter--see-more[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
}

/* Hidden state */
.ekima-filter--see-more.is-hidden {
    display: none !important;
}

/* Loading state for button */
.ekima-filter--see-more.is-loading {
    pointer-events: none;
    opacity: 0.6;
    cursor: wait;
}

/* Optional: loading indicator inside button */
.ekima-filter--see-more.is-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ekima-spin 0.8s linear infinite;
    vertical-align: middle;
}

/* ==========================================================================
   Error State
   ========================================================================== */

.ekima-ajax-error {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.ekima-no-results {
    padding: 3rem 2rem;
    text-align: center;
    color: #666;
}

.ekima-no-results p {
    margin: 0;
    font-size: 1.1em;
}

/* ==========================================================================
   Fallback Card Styles (when Elementor template unavailable)
   ========================================================================== */

.ekima-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.ekima-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ekima-card__image img {
    width: 100%;
    height: auto;
    display: block;
}

.ekima-card__content {
    padding: 1rem;
}

.ekima-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.1em;
}

.ekima-card__title a {
    color: inherit;
    text-decoration: none;
}

.ekima-card__title a:hover {
    text-decoration: underline;
}

.ekima-card__excerpt {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}
