/* WindowsForum Analytics Dashboard Styles */

/* Dashboard Layout */
.wf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.wf-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.wf-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.wf-thread-input-container {
  display: flex;
  align-items: center;
}

.wf-thread-input-container input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.wf-thread-input-container button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 7px 10px;
}

.wf-search-icon {
  font-size: 1rem;
  line-height: 1;
}

.wf-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.wf-presets {
  display: flex;
  gap: 0.3rem;
  margin-left: 0.5rem;
}

.wf-toggle-buttons {
  display: flex;
  gap: 0;
}

.wf-toggle-buttons .button {
  border-radius: 0;
}

.wf-toggle-buttons .button:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.wf-toggle-buttons .button:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.wf-view-label {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--muted);
  margin-left: 0.5rem;
}

.wf-status {
  margin-top: 0.5rem;
  font-size: 90%;
  color: var(--muted);
}

/* KPI Cards */
.wf-kpi-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.wf-kpi-card {
  flex: 1 1 150px;
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wf-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.wf-kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.wf-kpi-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Section Headers */
.wf-section-title {
  margin: 1rem 0;
  display: flex;
  align-items: center;
}

/* Chart Containers */
.wf-chart-container {
  border: 1px solid var(--block-border);
  border-radius: 6px;
  background: var(--block-bg);
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wf-chart {
  width: 100%;
  height: 400px;
}

/* Thread Banner */
.wf-thread-banner {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  height: 150px;
  margin-bottom: 1.5rem;
  background-color: var(--block-bg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wf-thread-banner-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wf-thread-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.wf-thread-meta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#wfThreadBannerOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0063B1, #6B46C1);
  z-index: 1;
}

/* Thread Details */
.wf-thread-details {
  margin-top: 1rem;
}

.wf-thread-header {
  margin-bottom: 1rem;
}

.wf-thread-info {
  font-size: 0.9rem;
  line-height: 1.5;
}

.wf-thread-section-title {
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
  color: var(--text-color);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--block-border);
}

/* Thread Stats Cards */
.wf-thread-stats {
  margin-top: 1.5rem;
}

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

.wf-stat-card {
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wf-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.wf-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wf-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.wf-stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Thread Chart Area */
.wf-thread-chart .wf-chart {
  height: 250px;
}

/* Thread Period Stats */
.wf-thread-period-container {
  margin-top: 2rem;
}

.wf-thread-period-stats {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wf-thread-period-chart {
  min-height: 250px;
}

.wf-thread-period-info {
  border-left: 1px solid var(--block-border);
  padding-left: 1.5rem;
}

.wf-thread-period-info h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.wf-thread-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wf-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wf-metric-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.wf-metric-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Thread Timeline */
.wf-thread-timeline-container {
  margin-top: 2rem;
}

.wf-thread-timeline {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 1.25rem;
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wf-timeline-event {
  position: relative;
  padding-left: 1.5rem;
  flex: 1;
  min-width: 0;
}

.wf-timeline-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.wf-timeline-date {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  padding: 0.15rem 0.5rem;
  background-color: rgba(0,0,0,0.05);
  border-radius: 4px;
}

.wf-timeline-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.wf-timeline-description {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Navigation Controls */
.wf-navigation {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.wf-nav-buttons {
  display: flex;
  gap: 1rem;
}

/* Loading Indicator */
.wf-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
  color: var(--muted);
}

.wf-spinner {
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 3px solid var(--link);
  width: 25px;
  height: 25px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error Messages */
.wf-error-message {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 6px;
  padding: 12px 15px;
  margin: 10px 0;
  color: var(--error, #dc3545);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .wf-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .wf-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .wf-presets {
    margin-left: 0;
    margin-top: 0.5rem;
    flex-wrap: wrap;
  }
  
  .wf-thread-period-stats {
    grid-template-columns: 1fr;
  }
  
  .wf-thread-period-info {
    border-left: none;
    border-top: 1px solid var(--block-border);
    padding-left: 0;
    padding-top: 1.5rem;
  }
  
  .wf-thread-timeline {
    flex-direction: column;
    gap: 1.5rem;
  }
}
