/* SEO Forecaster Styles - Based on Cannibalization/Query Prioritization */

.seo-forecaster-container,
.forecaster-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    background: #fff;
}

.seo-forecaster-error {
    padding: 15px;
    background: #FC554F;
    color: white;
    border-radius: 8px;
    margin: 20px 0;
}

/* Input Section */
.forecaster-input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.forecaster-input-section h2 {
    margin: 0 0 24px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

/* Mode Toggle */
.input-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #EBEBEB;
    background: transparent;
}

.mode-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    bottom: -2px;
}

.mode-btn:hover {
    color: #000000;
    background: #F9F9F9;
}

.mode-btn.active {
    color: #7B7DFE;
    border-bottom-color: #7B7DFE;
    background: #fff;
    font-weight: 600;
}

.input-mode-content {
    margin-top: 24px;
}

/* Control Sections */
.control-section {
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-control textarea {
    min-height: 120px;
    resize: vertical;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.csv-lists-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}

.csv-list-item {
    position: relative;
}

.csv-list-item label,
.csv-list-item .forecaster_csv_label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.csv-list-item .forecaster_csv_label {
    max-width: 280px;
}

.csv-list-item .btn-remove-csv-list {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc2626;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    display: none;
}

.csv-list-item:not(:first-child) .btn-remove-csv-list {
    display: block;
}

.forecaster-csv-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.scope-filter {
    margin-top: 10px;
}

.advanced-options {
    margin-top: 10px;
}

/* GSC Not Connected */
.gsc-not-connected {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    text-align: center;
}

.gsc-not-connected p {
    margin: 0 0 12px 0;
    color: #856404;
    font-size: 14px;
}

.btn-connect-gsc {
    display: inline-block;
    padding: 10px 20px;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-connect-gsc:hover {
    background: #333;
}

/* Control Actions */
.control-actions,
.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.btn-analyze {
    padding: 14px 32px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-analyze:hover:not(:disabled) {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-analyze:disabled {
    cursor: not-allowed;
    background: #666;
    transform: none;
}

.btn-analyze i {
    font-size: 16px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary i {
    font-size: 14px;
}

/* Messages */
.forecaster-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.forecaster-message.success {
    background: #24C789;
    color: white;
}

.forecaster-message.error {
    background: #FC554F;
    color: white;
}

.forecaster-message.info {
    background: #F6A228;
    color: white;
}

/* Results Section */
.forecaster-results {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Chart */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

/* Range Slider */
.range-slider-container {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.range-slider-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

#forecaster_range_slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

#forecaster_range_slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

#forecaster_range_slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
}

#forecaster_range_slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

/* Legend */
.legend {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* Checkbox */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .seo-forecaster-container,
    .forecaster-container {
        padding: 10px;
    }

    .forecaster-input-section,
    .forecaster-results {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
        flex-direction: column;
    }

    .results-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .chart-container {
        height: 300px;
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Progress Bar - Same style as cannibalization */
.cannib-progress-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.cannib-progress-header {
    margin-bottom: 24px;
    text-align: center;
}

.cannib-progress-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.cannib-progress-bar-wrapper {
    margin-top: 24px;
}

.cannib-progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.cannib-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cannib-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.cannib-progress-text {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    margin-top: 12px;
}
