.wf-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wf-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wf-search-input-wrap:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wf-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    background: transparent;
    color: #1e293b;
    min-width: 0;
}

.wf-search-input::placeholder {
    color: #94a3b8;
}

.wf-search-icon {
    color: #94a3b8;
    flex-shrink: 0;
}

.wf-search-spinner {
    flex-shrink: 0;
    color: #3b82f6;
}

.wf-search-spinner svg {
    animation: wf-spin 0.8s linear infinite;
}

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

.wf-search-clear {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-search-clear:hover {
    color: #ef4444;
    background: #fef2f2;
}

.wf-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
}

.wf-search-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.wf-search-results-list {
    padding: 8px;
}

.wf-search-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}

.wf-search-item:hover {
    background: #f1f5f9;
}

.wf-search-item + .wf-search-item {
    border-top: 1px solid #f1f5f9;
}

.wf-search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8fafc;
}

.wf-search-thumb-placeholder {
    background: #f1f5f9;
    border-radius: 8px;
}

.wf-search-item-body {
    flex: 1;
    min-width: 0;
}

.wf-search-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.wf-search-item-title mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.wf-search-item-content {
    font-size: 12px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.wf-search-item-content mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.wf-search-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.wf-search-item-type {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wf-search-price {
    font-weight: 700;
    color: #059669;
    margin-left: auto;
}

/* Dark mode support for admin */
body.wp-admin .wf-search-input-wrap {
    background: #1e293b;
    border-color: #334155;
}

body.wp-admin .wf-search-input {
    color: #f1f5f9;
}

body.wp-admin .wf-search-input::placeholder {
    color: #64748b;
}

body.wp-admin .wf-search-results {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.wp-admin .wf-search-item-title {
    color: #f1f5f9;
}

body.wp-admin .wf-search-item-content {
    color: #94a3b8;
}

body.wp-admin .wf-search-item:hover {
    background: #334155;
}
