/* BSAF Replacement Finder - Frontend Styles */
.bsaf-rf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.bsaf-rf-header {
    text-align: center;
    margin-bottom: 30px;
}

.bsaf-rf-header h2 {
    font-size: 2em;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.bsaf-rf-header p {
    color: #555;
    font-size: 1.05em;
    max-width: 650px;
    margin: 0 auto;
}

.bsaf-rf-search-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.bsaf-rf-search-wrapper {
    display: flex;
    gap: 10px;
}

.bsaf-rf-search-wrapper input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.bsaf-rf-search-wrapper input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bsaf-rf-search-wrapper button {
    padding: 14px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.bsaf-rf-search-wrapper button:hover {
    background: #1d4ed8;
}

.bsaf-rf-search-wrapper button:disabled {
    background: #94a3b8;
}

.bsaf-rf-search-hint {
    font-size: 0.85em;
    color: #888;
    margin-top: 10px;
    text-align: center;
}

/* Results */
.bsaf-rf-results {
    margin-bottom: 30px;
}

.bsaf-rf-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.bsaf-rf-result-info h4 {
    margin: 0 0 5px;
    font-size: 1.1em;
}

.bsaf-rf-result-arrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.bsaf-rf-old-part {
    padding: 4px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    font-family: monospace;
    color: #991b1b;
    text-decoration: line-through;
}

.bsaf-rf-arrow-icon {
    color: #16a34a;
    font-size: 1.3em;
}

.bsaf-rf-new-part {
    padding: 4px 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    font-family: monospace;
    color: #166534;
    font-weight: 600;
}

.bsaf-rf-result-meta {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
}

.bsaf-rf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.bsaf-rf-badge-direct {
    background: #dcfce7;
    color: #166534;
}

.bsaf-rf-badge-equivalent {
    background: #dbeafe;
    color: #1e40af;
}

.bsaf-rf-badge-possible {
    background: #fef9c3;
    color: #854d0e;
}

.bsaf-rf-badge-upgrade {
    background: #f3e8ff;
    color: #6b21a8;
}

.bsaf-rf-result-action {
    text-align: center;
}

.bsaf-rf-buy-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #16a34a;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.2s;
}

.bsaf-rf-buy-btn:hover {
    background: #15803d;
    color: #fff;
}

.bsaf-rf-result-price {
    margin-top: 8px;
    font-size: 1.1em;
    font-weight: 700;
    color: #16a34a;
}

/* No Match */
.bsaf-rf-no-match {
    text-align: center;
    padding: 40px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    margin-bottom: 30px;
}

.bsaf-rf-no-match-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.bsaf-rf-no-match h3 {
    color: #92400e;
}

.bsaf-rf-no-match-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.bsaf-rf-cta-btn {
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.bsaf-rf-cta-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

.bsaf-rf-cta-secondary {
    background: #fff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.bsaf-rf-cta-secondary:hover {
    background: #eff6ff;
    color: #2563eb;
}

.bsaf-rf-no-match-note {
    font-size: 0.9em;
    color: #666;
}

/* Info Section */
.bsaf-rf-info-section {
    margin-top: 40px;
}

.bsaf-rf-info-section h3 {
    text-align: center;
    margin-bottom: 20px;
}

.bsaf-rf-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bsaf-rf-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.bsaf-rf-info-card h4 {
    margin: 0 0 8px;
    color: #1a1a1a;
}

.bsaf-rf-info-card p {
    font-size: 0.9em;
    color: #555;
    margin: 0;
}

/* Loading */
.bsaf-rf-loading {
    text-align: center;
    padding: 30px;
}

.bsaf-rf-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: bsaf-rf-spin 0.7s linear infinite;
}

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

/* Mobile */
@media (max-width: 768px) {
    .bsaf-rf-search-wrapper {
        flex-direction: column;
    }
    .bsaf-rf-result-card {
        grid-template-columns: 1fr;
    }
    .bsaf-rf-info-grid {
        grid-template-columns: 1fr;
    }
    .bsaf-rf-no-match-actions {
        flex-direction: column;
        align-items: center;
    }
}
