/**
 * @file
 * Parliament module styles.
 */

/* Party colors */
.mp-party--lib,
.party-lib { background-color: #d71920; color: #fff; }
.mp-party--cpc,
.party-cpc { background-color: #1a4782; color: #fff; }
.mp-party--ndp,
.party-ndp { background-color: #f37021; color: #fff; }
.mp-party--bq,
.party-bq { background-color: #33b2cc; color: #fff; }
.mp-party--green,
.party-green { background-color: #3d9b35; color: #fff; }
.mp-party--ind,
.party-ind { background-color: #888; color: #fff; }

/* MP Cards */
.mp-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.mp-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fff;
}

.mp-card--compact {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.mp-card-link:hover .mp-card--compact {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #0073aa;
}

.mp-card-header {
  margin-bottom: 0.5rem;
}

.mp-party-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mp-card--compact .mp-name {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
}

.mp-card--compact .mp-constituency {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.mp-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.mp-photo-large {
  width: 150px;
  height: 150px;
}

.mp-photo-large img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.mp-name {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
}

.mp-party {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
}

.mp-constituency {
  color: #666;
  font-size: 0.9rem;
}

/* MPs Grid */
.mps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* Provinces Grid (National view) */
.provinces-section {
  margin: 2rem 0;
}

.provinces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.province-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
}

.province-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.province-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.province-count {
  font-size: 0.9rem;
  color: #666;
}

/* Party breakdown chart */
.party-breakdown {
  margin: 2rem 0;
}

.party-chart {
  display: flex;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
}

.party-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  min-width: 40px;
  font-size: 0.8rem;
}

.party-bar .party-count {
  margin-left: 0.3rem;
}

/* Bills */
.parliament-bill {
  max-width: 800px;
}

.bill-header {
  margin-bottom: 2rem;
}

.bill-number {
  display: inline-block;
  background: #333;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.bill-title {
  margin-top: 0.5rem;
}

.bill-plain-summary {
  background: #f5f9fc;
  border-left: 4px solid #0073aa;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.bill-plain-summary h2 {
  font-size: 1rem;
  margin-top: 0;
  color: #0073aa;
}

/* Bill progress bar */
.progress-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.progress-stage {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.4;
}

.progress-stage.completed {
  opacity: 1;
}

.progress-stage.current {
  font-weight: bold;
}

.stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
}

.progress-stage.completed .stage-dot {
  background: #0073aa;
}

.progress-stage.current .stage-dot {
  background: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

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

/* Vote styling */
.vote-yea,
.vote-cast.vote-yea { color: #2e7d32; }
.vote-nay,
.vote-cast.vote-nay { color: #c62828; }
.vote-passed { color: #2e7d32; }
.vote-failed { color: #c62828; }

.voting-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.voting-table th,
.voting-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.voting-table th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Bills and votes lists */
.bills-list,
.votes-list {
  list-style: none;
  padding: 0;
}

.bill-item,
.vote-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.bill-item .bill-number {
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
}

.bill-stage {
  margin-left: auto;
  font-size: 0.85rem;
  color: #666;
}

/* My MP Block */
.my-mp-block {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
}

.my-mp-card {
  display: flex;
  gap: 1rem;
}

.my-mp-card .mp-photo {
  flex-shrink: 0;
}

.my-mp-card .mp-photo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.mp-recent-votes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.mp-recent-votes h4 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.mp-recent-votes .votes-list {
  font-size: 0.85rem;
}

.mp-recent-votes .vote-item {
  padding: 0.3rem 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.5rem;
}

.btn-external {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.btn-discussion {
  background: #0073aa;
  color: #fff;
}

.btn-discussion:hover {
  background: #005a87;
}

/* View all links */
.view-all-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Dashboard layout */
.parliament-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.mp-count-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

/* Section bounding boxes */
.parliament-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.parliament-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #0073aa;
  font-size: 1.25rem;
  color: #333;
}

/* Two column layout for bills/votes */
.parliament-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .parliament-two-column {
    grid-template-columns: 1fr;
  }
}

/* Override province section margin since it's now in a box */
.parliament-section.provinces-section {
  margin: 0 0 1.5rem 0;
}

/* Navigation in box */
.parliament-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.parliament-nav a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.2s;
}

.parliament-nav a:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Bills Listing Page */
.parliament-bills-listing {
  max-width: 1200px;
  margin: 0 auto;
}

.bills-count-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.bill-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.bill-card {
  margin-bottom: 0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.bill-card-link:hover .bill-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #0073aa;
}

.bill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bill-card-header .bill-number {
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0;
}

.bill-type-badge {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.bill-card-title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bill-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.meta-label {
  color: #888;
  margin-right: 0.25rem;
}

.meta-value {
  color: #555;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #e9ecef;
  color: #495057;
}

.status-badge.status-first-reading { background: #fff3cd; color: #856404; }
.status-badge.status-second-reading { background: #d4edda; color: #155724; }
.status-badge.status-committee { background: #cce5ff; color: #004085; }
.status-badge.status-report-stage { background: #d1ecf1; color: #0c5460; }
.status-badge.status-third-reading { background: #d4edda; color: #155724; }
.status-badge.status-senate { background: #e2d5f1; color: #563d7c; }
.status-badge.status-royal-assent { background: #d4edda; color: #155724; }

/* Mini progress bar for bill cards */
.bill-card-progress-bar {
  display: flex;
  gap: 3px;
  margin-top: 0.5rem;
}

.mini-stage {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  transition: background 0.2s;
}

.mini-stage.completed {
  background: #0073aa;
}

/* No bills message */
.no-bills {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #666;
}

@media (max-width: 768px) {
  .bills-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Bill Detail Page */
.parliament-bill {
  max-width: 900px;
  margin: 0 auto;
}

.bill-header {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.bill-header .bill-number {
  font-size: 1rem;
  padding: 0.3rem 0.75rem;
}

.bill-header .bill-title {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

.bill-details {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.bill-details h3 {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem 0;
}

.bill-details p {
  margin: 0;
  color: #333;
}

.bill-full-title {
  grid-column: 1 / -1;
}

.bill-progress {
  grid-column: 1 / -1;
}

.bill-plain-summary {
  background: #f8fbfe;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #0073aa;
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.bill-plain-summary h2 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #0073aa;
}

.bill-plain-summary p {
  margin: 0;
  line-height: 1.6;
}

.bill-actions {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.bill-actions .btn {
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

.sponsor-link {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
}

.sponsor-link:hover {
  text-decoration: underline;
}

/* Fix progress bar stage dot cutoff */
.progress-bar {
  padding-left: 0.5rem;
}

/* Votes Listing Page */
.parliament-votes-listing {
  max-width: 1200px;
  margin: 0 auto;
}

.votes-count-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.votes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.25rem;
}

.vote-card {
  margin-bottom: 0;
}

.vote-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.vote-number-badge {
  display: inline-block;
  background: #333;
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.vote-date-badge {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.vote-result-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: auto;
}

.vote-result--passed {
  background: #d4edda;
  color: #155724;
}

.vote-result--failed {
  background: #f8d7da;
  color: #721c24;
}

.vote-card-subject {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.vote-card-tally {
  margin-top: auto;
}

.tally-bar {
  display: flex;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: #e9ecef;
}

.tally-yeas {
  background: #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  transition: width 0.3s ease;
}

.tally-nays {
  background: #dc3545;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  transition: width 0.3s ease;
}

.tally-count {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.tally-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.tally-label--yea {
  color: #28a745;
  font-weight: 500;
}

.tally-label--nay {
  color: #dc3545;
  font-weight: 500;
}

.no-votes {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #666;
}

@media (max-width: 768px) {
  .votes-grid {
    grid-template-columns: 1fr;
  }
}


/* Parliament Forums Page */
.parliament-forums-listing {
  max-width: 1200px;
  margin: 0 auto;
}

.forums-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.forums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.forum-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.forum-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.forum-card-link:hover .forum-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #0073aa;
}

.forum-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.forum-card-header .bill-number {
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0;
}

.bill-stage-badge {
  display: inline-block;
  background: #e9ecef;
  color: #495057;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.forum-card-title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.forum-card-meta {
  font-size: 0.85rem;
  color: #666;
}

.no-forums {
  color: #666;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .forums-grid {
    grid-template-columns: 1fr;
  }
}
