/**
 * Agency Ranking Page Styles
 * Premium "Understanding Agency Tags" Reference Card
 * Generated: 2025-12-08
 */

/* ================================================
   TAG KEY CONTAINER - Premium Reference Card
   Glassmorphism dark card design
   ================================================ */

.tag-key-container {
  background: #000;
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tag-key-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tag-key-title i {
  color: #ffd700;
}

.tag-key-subtitle {
  font-size: 0.95rem;
  color: #aaa;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* ================================================
   TAG KEY GRID - Responsive Layout
   1 col mobile, 2 cols tablet, 3 cols desktop
   ================================================ */

.tag-key-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tag-key-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .tag-key-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* ================================================
   TAG KEY ITEM - Badge + Description Layout
   ================================================ */

.tag-key-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.tag-key-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ================================================
   AGENCY BADGES - Pill/Chip Styling
   ================================================ */

.agency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: fit-content;
}

.agency-badge i {
  font-size: 0.75rem;
}

/* Verified - Gold/Blue */
.agency-badge--verified {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Top Rated - Platinum/Silver */
.agency-badge--top-rated {
  background: linear-gradient(135deg, #e8e8e8 0%, #b8b8b8 100%);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(200, 200, 200, 0.3);
}

/* Popular - Fire Orange/Red */
.agency-badge--popular {
  background: linear-gradient(135deg, #ff6b35 0%, #f7421e 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(247, 66, 30, 0.3);
}

/* Highly Responsive - Green/Teal */
.agency-badge--responsive {
  background: linear-gradient(135deg, #00c896 0%, #00a67d 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 200, 150, 0.3);
}

/* Warning/Limited Data - Yellow/Amber */
.agency-badge--warning {
  background: linear-gradient(135deg, #ffcc00 0%, #e6a800 100%);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.3);
}

/* Licence Processing/Pending - Blue/Cyan */
.agency-badge--pending {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* Sponsor/Exception - Purple (No Local Agency Partners) */
.agency-badge--sponsor {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

/* ================================================
   TAG KEY DESCRIPTION - Muted Text
   ================================================ */

.tag-key-description {
  font-size: 0.875rem;
  color: #ccc;
  line-height: 1.4;
}

/* ================================================
   ACCESSIBILITY - High Contrast Mode Support
   ================================================ */

@media (prefers-contrast: high) {
  .tag-key-container {
    border: 2px solid #ffd700;
  }

  .agency-badge {
    border: 1px solid currentColor;
  }

  .tag-key-description {
    color: #fff;
  }
}

/* ================================================
   REDUCED MOTION - Respect User Preferences
   ================================================ */

@media (prefers-reduced-motion: reduce) {
  .tag-key-item {
    transition: none;
  }
}

/* ================================================
   AGENCY CARDS - Premium Card Design
   Dark mode cards with hover effects
   ================================================ */

/* Card Container - Single Column Layout */
#agency-ranking-container {
  display: flex;
  flex-direction: column;
  gap: -0.5rem;
  padding: 1rem 0;
  max-width: 900px;
  margin: 0 auto;
}

/* Agency Card */
.agency-card {
  background: #000;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #eee;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.agency-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.4);
}

/* Card Header */
.agency-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agency-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.agency-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Overall Rating Section */
.agency-overall-rating {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.agency-overall-score {
  text-align: center;
}

.agency-overall-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.agency-overall-number.rating-excellent {
  color: #28a745;
}

.agency-overall-number.rating-good {
  color: #7cb342;
}

.agency-overall-number.rating-average {
  color: #ffc107;
}

.agency-overall-number.rating-poor {
  color: #ff9800;
}

.agency-overall-number.rating-bad {
  color: #f44336;
}

.agency-overall-outof {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
}

.agency-stars {
  margin-top: 0.5rem;
  color: #ffd700;
  font-size: 0.9rem;
}

.agency-stars i {
  margin: 0 1px;
}

.agency-overall-meta {
  flex: 1;
}

.agency-review-count {
  font-size: 0.9rem;
  color: #aaa;
  margin: 0;
}

.agency-review-count strong {
  color: #fff;
}

/* Metrics Grid */
.agency-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: #1a1a1a;
  border-radius: 10px;
}

.agency-metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.agency-metric-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agency-metric-value {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.agency-metric-bar {
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
}

.agency-metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #009b3a, #28a745);
  border-radius: 2px;
}

/* Card Actions */
.agency-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.agency-action-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.agency-action-btn--primary {
  background: linear-gradient(135deg, #009b3a, #28a745);
  color: #fff;
}

.agency-action-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 155, 58, 0.4);
}

.agency-action-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.agency-action-btn--secondary:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
}

/* No Results Message */
.scoreboard-no-results {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  color: #888;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */

@media (max-width: 640px) {
  .agency-overall-rating {
    flex-direction: column;
    text-align: center;
  }

  .agency-metrics-grid {
    grid-template-columns: 1fr;
  }

  .agency-card-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agency-card,
  .agency-action-btn {
    transition: none;
  }
}

/* ===== TEXT OVERFLOW FIX - Domain Zero Standard ===== */
/* Protect tag key title from overflow */
.tag-key-title {
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Protect agency badges from overflow */
.agency-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}
