/**
 * Public CSS for WooCommerce Smart Rank AJAX Search
 * Clean, lightweight, responsive autocomplete dropdown
 */
.wc-smart-rank-search-wrap {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit;
}

.wc-smart-rank-search-form {
    position: relative;
    width: 100%;
}

.wc-smart-rank-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 9999px;
    padding: 4px 6px 4px 16px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.wc-smart-rank-input-wrapper:focus-within {
    border-color: #3A5A40;
    box-shadow: 0 0 0 4px rgba(58, 90, 64, 0.12), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wc-smart-rank-icon-magnifier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    margin-right: 10px;
    flex-shrink: 0;
}

.wc-smart-rank-search-input {
    width: 100%;
    height: 42px;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    color: #1e293b;
    padding: 0;
    box-shadow: none !important;
}

.wc-smart-rank-search-input::placeholder {
    color: #94a3b8;
}

/* Clear button */
.wc-smart-rank-clear-btn {
    background: #EEF3EF;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    margin: 0 8px;
    transition: background 0.15s ease;
    padding: 0;
}

.wc-smart-rank-clear-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Loader */
.wc-smart-rank-loader {
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
}

.wc-smart-rank-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #3A5A40;
    border-radius: 50%;
    animation: wc-sr-spin 0.6s linear infinite;
}

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

/* Submit button */
.wc-smart-rank-submit-btn {
    background: #3A5A40;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.wc-smart-rank-submit-btn:hover {
    background: #2F4A34;
}

/* Autocomplete Dropdown */
.wc-smart-rank-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    z-index: 999999;
    overflow: hidden;
    max-height: 480px;
    overflow-y: auto;
}

/* Suggestions header pills */
.wc-sr-suggestions-bar {
    padding: 12px 16px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #EEF3EF;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wc-sr-suggestions-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-right: 4px;
}

.wc-sr-suggestion-pill {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 12px;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.wc-sr-suggestion-pill:hover {
    border-color: #3A5A40;
    color: #3A5A40;
    background: #EEF3EF;
}

/* Product list items */
.wc-sr-product-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    cursor: pointer;
}

.wc-sr-product-item:hover,
.wc-sr-product-item.is-selected {
    background: #EEF3EF;
}

.wc-sr-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.wc-sr-product-info {
    flex: 1;
    min-width: 0;
}

.wc-sr-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-sr-product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.wc-sr-category-tag {
    color: #475569;
    background: #EEF3EF;
    padding: 1px 6px;
    border-radius: 4px;
}

.wc-sr-product-sku {
    color: #94a3b8;
}

.wc-sr-product-price-box {
    text-align: right;
    margin-left: 12px;
    flex-shrink: 0;
}

.wc-sr-price {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.wc-sr-price del {
    color: #94a3b8;
    font-weight: 400;
    margin-right: 4px;
    font-size: 12px;
}

.wc-sr-price ins {
    text-decoration: none;
    color: #3A5A40;
}

.wc-smart-rank-highlight {
    background: #DDE6DE;
    color: #3A5A40;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* See all footer */
.wc-sr-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.wc-sr-see-all-link {
    font-size: 13px;
    font-weight: 600;
    color: #3A5A40;
    text-decoration: none;
    display: inline-block;
}

.wc-sr-see-all-link:hover {
    text-decoration: underline;
}

.wc-sr-no-results {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Forced position indicator */
.wc-sr-forced-indicator {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #DDE6DE;
    color: #3A5A40;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}
