/* src/components/TickerWidget.css */
.ticker-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1280px;
    margin: 20px auto;
}
.ticker-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.ticker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.ticker-header h3 {
  margin: 0;
  color: #212529;
  font-size: 1.2em;
  font-weight: 700;
  padding-right: 15px; /* Espacio para que no se pegue al dropdown en escritorio */
}

.ticker-stats {
  display: flex;
  gap: 20px;
  font-size: 0.9em;
  color: #555;
}

.ticker-stats strong {
  color: #0073e6;
  font-size: 1.1em;
}

.ticker-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticker-party .party-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.9em;
}

.ticker-party .party-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.ticker-party .party-percent {
  font-weight: 700;
}

.party-bar-background {
  background-color: #e9ecef;
  border-radius: 4px;
  height: 10px;
  overflow: hidden;
}

.party-bar-foreground {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-in-out;
}

.ticker-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.ticker-party {
    display: flex;
    align-items: center;
    gap: 10px;
}
.party-logo {
    flex-shrink: 0;
    width: 75px;
    height: 75px;
}
.party-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.party-details {
    flex-grow: 1;
    min-width: 0;
}

/* --- ESTILOS PARA RESPONSIVIDAD MÓVIL --- */
@media (max-width: 600px) {
  .ticker-header {
    flex-direction: column;
    /* Centra los elementos hijos horizontalmente */
    align-items: center;
    gap: 10px;
  }

  .ticker-header h3 {
    font-size: 1.1em;
    padding-right: 0; /* Quitamos el padding en móvil */
  }

  /* Esta regla asegura que el dropdown siga ocupando todo el ancho */
  .ticker-header > div {
    width: 100%;
  }

  .ticker-party .party-name {
    white-space: normal;
  }
}