/**
 * CSS styles for Featured Products Filter Component - General Block & Tabs Layout
 */

.woocommerce-featured-filter-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 40px;

    /* Common hover style variables */
    --btn-hover-bg: #1a1a1a;
    --btn-hover-border: #1a1a1a;
    --btn-hover-text: #ffffff;
}

/* Header & Filter Tabs */
.featured-filter-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.featured-filter-title {
    margin: 0 !important;
}

.featured-filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tab {
    background: #ffffff;
    border: 1px solid #E5E5E5;
    color: #404040;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    color: var(--btn-hover-text);
}

.filter-tab.active {
    background: #111111;
    color: #ffffff;
}

/* Grid Wrapper & Loader States */
.featured-products-grid-wrapper {
    position: relative;
    min-height: 200px;
}

.featured-products-grid-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.featured-products-grid-wrapper.is-loading .featured-products-grid-loader {
    display: block;
}

.loader-spinner {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(133, 63, 19, 0.15) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    animation: circle-bounce 1.4s ease-in-out infinite !important;
}

.loader-spinner::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 18px !important;
    height: 18px !important;
    margin-left: -9px !important;
    margin-top: -9px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23853F13" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 8h1a4 4 0 1 1 0 8h-1M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"/><line x1="6" y1="2" x2="6" y2="4"/><line x1="10" y1="2" x2="10" y2="4"/><line x1="14" y1="2" x2="14" y2="4"/></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    animation: spin 1.2s linear infinite !important;
}

@keyframes circle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

/* Smooth opacity transition for AJAX loading */
#featured-products-grid {
    transition: opacity 0.25s ease;
}

/* View All Products Button Styles */
.featured-products-view-all-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.featured-products-view-all-btn {
    border-radius: 40px;
    border: 1px solid #D6DBE1;
    background: #FFF;
    display: flex;
    height: 48px;
    padding: 14px 30px;
    justify-content: center;
    align-items: center;
    gap: 7.99px;
    text-decoration: none;
    color: #262626;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

button.featured-products-view-all-btn {
    cursor: pointer;
    background: #FFF;
    border: 1px solid #D6DBE1;
    outline: none;
    font-family: inherit;
    line-height: inherit;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.featured-products-view-all-btn:focus,
.featured-products-view-all-btn:active,
.featured-products-view-all-btn:focus-visible {
    outline: none !important;
    background: #FFF !important;
    border-color: #D6DBE1 !important;
    color: #262626 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.featured-products-view-all-btn:hover {
    background: var(--btn-hover-bg) !important;
    border-color: var(--btn-hover-border) !important;
    color: var(--btn-hover-text) !important;
    text-decoration: none !important;
}