/* ==========================================================
   OZ REEZ BEAT FILTERS - STYLESHEET
   Brand color: #3176CE (no pink, no browser default blue/violet)
   ========================================================== */

/* ==== FILTER WRAPPER ==== */
.oz-beat-filters-wrapper {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: transparent;
}

/* ==== FILTER FORM ==== */
.oz-beat-filters-form {
    width: 100%;
}

.oz-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

/* ==== FILTER FIELD ==== */
.oz-filter-field {
    flex: 1;
    min-width: 150px;
}

.oz-filter-field.oz-filter-search {
    flex: 2;
    min-width: 200px;
}

.oz-filter-field.oz-filter-bpm {
    flex: 1.5;
    min-width: 200px;
}

/* ==== SEARCH INPUT ==== */
.oz-filter-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem; /* Extra right padding for clear icon */
    border: 1px solid #333;
    background: #1a1a1a;
    color: #d8d8d8;
    font-size: 14px;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.oz-filter-input:focus {
    outline: none;
    border-color: #3176CE;
    box-shadow: 0 0 0 2px rgba(49, 118, 206, 0.1);
}

.oz-filter-input::placeholder {
    color: #888;
}

/* ==== SEARCH INPUT WRAPPER & CLEAR ICON ==== */
.oz-search-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.oz-search-input-wrapper .oz-filter-input {
    width: 100%;
}

.oz-search-clear-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    color: #d8d8d8;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease, color 0.15s ease;
    user-select: none;
    line-height: 1;
}

.oz-search-clear-icon.visible {
    opacity: 1;
    visibility: visible;
}

.oz-search-clear-icon:hover {
    color: #d8d8d8;
}

/* ==== SELECT DROPDOWNS ==== */
.oz-filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #d8d8d8;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d8d8d8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.oz-filter-select:focus {
    outline: none;
    border-color: #3176CE;
    box-shadow: 0 0 0 2px rgba(49, 118, 206, 0.1);
}

.oz-filter-select:hover {
    border-color: #3176CE;
}

/* ==== BPM RANGE ==== */
.oz-filter-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #d8d8d8;
    font-size: 14px;
    font-weight: 500;
}

.oz-filter-label #oz-bpm-display {
    color: #d8d8d8;
    font-weight: 600;
}

.oz-bpm-range-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.oz-filter-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.oz-filter-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d8d8d8;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.oz-filter-range::-webkit-slider-thumb:hover {
    background: #d8d8d8;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(204, 204, 204, 0.4);
}

.oz-filter-range::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.oz-filter-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d8d8d8;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.oz-filter-range::-moz-range-thumb:hover {
    background: #d8d8d8;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(49, 118, 206, 0.4);
}

.oz-filter-range::-moz-range-thumb:active {
    transform: scale(1.15);
}

.oz-filter-range::-webkit-slider-runnable-track {
    height: 5px;
    background: #333;
    border-radius: 2px;
}

.oz-filter-range::-moz-range-track {
    height: 6px;
    background: #333;
    border-radius: 3px;
}

/* Progress fill for range slider (optional enhancement) */
.oz-filter-range::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #d8d8d8 0%, #d8d8d8 var(--range-progress, 50%), #333 var(--range-progress, 50%), #333 100%);
}

/* ==== LOADING STATE ==== */
.oz-beats-container.oz-filtering {
    opacity: 0.8;
    pointer-events: none;
    transition: opacity 0.2s ease;
    position: relative;
}

/* ==== SPINNER OVERLAY ==== */
.oz-filter-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    pointer-events: none;
    min-height: 200px;
}

.oz-filter-spinner-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==== SPINNER ==== */
.oz-filter-spinner {
    width: 35px;
    height: 35px;
    border: 7px solid #1a1a1a;
    border-top-color: #d8d8d8;
    border-radius: 50%;
    animation: oz-filter-spin 0.8s linear infinite;
}

@keyframes oz-filter-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==== RESPONSIVE ==== */

/* Desktop: Horizontal layout (default) */
.oz-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

/* Tablet: 2-row grid (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .oz-filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .oz-filter-field.oz-filter-search {
        grid-column: 1 / -1; /* Full width on first row */
    }

    .oz-filter-field.oz-filter-genre,
    .oz-filter-field.oz-filter-key {
        grid-column: span 1;
    }

    .oz-filter-field.oz-filter-bpm {
        grid-column: 1 / -1; /* Full width on second row */
    }
}

/* Phone: Stacked vertical layout (below 768px) */
@media (max-width: 767px) {
    .oz-filter-row {
        flex-direction: column;
        gap: 1rem;
    }

    .oz-filter-field {
        width: 100%;
        min-width: 100%;
        flex: 1;
    }

    .oz-filter-field.oz-filter-search {
        flex: 1;
        min-width: 100%;
    }

    .oz-filter-field.oz-filter-bpm {
        flex: 1;
        min-width: 100%;
    }

    /* Make BPM slider touch-friendly on mobile */
    .oz-filter-range {
        height: 8px;
    }

    .oz-filter-range::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .oz-filter-range::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

/* ==== NO BEATS MESSAGE ==== */
.oz-no-beats {
    padding: 2rem;
    text-align: center;
    color: #888;
    font-size: 16px;
}

