/* Lead Scraper Pro - Frontend Styles */

.lsp-dashboard-container {
    margin: 0 auto;
    padding: 0px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lsp-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.lsp-dashboard-header h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.lsp-dashboard-header p {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin: 0;
}

/* Form Styles */
.lsp-scraping-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0px;
}

.lsp-form-group {
    margin-bottom: 25px;
}

.lsp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.lsp-required {
    color: #e74c3c;
    margin-left: 3px;
}

.lsp-input-container {
    position: relative;
}

.lsp-city-input, .lsp-radius-select, .lsp-categories-select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e1e8ed;
    border-radius: 6px !important;
    font-size: 16px !important;
    transition: border-color 0.3s ease;
}

select#lsp-categories-select {
    height: 250px;
}

.lsp-city-input:focus, .lsp-radius-select:focus, .lsp-categories-select:focus {
    outline: none;
    border-color: #3498db;
}

.lsp-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.lsp-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.lsp-suggestion-item:hover {
    background: #f8f9fa;
}

.lsp-suggestion-item:last-child {
    border-bottom: none;
}

.lsp-field-help {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

/* Popular Categories */
.lsp-popular-categories {
    margin-bottom: 20px;
}

.lsp-popular-categories h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.lsp-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lsp-category-chip {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lsp-category-chip:hover {
    background: #3498db;
    color: #fff;
}

.lsp-category-chip.selected {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

/* Focus Options */
.lsp-focus-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lsp-focus-btn {
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    color: #2c3e50;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lsp-focus-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

.lsp-focus-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

/* Advanced Options */
.lsp-advanced-options {
    margin-top: 20px;
}

.lsp-toggle-advanced {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lsp-toggle-icon {
    transition: transform 0.3s ease;
}

.lsp-toggle-advanced.active .lsp-toggle-icon {
    transform: rotate(180deg);
}

.lsp-advanced-content {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
}

.lsp-advanced-content.show {
    display: block;
}

.lsp-number-input {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
}

/* Buttons */
.lsp-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

button#lsp-start-scraping {
    width: 100%!important;
}

span.lsp-btn-loader {
    justify-content: center;
}

.lsp-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.lsp-btn-primary {
    background: #3498db;
}

.lsp-btn-secondary {
    background: #95a5a6;
}

.lsp-btn-success {
    background: #27ae60;
}

.lsp-btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.lsp-form-actions {
    text-align: center;
    margin-top: 30px;
}

.lsp-btn-loader {
    display: none;
    align-items: center;
    gap: 8px;
}

.lsp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Section */
.lsp-progress-section {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    margin-top: 30px;
}

.lsp-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lsp-progress-stats {
    display: flex;
    gap: 20px;
}

.lsp-stat {
    color: #7f8c8d;
    font-size: 14px;
}

.lsp-stat strong {
    color: #2c3e50;
}

.lsp-progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.lsp-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    width: 0%;
    transition: width 0.3s ease;
}

.lsp-progress-log {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
}

.lsp-progress-log .log-entry {
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #e1e8ed;
}

.lsp-progress-log .log-entry:last-child {
    border-bottom: none;
}

.lsp-progress-log .log-timestamp {
    color: #7f8c8d;
    font-size: 12px;
}

.lsp-progress-log .log-message {
    color: #2c3e50;
    margin-left: 10px;
}

/* Results Section */
.lsp-results-section {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lsp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lsp-results-actions {
    display: flex;
    gap: 10px;
}

.lsp-results-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.lsp-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.lsp-stat-item {
    text-align: center;
}

.lsp-stat-label {
    display: block;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.lsp-stat-value {
    display: block;
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
}

.lsp-results-table-container {
    overflow-x: auto;
}

.lsp-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.lsp-results-table th,
.lsp-results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.lsp-results-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.lsp-results-table tr:hover {
    background: #f8f9fa;
}

.lsp-rating {
    color: #f39c12;
    font-weight: bold;
}

.lsp-action-buttons {
    display: flex;
    gap: 5px;
}

.lsp-no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lsp-dashboard-container {
        padding: 15px;
    }
    
    .lsp-dashboard-header h2 {
        font-size: 2rem;
    }
    
    .lsp-scraping-form {
        padding: 20px;
    }
    
    .lsp-category-chips {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lsp-category-chip {
        text-align: center;
    }
    
    .lsp-focus-options {
        flex-direction: column;
    }
    
    .lsp-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lsp-progress-stats {
        flex-wrap: wrap;
    }
    
    .lsp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lsp-results-actions {
        width: 100%;
    }
    
    .lsp-btn {
        width: 100%;
        text-align: center;
    }
    
    .lsp-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .lsp-results-table {
        font-size: 14px;
    }
    
    .lsp-results-table th,
    .lsp-results-table td {
        padding: 8px;
    }
    
    .lsp-action-buttons {
        flex-direction: column;
    }
}

/* Select2 Customization */
.select2-container--default .select2-selection--multiple {
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    padding: 8px;
}

.select2-container--default .select2-selection--multiple:focus {
    border-color: #3498db;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #f8f9fa;
}

/* Animation Classes */
.lsp-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lsp-slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Status Indicators */
.lsp-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.lsp-status-new {
    background: #3498db;
    color: #fff;
}

.lsp-status-processing {
    background: #f39c12;
    color: #fff;
}

.lsp-status-completed {
    background: #27ae60;
    color: #fff;
}

.lsp-status-failed {
    background: #e74c3c;
    color: #fff;
}

/* Utility Classes */
.lsp-text-center {
    text-align: center;
}

.lsp-text-right {
    text-align: right;
}

.lsp-mb-0 {
    margin-bottom: 0;
}

.lsp-mb-10 {
    margin-bottom: 10px;
}

.lsp-mb-20 {
    margin-bottom: 20px;
}

.lsp-mt-0 {
    margin-top: 0;
}

.lsp-mt-10 {
    margin-top: 10px;
}

.lsp-mt-20 {
    margin-top: 20px;
}

.lsp-hidden {
    display: none;
}

.lsp-visible {
    display: block;
}

.lsp-flex {
    display: flex;
}

.lsp-flex-wrap {
    flex-wrap: wrap;
}

.lsp-gap-10 {
    gap: 10px;
}

.lsp-gap-20 {
    gap: 20px;
}

.lsp-w-full {
    width: 100%;
}

.lsp-text-sm {
    font-size: 14px;
}

.lsp-text-lg {
    font-size: 18px;
}

.lsp-font-bold {
    font-weight: bold;
}

.lsp-text-primary {
    color: #3498db;
}

.lsp-text-success {
    color: #27ae60;
}

.lsp-text-warning {
    color: #f39c12;
}

.lsp-text-danger {
    color: #e74c3c;
}

.lsp-text-muted {
    color: #7f8c8d;
}

/* Modal Styles */
.lsp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.lsp-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lsp-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.lsp-modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.lsp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lsp-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.lsp-modal-body {
    padding: 30px;
}

.lsp-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.lsp-lead-details {
    display: grid;
    gap: 25px;
}

.lsp-detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.lsp-detail-section h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.lsp-detail-section p {
    margin: 8px 0;
    line-height: 1.5;
}

.lsp-detail-section strong {
    color: #2c3e50;
    font-weight: 600;
}

.lsp-json-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.lsp-json-item {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.lsp-json-item:last-child {
    margin-bottom: 0;
}

.lsp-json-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.lsp-json-value {
    color: #6c757d;
    word-break: break-word;
}

.lsp-json-object {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.lsp-json-array {
    background: #e8f5e8;
    border-left-color: #4caf50;
}

.lsp-contact-item {
    display: inline-block;
    background: #e7f3ff;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .lsp-modal {
        padding: 10px;
    }
    
    .lsp-modal-content {
        max-height: 95vh;
    }
    
    .lsp-modal-header,
    .lsp-modal-body,
    .lsp-modal-footer {
        padding: 15px 20px;
    }
    
    .lsp-detail-section {
        padding: 15px;
    }
}

/* Notification Styles */
.lsp-notification {
    position: fixed;
    top: 32px; /* Above WordPress admin bar */
    right: 20px;
    z-index: 100000; /* Very high z-index to appear above everything */
    padding: 15px 20px;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    max-width: 400px;
    word-wrap: break-word;
}

.lsp-notification.show {
    transform: translateX(0);
}

.lsp-notification-success {
    background: #10b981;
    color: white;
    border-left: 4px solid #059669;
}

.lsp-notification-error {
    background: #ef4444;
    color: white;
    border-left: 4px solid #dc2626;
}

.lsp-notification-info {
    background: #3b82f6;
    color: white;
    border-left: 4px solid #2563eb;
}

.lsp-notification-warning {
    background: #f59e0b;
    color: white;
    border-left: 4px solid #d97706;
}

.lsp-notification:hover {
    opacity: 0.9;
    transform: translateX(-5px);
}

/* For WordPress frontend (no admin bar) */
.no-admin-bar .lsp-notification {
    top: 20px;
}

/* Responsive notifications */
@media (max-width: 768px) {
    .lsp-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 46px; /* Mobile admin bar height */
    }
    
    .no-admin-bar .lsp-notification {
        top: 10px;
    }
} 