/**
 * SmartSEO AI Product Finder Styles
 */

.smartseo-ai-finder {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.smartseo-ai-finder .finder-header {
    text-align: center;
    margin-bottom: 25px;
}

.smartseo-ai-finder .finder-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.smartseo-ai-finder .finder-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.smartseo-ai-finder .finder-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.smartseo-ai-finder .finder-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.smartseo-ai-finder .finder-input:focus {
    border-color: var(--finder-primary-color, #375542);
    box-shadow: 0 0 0 3px rgba(55, 85, 66, 0.1);
}

.smartseo-ai-finder .finder-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.smartseo-ai-finder .finder-button {
    padding: 15px 30px;
    background-color: var(--finder-primary-color, #375542);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.smartseo-ai-finder .finder-button:hover:not(:disabled) {
    background-color: #2a4234;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(55, 85, 66, 0.3);
}

.smartseo-ai-finder .finder-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.smartseo-ai-finder .button-loading {
    display: none;
}

.smartseo-ai-finder .button-loading .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.smartseo-ai-finder .finder-error {
    display: none;
    padding: 15px 20px;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    color: #c53030;
    margin-bottom: 20px;
}

.smartseo-ai-finder .finder-results {
    display: none;
    background: var(--finder-bg-color, #f8f9fa);
    border-radius: var(--finder-border-radius, 12px);
    padding: 25px;
}

.smartseo-ai-finder .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.smartseo-ai-finder .results-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
}

.smartseo-ai-finder .results-clear {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    transition: color 0.2s;
}

.smartseo-ai-finder .results-clear:hover {
    color: #c53030;
}

.smartseo-ai-finder .ai-summary {
    background: linear-gradient(135deg, #e8f4ff 0%, #f0f7ff 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #1a365d;
    border-left: 4px solid #3182ce;
}

.smartseo-ai-finder .result-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.smartseo-ai-finder .result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.smartseo-ai-finder .result-item:last-child {
    margin-bottom: 0;
}

.smartseo-ai-finder .result-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.smartseo-ai-finder .result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.smartseo-ai-finder .result-title {
    margin: 0 0 8px;
    font-size: 18px;
}

.smartseo-ai-finder .result-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.smartseo-ai-finder .result-title a:hover {
    color: var(--finder-primary-color, #375542);
}

.smartseo-ai-finder .result-reason {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 auto;
}

.smartseo-ai-finder .result-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.smartseo-ai-finder .result-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--finder-primary-color, #375542);
}

.smartseo-ai-finder .result-rating {
    color: #f59e0b;
    font-size: 14px;
    font-weight: 500;
}

.smartseo-ai-finder .result-cta {
    margin-left: auto;
    padding: 8px 20px;
    background-color: var(--finder-primary-color, #375542);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.smartseo-ai-finder .result-cta:hover {
    background-color: #2a4234;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .smartseo-ai-finder .finder-form {
        flex-direction: column;
    }
    
    .smartseo-ai-finder .finder-button {
        width: 100%;
    }
    
    .smartseo-ai-finder .result-item {
        flex-direction: column;
    }
    
    .smartseo-ai-finder .result-image {
        width: 100%;
        height: 200px;
    }
    
    .smartseo-ai-finder .result-meta {
        flex-wrap: wrap;
    }
    
    .smartseo-ai-finder .result-cta {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 无图片时的占位符 */
.smartseo-ai-finder .result-image-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smartseo-ai-finder .result-image-placeholder svg {
    width: 40px;
    height: 40px;
    color: #bbb;
}

/* 加载骨架屏 */
.smartseo-ai-finder .skeleton-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
}

.smartseo-ai-finder .skeleton-image {
    width: 100px;
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.smartseo-ai-finder .skeleton-content {
    flex: 1;
}

.smartseo-ai-finder .skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.smartseo-ai-finder .skeleton-line.short {
    width: 60%;
}

.smartseo-ai-finder .skeleton-line.medium {
    width: 80%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
