/* ==========================================================================
   Norton Boat Filter Pro — Frontend Styles (Premium Edition)
   ========================================================================== */

:root {
    --nf-primary: #000000;
    --nf-bg: #ffffff;
    --nf-text: #111827;
    --nf-text-hover: #000000;
    --nf-text-active: #ffffff;
    --nf-border: #e5e7eb;
    --nf-border-radius: 8px;
    --nf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nf-mobile-bg: #ffffff;
}

.norton-boat-filter-wrapper {
    position: relative;
    width: 100%;
    font-family: inherit;
}

/* --------------------------------------------------------------------------
   Container & Filter Groups
   -------------------------------------------------------------------------- */
.nf-filters-container {
    background-color: var(--nf-bg);
    border-radius: var(--nf-border-radius);
}

.nf-filter-group {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--nf-border);
}

.nf-filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.nf-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nf-filter-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--nf-text);
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Search Input (Premium Minimal)
   -------------------------------------------------------------------------- */
.nf-filter-search {
    margin-bottom: 16px;
}

.nf-search-input,
.nf-main-search {
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid transparent;
    border-radius: var(--nf-border-radius);
    font-size: 14px;
    color: var(--nf-text);
    transition: var(--nf-transition);
}

.nf-search-input:focus,
.nf-main-search:focus {
    background: #ffffff;
    border-color: var(--nf-border);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nf-search-wrapper {
    position: relative;
}

.nf-search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

.nf-search-wrapper input {
    padding-left: 42px;
}

/* --------------------------------------------------------------------------
   Options Container
   -------------------------------------------------------------------------- */
.nf-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nf-item input[type="radio"],
.nf-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.nf-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--nf-text);
    transition: var(--nf-transition);
    user-select: none;
    position: relative;
}

