/*
 * WDP home dashboard — widget grid / cards / tab chrome.
 * Loaded by index.html as: /css/components/dashboard.css
 */

.wdp-rep-header-icon {
  color: var(--accent-purple);
  margin-right: 0.35em;
}

.wdp-tab-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text-dark);
}

.wdp-tab-stack .wdp-tab-intro header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.wdp-tab-stack .wdp-tab-intro h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text-dark);
  font-weight: 700;
}

.wdp-tab-stack .wdp-tab-intro p {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.wdp-tab-actions .wdp-cta-overview {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent-orange);
  color: var(--text-inverse);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.widget-card {
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.widget-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-purple);
}

.widget-header {
  padding: 1rem 1.25rem;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.widget-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.35;
}

.widget-header i {
  color: var(--accent-purple);
  font-size: 1.25rem;
}

.widget-body {
  padding: 1rem 1.25rem;
  color: var(--text-dark);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

.widget-body p,
.widget-body li,
.widget-body strong {
  color: inherit;
}

.widget-body p {
  margin: 0 0 0.65rem;
}

.widget-body p:last-child {
  margin-bottom: 0;
}

.widget-footer {
  padding: 0.75rem 1.25rem;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  text-align: right;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.ask-ai-btn {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent-orange);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.ask-ai-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.widget-body .widget-expand {
  margin-top: 0.5rem;
}

.widget-body .widget-expand summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-purple);
  user-select: none;
}

.wdp-loading-inline {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.wdp-spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: wdp-spin 0.75s linear infinite;
}

@keyframes wdp-spin {
  to {
    transform: rotate(360deg);
  }
}

.wdp-dashboard-shell .btn-primary {
  background: var(--accent-orange) !important;
  color: var(--text-inverse) !important;
  border-color: var(--accent-orange) !important;
}

.wdp-dashboard-shell .btn-primary:hover {
  filter: brightness(1.06);
}

.wdp-dashboard-shell .search-type-btn.active {
  background: var(--accent-orange) !important;
  color: var(--text-inverse) !important;
}

.wdp-dashboard-shell .reps-tab .search-type-btn.active {
  background: var(--accent-orange) !important;
  color: var(--text-inverse) !important;
}

.wdp-dashboard-shell .privacy-disclosure a:any-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.wdp-dashboard-shell .privacy-disclosure a:any-link:hover {
  color: var(--accent-purple);
}

.wdp-dashboard-shell .rep-cards.dashboard-grid {
  padding: 0;
}

.wdp-dashboard-shell .rep-card.widget-card {
  margin-bottom: 0;
}

.rep-widget-title-row .rep-widget-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.widget-card .widget-body a.court-coverage-link:any-link,
a.court-coverage-link:any-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-underline-offset: 2px;
}

.widget-card .widget-body a.court-coverage-link:any-link:hover,
a.court-coverage-link:any-link:hover {
  color: var(--accent-purple);
  text-decoration-color: color-mix(in srgb, var(--accent-purple) 45%, transparent);
}

.widget-card .widget-body a:not([class]):any-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.widget-card .widget-body a:not([class]):any-link:hover {
  color: var(--accent-purple);
}

.wdp-dashboard-shell .dashboard-content {
  color: var(--text-dark);
}

.bill-filters.filters {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--surface-alt);
}

.bill-filters.filters.is-visible {
  display: flex;
}

.bill-filters-heading {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.bill-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.bill-filters-row select,
.bill-filters-row .btn-primary {
  flex: 1 1 140px;
  min-width: 120px;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-dark);
}

.bill-filters-row .bill-apply-filters-btn {
  border: none;
  background: var(--accent-orange);
  color: var(--text-inverse);
  font-weight: 600;
  cursor: pointer;
}
