/* Election Results Section Styles */

.election-results-section {
  width: 100%;
  margin: 20px 0;
  padding: 0;
  float: left;
}

.election-loading {
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #666;
}

/* Tabs Styling */
#electionresults {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
}

#electionresults .nav-item {
  margin-bottom: -2px;
}

#electionresults .nav-link {
  border: 1px solid transparent;
  border-radius: 0.25rem 0.25rem 0 0;
  padding: 10px 20px;
  color: #495057;
  background-color: #f8f9fa;
  margin-right: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Hind Vadodara", sans-serif;
  font-weight: 500;
}

#electionresults .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
  background-color: #e9ecef;
}

#electionresults .nav-link.active {
  color: #fff;
  background-color: #850E00;
  border-color: #850E00 #850E00 #fff;
}

/* Election Box */
.electionbox {
  margin-bottom: 0px;
  background: #fff;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Chart Section */
.chart-section {
  float: left;
  padding: 15px;
}

.chart-section h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.chart-section h4 {
  font-size: 18px;
  font-weight: 500;
  color: #666;
  margin-bottom: 0px;
  text-align: center;
}

/* Table Styling */
.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered thead th {
  background-color: #ebd2b93b;
  color: #000;
  font-weight: 600;
  text-align: center;
  padding: 5px 10px;
  border: 1px solid #dee2e6;
}

.table-bordered tbody td {
  padding: 5px 10px;
  text-align: center;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.table-bordered tbody tr td:first-child {
  text-align: left;
}

/* Dot Indicator */
.dot {
  height: 10px;
  width: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid #fff;
}

/* Star Candidates Section */
.candidate-card {
  display: flex;
  align-items: center;

  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.candidate-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.candidate-card img {
  width: 80px;
  height: 80px;

}

.candidate-details {
  padding-left: 15px;
  text-align: left;
  flex: 1;
}

.candidate-details h5 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.candidate-details p {
  font-size: 14px;
  color: #666;
  margin: 5px 0;
  line-height: 1.5;
}

.candidate-details .badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 991px) {
  .chart-section {
    float: none;
    width: 100%;
    padding: 10px 0;
  }

  #stateTabs .nav-link {
    padding: 8px 15px;
    font-size: 14px;
  }

  .chart-section h3 {
    font-size: 20px;
  }

  .chart-section h4 {
    font-size: 16px;
  }

  .electionbox {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  #stateTabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  #stateTabs .nav-link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  .candidate-card {
    padding: 12px;
  }

  .candidate-card img {
    width: 60px;
    height: 60px;
  }

  .candidate-details h5 {
    font-size: 16px;
  }

  .candidate-details p {
    font-size: 13px;
  }

  .table-bordered thead th,
  .table-bordered tbody td {
    padding: 8px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .electionbox {
    padding: 10px;
  }

  .chart-section h3 {
    font-size: 18px;
  }

  .chart-section h4 {
    font-size: 14px;
  }

  #stateTabs .nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }

  
}

/* Animation */
.tab-pane {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chart Container */
.chart-section > div {
  position: relative;
  margin: 20px auto;
}

/* Loading State */
.election-loading p {
  font-family: "Hind Vadodara", sans-serif;
  font-size: 16px;
  color: #666;
}


/* ═══════════════════════════════════════════════════════════════
   Election Module  —  all elections in one horizontal row
   ═══════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────── */
.em-section {
  width: 100%;
  float: left;
  margin: 0 0 10px 0;
  /* padding: 0 15px; */
}

/* Outer box */
.em-outer-wrap {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  background: #fff;
  padding: 10px 12px 12px;
}

/* ── Heading ─────────────────────────────────────────────────── */
.em-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}

.em-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #850E00;
  flex-shrink: 0;
}

.em-heading-text {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin: 0;
  line-height: 1.3;
}

/* ── Elections row — all cards side by side ──────────────────── */
.em-elections-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  /* Allow horizontal scroll only if cards overflow the container */
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
}

