/* Yayın Trend Analizi CSS - Tamamen Yeniden Yazıldı */

.trend-analysis-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Header Bölümü */
.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
}

.trend-title-section {
    flex-shrink: 0;
    min-width: 200px;
}

.trend-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trend-title i {
    color: #4299e1;
    font-size: 1.25rem;
}

.trend-subtitle {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

/* Filtreleme Kontrolleri */
.filtering-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

/* Tarih Seçimi */
.date-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex: 1;
}

.date-range-picker {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    min-width: 200px;
    align-items: center;
}

.date-input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
    min-width: 80px;
}

.date-input-group label i {
    color: #4299e1;
    font-size: 0.875rem;
}

.date-input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.date-input:hover {
    border-color: #a0aec0;
}

/* Periyot Seçimi */
.period-selector {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    min-width: 200px;
    flex-shrink: 0;
    align-items: center;
}

/* Analiz Butonu Bölümü */
.analyze-section {
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}


.period-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
    min-width: 60px;
}

.period-selector label i {
    color: #4299e1;
    font-size: 0.875rem;
}

.period-buttons {
    display: flex;
    gap: 0.25rem;
    background: #e2e8f0;
    padding: 0.25rem;
    border-radius: 6px;
}

.period-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #ffffff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.period-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

.period-btn.active {
    background: #4299e1;
    color: #ffffff;
}

/* Analiz Butonu */
.analyze-button {
    padding: 0.5rem 1rem;
    background: #4299e1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
}

.analyze-button:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.analyze-button:active {
    transform: translateY(0);
}

/* Chart Container */
.trend-chart-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    min-height: 350px;
}

#trend-chart {
    width: 100%;
    height: 350px;
}

/* Loading */
.trend-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 350px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #718096;
    font-size: 0.875rem;
}

/* Error */
.trend-error {
    text-align: center;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.trend-error h3 {
    color: #e53e3e;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.trend-error p {
    color: #718096;
    margin: 0 0 1rem 0;
}

.trend-error-btn {
    padding: 0.5rem 1rem;
    background: #4299e1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.trend-error-btn:hover {
    background: #3182ce;
}

/* Responsive */
@media (max-width: 1200px) {
    .trend-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .trend-title-section {
        min-width: auto;
    }
    
    .filtering-controls {
        width: 100%;
    }
    
    .date-range-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input-group {
        min-width: auto;
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-selector {
        min-width: auto;
        align-self: stretch;
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-buttons {
        justify-content: center;
    }
    
    .analyze-section {
        flex: none;
        justify-content: center;
    }
    
    .analyze-button {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .trend-analysis-container {
        padding: 1rem;
    }
    
    .trend-title {
        font-size: 1.25rem;
    }
    
    .date-selection,
    .analyze-section {
        padding: 0.75rem;
    }
    
    .period-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .period-btn {
        flex: 1;
        min-width: 60px;
    }
}
