/* BSAF Cross-Reference Tool - Frontend Styles */
.bsaf-xref-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bsaf-xref-hero {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
}

.bsaf-xref-hero h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.bsaf-xref-subtitle {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 10px;
}

.bsaf-xref-brands {
    font-size: 0.9em;
    color: #777;
}

/* Search Section */
.bsaf-xref-search-section {
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.bsaf-xref-input-wrap {
    display: flex;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

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

.bsaf-xref-input-wrap input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bsaf-xref-input-wrap button {
    padding: 14px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s;
}

.bsaf-xref-input-wrap button:hover {
    background: #1d4ed8;
}

.bsaf-xref-hints {
    text-align: center;
    margin-top: 12px;
    font-size: 0.85em;
    color: #888;
}

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

.bsaf-xref-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: bsaf-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

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

/* Results */
.bsaf-xref-results {
    margin-top: 20px;
}

.bsaf-xref-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: box-shadow 0.2s;
}

.bsaf-xref-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bsaf-xref-result-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

.bsaf-xref-result-info {
    flex: 1;
}

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

.bsaf-xref-result-info h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.bsaf-xref-result-info h3 a:hover {
    color: #2563eb;
}

.bsaf-xref-result-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.bsaf-xref-result-meta span {
    display: inline-block;
    margin-right: 15px;
}

.bsaf-xref-result-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #16a34a;
}

.bsaf-xref-result-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.bsaf-xref-badge-match {
    background: #dcfce7;
    color: #166534;
}

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

.bsaf-xref-result-action {
    flex-shrink: 0;
}

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

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

/* No Results */
.bsaf-xref-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 12px;
    margin-top: 20px;
}

.bsaf-xref-no-results h3 {
    margin: 15px 0 10px;
    color: #854d0e;
}

.bsaf-xref-contact-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #fde047;
}

.bsaf-xref-contact-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 5px;
    transition: background 0.2s;
}

.bsaf-xref-contact-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

.bsaf-xref-phone-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    color: #2563eb;
    border: 2px solid #2563eb;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 5px;
    transition: all 0.2s;
}

.bsaf-xref-phone-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Info Section */
.bsaf-xref-info-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.bsaf-xref-info-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.bsaf-xref-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.bsaf-xref-step {
    text-align: center;
    padding: 20px;
}

.bsaf-xref-step-num {
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    margin: 0 auto 15px;
}

.bsaf-xref-step h3 {
    margin-bottom: 8px;
}

.bsaf-xref-step p {
    font-size: 0.9em;
    color: #666;
}

/* Manufacturers Grid */
.bsaf-xref-manufacturers {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.bsaf-xref-manufacturers h2 {
    text-align: center;
    margin-bottom: 25px;
}

.bsaf-xref-mfg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bsaf-xref-mfg-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
}

/* Widget */
.bsaf-xref-widget {
    margin: 15px 0;
}

.bsaf-xref-widget-form {
    display: flex;
    gap: 8px;
}

.bsaf-xref-widget-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
}

.bsaf-xref-widget-btn {
    padding: 10px 18px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .bsaf-xref-input-wrap {
        flex-direction: column;
    }
    .bsaf-xref-steps {
        grid-template-columns: 1fr;
    }
    .bsaf-xref-mfg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bsaf-xref-result-card {
        flex-direction: column;
        text-align: center;
    }
}
