/* Smart Search Widget - Frontend Styles */

.ssw-widget-wrap {
    position: relative;
    width: 100%;
}

/* Search Box */
.ssw-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.ssw-search-box:focus-within {
    border-color: #6b7cf6;
    box-shadow: 0 0 0 3px rgba(107, 124, 246, 0.1);
}

.ssw-input {
    flex: 1;
    width: 100%;
    padding: 12px 8px;
    font-size: 15px;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

/* Spinner */
.ssw-spinner {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: #6b7cf6;
    border-radius: 50%;
    animation: ssw-spin 0.7s linear infinite;
}

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

/* Results Grid */
.ssw-results {
    width: 100%;
    transition: opacity 0.2s ease;
}

.ssw-results.ssw-loading {
    opacity: 0.5;
    pointer-events: none;
}

.ssw-results-grid {
    display: grid;
    grid-template-columns: repeat(var(--ssw-columns, 3), 1fr);
    gap: var(--ssw-gap, 20px);
}

.ssw-result-item {
    width: 100%;
}

/* Messages */
.ssw-no-results,
.ssw-error {
    font-size: 14px;
    color: #888;
    padding: 16px 0;
    margin: 0;
}

.ssw-error {
    color: #e05c5c;
}

/* Responsive */
@media (max-width: 768px) {
    .ssw-results-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Clickable result items ── */
.jet-listing-grid__item {
    position: relative;
}

.ssw-item-link {
    display: block;
    text-decoration: none;
}

.ssw-item-link:hover {
    text-decoration: none;
}

/* ── Icon ── */
.ssw-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #9ca3af;
}

.ssw-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ssw-icon img {
    display: block;
    object-fit: contain;
}
/* ── See All Button ── */
.ssw-see-all-wrap {
    text-align: center;
    margin-top: 16px;
}

.ssw-see-all-btn {
    display: inline-block;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7cf6;
    background: transparent;
    border: 1px solid #6b7cf6;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ssw-see-all-btn:hover {
    background: #6b7cf6;
    color: #fff;
}

/* ── Clear Button ── */
.ssw-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    margin-left: 6px;
    background: none;
    border: none;          /* reset browser default button border */
    outline: none;         /* reset focus outline */
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ssw-clear-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.ssw-clear-btn:hover {
    color: #374151;
}