.nf-item-count {
    margin-left: 6px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Display Type: Pills & Buttons (Premium Shadows & Bloom)
   -------------------------------------------------------------------------- */
.nf-display-pills .nf-item,
.nf-display-buttons .nf-item {
    padding: 8px 18px;
    background: var(--nf-bg);
    border: 1px solid var(--nf-border);
    border-radius: 40px; /* Pills default */
}

.nf-display-buttons .nf-item {
    border-radius: var(--nf-border-radius); /* Buttons default */
}

.nf-display-pills .nf-item:hover,
.nf-display-buttons .nf-item:hover {
    color: var(--nf-text-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.nf-display-pills .nf-item.is-active,
.nf-display-buttons .nf-item.is-active {
    background: var(--nf-primary);
    color: var(--nf-text-active);
    border-color: var(--nf-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.nf-display-pills .nf-item.is-active .nf-item-count,
.nf-display-buttons .nf-item.is-active .nf-item-count {
    color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Display Type: Tags / Chips
   -------------------------------------------------------------------------- */
.nf-display-tags .nf-item {
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.nf-display-tags .nf-item:hover {
    background: #e5e7eb;
}

.nf-display-tags .nf-item.is-active {
    background: var(--nf-primary);
    color: #fff;
}

.nf-display-tags .nf-item.is-active .nf-item-count {
    color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Display Type: Checkbox & Radio (Custom Animated SVG Style)
   -------------------------------------------------------------------------- */
.nf-display-checkbox .nf-options-container,
.nf-display-radio .nf-options-container,
.nf-display-search-checkbox .nf-options-container,
.nf-display-accordion .nf-options-container {
    flex-direction: column;
    gap: 12px;
}

.nf-display-checkbox .nf-item-visual,
.nf-display-radio .nf-item-visual,
.nf-display-search-checkbox .nf-item-visual,
.nf-display-accordion .nf-item-visual {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--nf-border);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    transition: var(--nf-transition);
}

.nf-display-checkbox .nf-item-visual,
.nf-display-search-checkbox .nf-item-visual,
.nf-display-accordion .nf-item-visual {
    border-radius: 4px;
}

.nf-display-radio .nf-item-visual {
    border-radius: 50%;
}

.nf-display-checkbox .nf-item:hover .nf-item-visual,
.nf-display-radio .nf-item:hover .nf-item-visual {
    border-color: #9ca3af;
}

/* Checked States */
.nf-item.is-active .nf-item-visual {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
}

.nf-display-checkbox .nf-item.is-active .nf-item-visual::after,
.nf-display-search-checkbox .nf-item.is-active .nf-item-visual::after,
.nf-display-accordion .nf-item.is-active .nf-item-visual::after {
    content: '';
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
    opacity: 0;
    animation: nf-check-in 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.1s;
}

.nf-display-radio .nf-item.is-active .nf-item-visual::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: scale(0);
    animation: nf-radio-in 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes nf-check-in {
    from { opacity: 0; transform: rotate(45deg) scale(0.5); }
    to { opacity: 1; transform: rotate(45deg) scale(1); }
}

@keyframes nf-radio-in {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Display Type: Toggle Switches
   -------------------------------------------------------------------------- */
.nf-display-switches .nf-options-container {
    flex-direction: column;
}

.nf-display-switches .nf-item {
    justify-content: space-between;
    width: 100%;
}

.nf-display-switches .nf-item-visual {
    width: 40px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 24px;
    position: relative;
    transition: var(--nf-transition);
    order: 2;
    margin-left: 12px;
}

.nf-display-switches .nf-item-visual::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--nf-transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nf-display-switches .nf-item.is-active .nf-item-visual {
    background: var(--nf-primary);
}

.nf-display-switches .nf-item.is-active .nf-item-visual::after {
    transform: translateX(16px);
}

/* --------------------------------------------------------------------------
   Display Type: Accordion
   -------------------------------------------------------------------------- */
.nf-display-accordion .nf-filter-header {
    cursor: pointer;
    user-select: none;
    transition: var(--nf-transition);
}

.nf-display-accordion .nf-filter-header:hover {
    opacity: 0.8;
}

.nf-accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.nf-accordion-icon::before,
.nf-accordion-icon::after {
    content: '';
    position: absolute;
    background: #6b7280;
    transition: var(--nf-transition);
    border-radius: 2px;
}

.nf-accordion-icon::before {
    top: 9px;
    left: 3px;
    width: 14px;
    height: 2px;
}

.nf-accordion-icon::after {
    top: 3px;
    left: 9px;
    width: 2px;
    height: 14px;
}

.nf-display-accordion.is-open .nf-accordion-icon::after {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.nf-display-accordion .nf-filter-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

.nf-display-accordion.is-open .nf-filter-body {
    grid-template-rows: 1fr;
}

.nf-display-accordion .nf-filter-body > div {
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Display Type: Dropdown
   -------------------------------------------------------------------------- */
.nf-display-dropdown .nf-options-container,
.nf-display-dropdown-multi .nf-options-container {
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-border-radius);
    padding: 6px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar for dropdowns */
.nf-display-dropdown .nf-options-container::-webkit-scrollbar,
.nf-display-dropdown-multi .nf-options-container::-webkit-scrollbar {
    width: 6px;
}
.nf-display-dropdown .nf-options-container::-webkit-scrollbar-thumb,
.nf-display-dropdown-multi .nf-options-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.nf-display-dropdown .nf-item,
.nf-display-dropdown-multi .nf-item {
    padding: 10px 12px;
    width: 100%;
    border-radius: 6px;
}

.nf-display-dropdown .nf-item:hover,
.nf-display-dropdown-multi .nf-item:hover {
    background: #f8fafc;
}

.nf-display-dropdown-multi .nf-item-visual {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--nf-border);
    margin-right: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nf-display-dropdown-multi .nf-item.is-active .nf-item-visual {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
}

.nf-display-dropdown-multi .nf-item.is-active .nf-item-visual::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.nf-display-dropdown .nf-item.is-active {
    background: #f1f5f9;
    color: var(--nf-primary);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Active Filters / Chips Bar
   -------------------------------------------------------------------------- */
.nf-active-filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding: 16px;
    background: #f9fafb;
    border-radius: var(--nf-border-radius);
    border: 1px solid #f3f4f6;
}

.nf-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-grow: 1;
}

.nf-chip {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--nf-border);
    border-radius: 20px;
    padding: 6px 12px 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--nf-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.nf-chip-remove {
    margin-left: 8px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: var(--nf-transition);
}

.nf-chip-remove:hover {
    color: #ef4444;
}

.nf-clear-all {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    transition: var(--nf-transition);
}

.nf-clear-all:hover {
    color: var(--nf-text);
}

/* --------------------------------------------------------------------------
   Loading States
   -------------------------------------------------------------------------- */
.elementor-loop-container.is-loading {
    opacity: 0.4;
    filter: grayscale(20%);
    pointer-events: none;
    transition: opacity 0.3s, filter 0.3s;
}

/* --------------------------------------------------------------------------
   Mobile Offcanvas (Left Slide, Smooth Shadows)
   -------------------------------------------------------------------------- */
.nf-mobile-trigger {
    display: none;
    width: 100%;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-border-radius);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: var(--nf-transition);
}

.nf-mobile-trigger:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}

.nf-mobile-actions {
    display: none;
}

@media (max-width: 767px) {
    .nf-mobile-trigger {
        display: block;
    }

    .nf-filters-container {
        position: fixed;
        top: 0;
        left: -100%; /* Slide from Left */
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--nf-mobile-bg);
        z-index: 99999;
        overflow-y: auto;
        padding: 32px 24px 100px 24px;
        box-shadow: 20px 0 40px rgba(0,0,0,0.08);
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-radius: 0; /* Reset radius for drawer */
    }

    .nf-filters-container.is-open {
        left: 0;
    }

    .nf-mobile-actions {
        display: block;
        position: fixed;
        bottom: 0;
        left: -100%;
        width: 320px;
        max-width: 85vw;
        padding: 20px 24px;
        background: var(--nf-mobile-bg);
        border-top: 1px solid var(--nf-border);
        z-index: 100000;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nf-mobile-actions.is-open {
        left: 0;
    }

    .nf-apply-filters {
        width: 100%;
        padding: 14px;
        background: var(--nf-primary);
        color: #fff;
        border: none;
        border-radius: var(--nf-border-radius);
        font-weight: 600;
        font-size: 15px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    body.nf-mobile-open {
        overflow: hidden;
    }

    body.nf-mobile-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(17, 24, 39, 0.4);
        backdrop-filter: blur(2px);
        z-index: 99998;
        animation: nf-fade-in 0.3s ease forwards;
    }

    @keyframes nf-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}