/* Thin scrollbar for the row */
.em-elections-row::-webkit-scrollbar { height: 4px; }
.em-elections-row::-webkit-scrollbar-track { background: #f5f5f5; }
.em-elections-row::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.em-elections-row::-webkit-scrollbar-thumb:hover { background: #850E00; }

/* Each card wrapper — equal width, min so they don't collapse */
.em-card-wrap {
  /* flex: 1 1 0;
  min-width: 160px;
  max-width: 280px; */
}

/* ── Card ────────────────────────────────────────────────────── */
.em-card {
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Card header — left red accent */
.em-card-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px 8px 5px 10px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  border-left: 3px solid #850E00;
}

.em-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
  width: 100%;
}

.em-total-seats {
  font-size: 12px;
  font-weight: bold;
  color: #666;
  white-space: nowrap;
  width: 100%;
}

/* ── Table ───────────────────────────────────────────────────── */
.em-table-wrap {
  /* Vertical scroll when many parties */
  overflow-y: auto;
  overflow-x: hidden;   /* NO horizontal scroll on individual table */
  max-height: 220px;
  flex: 1;
}

/* Thin vertical scrollbar */
.em-table-wrap::-webkit-scrollbar { width: 3px; }
.em-table-wrap::-webkit-scrollbar-track { background: #f5f5f5; }
.em-table-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.em-table-wrap::-webkit-scrollbar-thumb:hover { background: #850E00; }

.em-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;   /* fixed layout — no x-overflow */
}

/* Column headers */
.em-th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 5px 6px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #ebebeb;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.em-th:last-child { border-right: none; }

.em-th-party {
  text-align: left;
  color: #333;
  width: 45%;
}

/* Party rows */
.em-party-row {
  border-bottom: 1px solid #f5f5f5;
}

.em-party-row:last-child { border-bottom: none; }
.em-party-row:hover { background: #fafafa; }

.em-td {
  text-align: center;
  padding: 5px 6px;
  border-right: 1px solid #f5f5f5;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-td:last-child { border-right: none; }

/* Party name — left aligned, coloured by color_code */
.em-td-party {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Value cells — coloured by color_code */
.em-td-val {
  font-size: 14px;
  font-weight: 700;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .em-card-wrap {
    /* min-width: 140px; */
  }
}

@media (max-width: 575px) {
  .em-section { padding: 0 6px; margin-top: 20px; }
  .em-heading-text { font-size: 13px; }
  .em-td-val { font-size: 13px; }

  /* Mobile: 2 cards per row, wrap into grid */
  .em-elections-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
  }

  .em-card-wrap {
    min-width: unset;
    max-width: unset;
  }
}
@media (min-width: 1531px) {
  .em-section{
    float: left; width: 100%; margin-top: 20px !important;
  }
}
/* =============================================
   ACCESSIBILITY STYLES (WCAG 2.1 Compliance)
   ============================================= */

/* Skip to main content link - visible on focus */
.skip-to-content-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  font-size: 14px;
}

.skip-to-content-link:focus {
  top: 0;
  left: 0;
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Main content anchor */
#main-content {
  outline: none;
}

/* Focus visible states for better keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Dropdown menu keyboard navigation */
.dropdown-menu a:focus-visible,
.dropdown-menu button:focus-visible {
  background-color: #e9ecef;
  outline: 3px solid #FFD700;
  outline-offset: -2px;
}

/* Category overlay - focus only */
/* .category-overlay-text:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Image alt text loading state */
img:not([alt]),
img[alt=""] {
  border: 2px solid #FF6B6B;
}

/* Decorative image handling */
img[alt="decoration"],
img[alt="decorative"] {
  display: none;
}

/* Improved search icon contrast */
.search-icon,
.search-icon svg {
  color: #333;
  fill: #333;
}

/* E-paper icon and other informational icons */
.epaper-icon,
.news-icon,
.video-icon,
.info-icon {
  color: #333;
  fill: #333;
}

/* Link focus states */
a {
  position: relative;
}

/* a:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Form input focus states */
/* input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
} */

/* Button focus states */
/* button:focus,
button:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Mega menu keyboard navigation support */
.mega-menu-item:focus-within .mega-menu-dropdown {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Improved color contrast for disabled states */
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Language toggle focus only */
/* .language-toggle:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Notification badge focus */
/* .notification-badge:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Video/audio player controls focus */
/* .video-player-control:focus,
.audio-player-control:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Aria-live region styling for screen readers */
[aria-live="polite"],
[aria-live="assertive"] {
  position: relative;
}

/* Required field indicator focus */
/* .form-field label.required:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Dropdown arrow styling for clarity */
.dropdown-toggle::after {
  content: "▼";
  margin-left: 8px;
  font-size: 12px;
}

/* Loading spinner accessibility */
.loading-spinner {
  animation: spin 1s linear infinite;
}

.loading-spinner[aria-label] {
  position: relative;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Modal dialog accessibility */
.modal {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  border: 3px solid #333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.modal-close-button {
  background: none;
  border: 2px solid #666;
  color: #333;
  font-size: 24px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}

/* .modal-close-button:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Link focus state only - no color change */
/* a[href]:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
  border-radius: 2px;
} */

/* Error, Success, Warning messages - focus visible only, no text colors */
.error-message,
.form-error,
.validation-error {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

.success-message,
.form-success {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

.warning-message {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Heading and text focus states */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Table focus states */
/* table:focus,
table th:focus,
table td:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* List focus states */
/* ul:focus, ol:focus, li:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Code block focus */
/* code:focus, pre:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */

/* Blockquote focus */
/* blockquote:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
} */ 

/* Improve focus management in complex layouts */
.page-wrapper {
  position: relative;
}

/* Responsive text sizing */
@media (max-width: 768px) {
  .skip-to-content-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible {
    outline-width: 2px;
    outline-offset: 1px;
  }
}

/* Print accessibility */
@media print {
  .skip-to-content-link {
    display: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  a[href^="#"]::after {
    content: "";
  }
}

/* Athaitap Module Styles - Exact match to staging.gstv.in */

/* Main container styling */
.athaitap-main-container {
  margin-bottom: 20px;
}

/* Individual entry styling - matches staging exactly */
.athaitap-entry-item {
  margin-bottom: 20px;
  padding: 0;
}

.athaitap-entry-content {
  background: transparent;
  border: none;
  padding: 0;
}

/* Name styling - exactly like staging */
.athaitap-name-primary {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
  line-height: 1.2;
}

.athaitap-name-secondary {
  font-size: 16px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* Info text styling */
.athaitap-info-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Media container */
.athaitap-media-container {
  margin: 15px 0;
  text-align: center;
}

.athaitap-media-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

/* Video and image styling */
.athaitap-media-video,
.athaitap-media-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

/* Details section styling */
.athaitap-details-section {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

.athaitap-detail-item {
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.3;
}

.athaitap-detail-item:last-child {
  margin-bottom: 0;
}

/* Date badge styling */
.athaitap-date-container {
  text-align: right;
  margin-top: 15px;
}

.athaitap-date-badge {
  background: #850e00;
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

/* Header styling */
.athaitap-page-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.athaitap-main-title {
  font-size: 28px;
  font-weight: bold;
  color: #850e00;
  margin-bottom: 10px;
  font-family: 'Noto Sans Gujarati', sans-serif;
}

.athaitap-subtitle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.athaitap-subtitle-text {
  color: #666;
  font-size: 16px;
}

.athaitap-user-link {
  background: #850e00;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.athaitap-user-link:hover {
  background: #6a0b00;
  color: white;
  text-decoration: none;
}

/* Load More Button */
.athaitap-load-more-container {
  text-align: center;
  margin: 30px 0;
}

.athaitap-load-more-btn {
  background-color: #850e00;
  color: white;
  border: none;
  padding: 10px 30px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.athaitap-load-more-btn:hover {
  background-color: #6a0b00;
}

.athaitap-load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Loading States */
.loading-spinner {
  text-align: center;
  padding: 20px;
}

.loading-spinner .spinner-border {
  color: #850e00;
}

/* Error States */
.error-message {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
  margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .athaitap-main-title {
    font-size: 24px;
  }
  
  .athaitap-subtitle-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .athaitap-name-primary {
    font-size: 16px;
  }
  
  .athaitap-name-secondary {
    font-size: 14px;
  }
  
  .athaitap-info-text {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .athaitap-main-title {
    font-size: 20px;
  }
  
  .athaitap-entry-item {
    margin-bottom: 15px;
  }
  
  .athaitap-media-video,
  .athaitap-media-image {
    max-height: 200px;
  }
}

/* Google Translate Styling */
.google-translate-wrapper {
  display: inline-flex !important;
  align-items: center;
  margin: 0 10px;
}

/* Hide Google Translate branding */
.goog-te-banner-frame,
.goog-te-balloon-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

/* Style the translate dropdown */
#google_translate_element select {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

#google_translate_element select:hover {
  border-color: #850E00;
}

#google_translate_element select:focus {
  border-color: #850E00;
  box-shadow: 0 0 5px rgba(133, 14, 0, 0.3);
}

/* Hide the "Powered by" text */
.goog-te-gadget {
  font-size: 0 !important;
  color: transparent !important;
}

.goog-te-gadget > span {
  display: none !important;
}

.goog-te-gadget > div {
  display: inline-block !important;
}

/* Style for mobile view */
@media (max-width: 768px) {
  .google-translate-wrapper {
    margin: 0 5px;
  }

  #google_translate_element select {
    padding: 4px 8px;
    font-size: 12px;
    max-width: 80px;
  }

  /* Show only icon in mobile */
  .google-translate-wrapper::before {
    content: '🌐';
    font-size: 20px;
    margin-right: 5px;
  }
}

/* Desktop view */
@media (min-width: 769px) {
  .google-translate-wrapper {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
  }

  .google-translate-wrapper::before {
    content: '🌐';
    font-size: 18px;
  }
}

/* Remove Google Translate top bar */
.skiptranslate {
  display: inline-block !important;
}

.goog-te-banner-frame.skiptranslate {
  display: none !important;
}

body {
  top: 0px !important;
}

/* Custom styling for the translate element */
.goog-te-combo {
  background-color: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  padding: 5px 10px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  outline: none !important;
  color: #333 !important;
  font-family: 'Hind Vadodara', sans-serif !important;
}

.goog-te-combo:hover {
  border-color: #850E00 !important;
}

.goog-te-combo:focus {
  border-color: #850E00 !important;
  box-shadow: 0 0 5px rgba(133, 14, 0, 0.3) !important;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .goog-te-combo {
    padding: 4px 6px !important;
    font-size: 12px !important;
    max-width: 70px !important;
  }
}

