/* Related Keyword Finder - Main Styles */
.related-keyword-finder {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Container */
.rkf-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Header */
.rkf-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.rkf-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rkf-title i {
    font-size: 24px;
}

.rkf-description {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
}

/* Search Box */
.rkf-search-box {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.rkf-input-group {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.rkf-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.rkf-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rkf-input::placeholder {
    color: #9ca3af;
}

.rkf-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.rkf-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.rkf-button:active {
    transform: translateY(0);
}

.rkf-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rkf-spinner {
    display: none;
}

.rkf-button.loading .rkf-button-text {
    opacity: 0;
}

.rkf-button.loading .rkf-spinner {
    display: block;
}

/* Results Section */
.rkf-results {
    padding: 30px;
    min-height: 200px;
}

.rkf-results-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.rkf-results-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.rkf-results-count {
    color: #6b7280;
    font-size: 14px;
}

.rkf-count {
    font-weight: 700;
    color: #667eea;
}

/* Keywords List */
.rkf-keywords-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.rkf-keyword-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rkf-keyword-item:hover {
    background: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rkf-keyword-icon {
    color: #667eea;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.rkf-keyword-text {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.rkf-keyword-volume {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* Empty and Error States */
.rkf-empty-state,
.rkf-error-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    display: none;
}

.rkf-empty-state i,
.rkf-error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.rkf-empty-state p,
.rkf-error-state p {
    margin: 0;
    font-size: 16px;
}

.rkf-error-state {
    color: #dc2626;
}

.rkf-error-state i {
    color: #dc2626;
}

/* Show appropriate states */
.rkf-results.empty .rkf-empty-state,
.rkf-results.error .rkf-error-state {
    display: block;
}

.rkf-results.empty .rkf-keywords-list,
.rkf-results.error .rkf-keywords-list,
.rkf-results.empty .rkf-results-header,
.rkf-results.error .rkf-results-header {
    display: none;
}

/* Loading State */
.rkf-results.loading .rkf-keywords-list {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .related-keyword-finder {
        padding: 15px;
    }
    
    .rkf-header {
        padding: 20px;
    }
    
    .rkf-title {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .rkf-search-box {
        padding: 20px;
    }
    
    .rkf-input-group {
        flex-direction: column;
    }
    
    .rkf-input,
    .rkf-button {
        width: 100%;
    }
    
    .rkf-results {
        padding: 20px;
    }
    
    .rkf-keywords-list {
        grid-template-columns: 1fr;
    }
    
    .rkf-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .rkf-title {
        font-size: 20px;
    }
    
    .rkf-description {
        font-size: 14px;
    }
    
    .rkf-input {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .rkf-button {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Animation for keyword items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rkf-keyword-item {
    animation: fadeInUp 0.3s ease forwards;
}

/* Focus styles for accessibility */
.rkf-input:focus-visible,
.rkf-button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .rkf-container {
        border: 2px solid currentColor;
    }
    
    .rkf-keyword-item {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rkf-keyword-item,
    .rkf-button {
        transition: none;
        animation: none;
    }
    
    .rkf-button:hover {
        transform: none;
    }
}