/* Lead Generator - Main Stylesheet */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
}

/* Header */
header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

nav a {
    color: var(--gray-700);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
}

/* Search Form Card */
.search-form-card {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 2rem auto;
}

.search-form-card h3 {
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.error-message {
    background-color: #fee2e2;
    color: var(--danger-color);
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Features Grid */
.features {
    margin: 4rem 0;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
}

/* How It Works */
.how-it-works {
    margin: 4rem 0;
}

.how-it-works h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h4 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Search Results Page */
.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.business-vertical-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Status Card */
.status-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-pending {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.status-processing {
    background-color: #dbeafe;
    color: var(--primary-color);
}

.status-completed {
    background-color: #d1fae5;
    color: var(--success-color);
}

.status-failed {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.current-step {
    color: var(--gray-600);
}

.progress-container {
    background-color: var(--gray-200);
    height: 1rem;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--gray-700);
}

/* Summary Stats */
.summary-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Error Card */
.error-card {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.error-card h3 {
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.error-card p {
    color: var(--gray-700);
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Company Cards */
.companies-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.company-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.company-header h4 {
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.company-domain {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.company-domain a {
    color: var(--primary-color);
    text-decoration: none;
}

.score-badge {
    background-color: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    color: var(--gray-700);
}

.company-description {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* Contacts Section */
.contacts-section {
    margin-top: 1.5rem;
}

.contacts-section h5 {
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
}

.contacts-table th {
    background-color: var(--gray-50);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.contacts-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.contacts-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.contacts-table a:hover {
    text-decoration: underline;
}

.seniority-badge {
    background-color: #dbeafe;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.source-badge {
    background-color: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.no-contacts {
    color: var(--gray-600);
    font-style: italic;
}

/* Advanced Settings / Enrichment Configuration */
.advanced-settings {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--gray-50);
}

.advanced-settings summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.5rem;
    list-style: none;
    user-select: none;
}

.advanced-settings summary::-webkit-details-marker {
    display: none;
}

.advanced-settings summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

.advanced-settings[open] summary::before {
    transform: rotate(90deg);
}

.advanced-settings summary:hover {
    color: var(--primary-dark);
}

.advanced-settings-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-group .help-text {
    margin-left: 1.75rem;
}

/* Range Input Styling */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-dark);
}

input[type="range"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Radio Button Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: white;
    position: relative;
}

.radio-option:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.radio-option input[type="radio"] {
    margin-right: 1rem;
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked ~ .radio-content {
    color: var(--gray-900);
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.radio-content strong {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.radio-description {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--gray-200);
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    text-align: center;
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .features-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        flex-direction: column;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
    }

    .company-header {
        flex-direction: column;
    }

    .contacts-table {
        font-size: 0.875rem;
    }
}
