/* ============================================================================
   Hemicycle Voting Visualization Styles
   ========================================================================== */

/* Vote Detail Layout */
.vote-detail--header {
  padding-bottom: 0.5rem;
}

.vote-detail--title {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  margin-bottom: 1.5rem;
  color: var(--colour-secondary);
}

.vote-detail--date {
  font-size: 0.95rem;
  color: #666;
  margin: 0.25rem 0;
}

.vote-detail--description {
  background: white;
}

.vote-detail--description p {
  font-size: 1.4rem;
  line-height: 1.8rem;
}

/* Two Column Layout */
.vote-detail--layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 1400px) {
  .vote-detail--layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Hemicycle Container
   ========================================================================== */

.hemicycle-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hemicycle-svg-wrapper {
  width: 100%;
  margin: 0 auto;
}

.hemicycle-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG Seat Styles (loaded via CSS in hemicycle.html) */
svg a.seat-link {
  cursor: pointer;
  text-decoration: none;
}

svg circle.seat {
  stroke: #f0f0f0;
  stroke-width: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

svg circle.seat:hover {
  filter: brightness(1.2);
  stroke-width: 2px;
  stroke: #333;
}

svg a.seat-link:hover circle.seat {
  filter: brightness(1.2);
  stroke-width: 2px;
  stroke: #333;
}

svg circle.seat.highlighted {
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
  stroke-width: 2px;
  stroke: #333;
}

/* Decision Colors */
svg circle.group-green {
  fill: #008000;
}

/* YES */
svg circle.group-yellow {
  fill: #FFD700;
}

/* NO */
svg circle.group-pink {
  fill: #FF8888;
}

/* SPOILT */
svg circle.group-grey {
  fill: #A9A9A9;
}

/* ABSENT */

/* ============================================================================
   Vote Statistics Legend
   ========================================================================== */
.vote-statistics-list {
  flex: 0 1 100%;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}


.vote-statistics-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1rem 1rem 0;
  flex-wrap: nowrap;
}

.legend-list {
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #f0f0f0;
}



.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.legend-color {
  display: inline-block;
  width: 40px;
  height: 20px;
  border-radius: var(--radius, 4px);
  border: 1px solid #ccc;
}

.legend-item.yes .legend-color {
  background-color: #4CAF50;
}

.legend-item.no .legend-color {
  background-color: #F44336;
}

.legend-item.spoilt .legend-color {
  background-color: #FF9800;
}

.legend-item.abstained .legend-color {
  background-color: #7346d7;
}

.legend-item.absent .legend-color {
  background-color: #9E9E9E;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-label strong {
  color: #333;
  font-size: 1.05rem;
}

.list-label {
  color: #e0e0e0;
}

/* ============================================================================
   Vote Filter Buttons
   ========================================================================== */
.vote-filter-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: #333;
}

.vote-filter-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 6px;
  justify-content: flex-start;
}

.filter-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  background: white;
  color: #555;
  border-radius: var(--radius, 4px);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: #f9f9f9;
  border-color: #bbb;
}

.filter-btn.active {
  background: var(--colour-secondary-dark);
  color: white;
  border-color: var(--colour-secondary-dark);
}

.filter-btn.active:hover {
  background: var(--colour-secondary);
  border-color: var(--colour-secondary);
}

/* ============================================================================
   Members Vote Table
   ========================================================================== */

.members-table-container {
  overflow-x: auto;
  height: 60rem;
  overflow-y: scroll;
  margin-bottom: 2rem;
}

.members-table--header {
  flex: 1 1 100%;
}

.members-vote-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.95rem;
}

.members-vote-table thead {
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
}

.members-vote-table th {
  padding: 0.875rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.members-vote-table td {
  padding: 0.875rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

/* Column Widths */
.col-header {
  background-color: white;
  color: var(--colour-primary-dark);
}

.col-name {
  width: 30%;
  min-width: 150px;
}

.col-vote {
  width: 15%;
  min-width: 100px;
}

.col-party {
  width: 15%;
  min-width: 100px;
}

.col-constituency {
  width: 20%;
  min-width: 120px;
}

.col-county {
  width: 20%;
  min-width: 100px;
}

/* Member Name Link */
.vote-link,
.member-name {
  color: var(--colour-secondary-dark);
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.vote-link:hover,
.member-name:hover {
  color: var(--colour-primary);
  text-decoration: none;
}

/* Vote Row Styling */
.vote-row {
  transition: background-color 0.2s ease;
}

.vote-row:hover {
  background-color: #f9f9f9;
}

.vote-row.highlighted {
  background-color: #ffffcc !important;
  animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
  0% {
    background-color: #ffff99;
  }

  100% {
    background-color: transparent;
  }
}

/* Vote Decision Color Coding */
.vote-row--yes {}

.vote-row--no {}

.vote-row--spoilt {}

.vote-row--absent {}

/* Alternating row colors */
.vote-row:nth-child(even) {
  background-color: #f9f9f9;
}

.vote-row:nth-child(even):hover {
  background-color: #f0f0f0;
}

/* ============================================================================
   Decision Badges
   ========================================================================== */

.decision-badge {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius, 4px);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.decision-badge--yes {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.decision-badge--no {
  background-color: #F8D7D8;
  color: #7E292A;
  border: 1px solid #F8D7D8;
}

.decision-badge--spoilt {
  background-color: #FFEBCC;
  color: #8E5D15;
  border: 1px solid #FFEBCC;
}

.decision-badge--abstained {
  background-color: #E9DCFF;
  color: #4A2B8E;
  border: 1px solid #E9DCFF;
}

.decision-badge--absent {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

/* ============================================================================
   Vote List Links - Active State
   ========================================================================== */

.vote-link {
  display: block;
  padding: 0.75rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.vote-link.active {
  background-color: #a72d2d;
  color: white !important;
}

.vote-link.active .vote-date {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .vote-detail--layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hemicycle-svg-wrapper {
    max-width: 100%;
  }

  /* Collapse table columns on smaller screens */
  .col-county {
    display: none;
  }
}

@media (max-width: 768px) {
  .vote-detail--header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .vote-detail--title {
    font-size: 1.5rem;
  }

  .vote-statistics-legend {
    flex-direction: column;
    gap: 0.75rem;
  }

  .legend-item {
    justify-content: space-between;
  }

  /* Hide county and constituency on mobile */
  .col-county,
  .col-constituency {
    display: none;
  }

  /* Stack table columns */
  .col-party {
    display: none;
  }

  .members-vote-table th,
  .members-vote-table td {
    padding: 0.625rem 0.5rem;
    font-size: 0.85rem;
  }

  .col-name {
    width: 50%;
  }

  .col-vote {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .vote-detail--layout {
    gap: 1rem;
  }

  .vote-detail--title {
    font-size: 1.25rem;
  }

  .vote-detail--date {
    font-size: 0.85rem;
  }

  .vote-statistics-legend {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .legend-color {
    width: 16px;
    height: 16px;
  }

  .legend-label {
    font-size: 0.8rem;
  }

  .members-vote-table {
    font-size: 0.8rem;
  }

  .members-vote-table th,
  .members-vote-table td {
    padding: 0.5rem 0.25rem;
  }

  .col-name {
    width: 60%;
  }

  .col-vote {
    width: 40%;
  }

  .decision-badge {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ============================================================================
   Empty State
   ========================================================================== */

.no-votes--message {
  padding: 2rem;
  text-align: center;
  color: #666;
  background: #f9f9f9;
  border-radius: 6px;
}

.no-votes--message p {
  margin: 0;
  font-size: 1.1rem;
}
