/**
 * Loop Grid Search Filter - Base Styles
 */

.lgsf-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.lgsf-search-inner {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.lgsf-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 24px 16px 52px;
    font-size: 16px;
    color: #333;
    background-color: #ffffff;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.lgsf-search-input::placeholder {
    color: #9a9a9a;
}

.lgsf-search-input:focus {
    box-shadow: 0 0 0 3px rgba(76, 186, 176, 0.4);
}

/* Remove default search input styling */
.lgsf-search-input::-webkit-search-cancel-button,
.lgsf-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* Search icon */
.lgsf-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgsf-search-icon svg {
    width: 20px;
    height: 20px;
    stroke: #999;
}

/* Clear button */
.lgsf-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lgsf-search-clear:hover {
    background: rgba(0, 0, 0, 0.16);
}

/* Loader */
.lgsf-search-loader {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    color: #999;
    pointer-events: none;
}

.lgsf-search-loader svg {
    animation: lgsf-spin 0.8s linear infinite;
}

@keyframes lgsf-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.lgsf-search-wrapper.lgsf-loading .lgsf-search-loader {
    display: block;
}

.lgsf-search-wrapper.lgsf-loading .lgsf-search-clear {
    display: none !important;
}

/* Search button */
.lgsf-search-button {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #4cbab0;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.lgsf-search-button:hover {
    background-color: #3da89e;
    transform: translateY(-1px);
}

/* Loop Grid fade during search */
.lgsf-fading {
    opacity: 0.4;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* No results message */
.lgsf-no-results {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

/* Mobile */
@media (max-width: 600px) {
    .lgsf-search-wrapper {
        flex-direction: column;
    }
    
    .lgsf-search-button {
        width: 100%;
    }
    
    .lgsf-search-input {
        padding: 14px 20px 14px 48px;
        font-size: 14px;
    }
    
    .lgsf-search-icon {
        left: 16px;
    }
    
    .lgsf-search-icon svg {
        width: 18px;
        height: 18px;
    }
}
