/**
 * @file
 * activities-list.css
 *
 * Mobile-first styles for the /actividades listing page redesign.
 * Theme: b5freakwars — dark bg #0c0c0c, primary red #950012, white text, Verdana.
 */

/* ============================================================
   FILTER BAR
   ============================================================ */

.act-filters {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #111;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

/* Search input */
.act-filters__search {
  width: 100%;
}

#act-search {
  width: 100%;
  box-sizing: border-box;
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

#act-search::placeholder {
  color: #888;
}

#act-search:focus {
  border-color: #950012;
}

/* Day filter buttons row */
.act-filters__days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Tag filter buttons row */
.act-filters__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Base pill button (day + tag) */
.act-day-btn,
.act-tag-btn {
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  cursor: pointer;
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.act-day-btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.act-tag-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
}

.act-day-btn:hover,
.act-tag-btn:hover,
.act-day-btn.active,
.act-tag-btn.active {
  border-color: #950012;
  background-color: rgba(149, 0, 18, 0.15);
  color: #fff;
}

/* Wider screens: filter bar goes horizontal */
@media (min-width: 576px) {
  .act-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .act-filters__search {
    width: auto;
    flex: 1 1 220px;
  }

  .act-filters__days {
    flex: 0 0 auto;
  }

  .act-filters__tags {
    flex: 1 1 100%;
  }
}

/* ============================================================
   RESULTS COUNT
   ============================================================ */

.act-results-count {
  color: #ccc;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.9rem;
  text-align: center;
  margin: 0.5rem 0;
  min-height: 1.4em;
}

/* ============================================================
   LIST CONTAINER
   ============================================================ */

.act-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.5rem 0;
}

/* Zebra striping */
.act-list__row:nth-child(even) .act-row {
  background-color: #141414;
}

/* ============================================================
   SORTABLE HEADER ROW
   ============================================================ */

.act-list__header {
  background-color: #111 !important;
  border-bottom: 2px solid #555 !important;
  cursor: default;
}

.act-col-header {
  font-size: 0.75rem;
  font-weight: bold;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.act-col-header[data-sort] {
  cursor: pointer;
}

.act-col-header[data-sort]:hover {
  color: #fff;
}

.sort-icon::after {
  content: '↕';
  opacity: 0.4;
  font-size: 0.7rem;
}

.act-col-header[data-sort].sort-asc .sort-icon::after {
  content: '↑';
  opacity: 1;
  color: #fff;
}

.act-col-header[data-sort].sort-desc .sort-icon::after {
  content: '↓';
  opacity: 1;
  color: #fff;
}

/* ============================================================
   ROW  (one activity)
   ============================================================
   Columns (desktop, left→right):
     main (title+meta) | schedule | location | price-col | cta
     1fr                 140px      160px       90px        90px
   ============================================================ */

.act-row {
  display: grid;
  grid-template-columns: 1fr 140px 160px 90px 90px;
  align-items: center;
  gap: 0;
  padding: 0.6rem 0.75rem;
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
  transition: background-color 0.15s;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.82rem;
  color: #ddd;
}

.act-row:hover {
  background-color: #222;
}

/* Hidden state — toggled by JS filter */
.act-row--hidden {
  display: none;
}

/* Day badge */
.act-row__day {
  background-color: #950012;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  line-height: 1.4;
  white-space: nowrap;
  margin-right: 0.75rem;
  align-self: center;
  min-width: 52px;
}

/* Main column: title + meta */
.act-row__main {
  padding-right: 0.75rem;
  min-width: 0;
}

.act-row__title {
  font-weight: bold;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-row__title a {
  color: #fff;
  text-decoration: none;
}

.act-row__title a:hover {
  color: #f44;
  text-decoration: underline;
}

/* Meta row: tipo + tags inline */
.act-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.act-row__tipo {
  color: #aaa;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Tags inline list */
.act-row__tags ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.act-row__tags li {
  background-color: rgba(149, 0, 18, 0.12);
  color: #ff6b6b;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(149, 0, 18, 0.5);
  line-height: 1.3;
}

/* Schedule column */
.act-row__schedule {
  padding-right: 0.75rem;
  font-size: 0.78rem;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Location column */
.act-row__location {
  padding-right: 0.75rem;
  font-size: 0.78rem;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price + spots column */
.act-row__price-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-right: 0.5rem;
}

.act-row__price {
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}

.act-row__spots {
  font-size: 0.72rem;
  white-space: nowrap;
}

.act-row__spots.spots-ok {
  color: #6cce6c;
}

.act-row__spots.spots-low {
  color: #f5a623;
}

.act-row__spots.spots-full {
  color: #f44;
}

/* CTA column */
.act-row__cta {
  text-align: right;
}

.act-row__cta a {
  display: inline-block;
  background-color: #950012;
  color: #fff;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.78rem;
  font-weight: bold;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.act-row__cta a:hover {
  background-color: #b8001a;
  color: #fff;
}

/* ============================================================
   RESPONSIVE — tablet/mobile: stack to 2 lines
   ============================================================ */

@media (max-width: 900px) {
  .act-list__header {
    display: none;
  }

  .act-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.3rem;
    padding: 0.6rem 0.75rem;
  }

  /* Line 1: title | cta */
  .act-row__main     { grid-column: 1; grid-row: 1; }
  .act-row__cta      { grid-column: 2; grid-row: 1 / 3; align-self: center; }

  /* Line 2: schedule (day+time visible inline) */
  .act-row__schedule  { grid-column: 1; grid-row: 2; padding-right: 0; }
  .act-row__location  { display: none; }
  .act-row__price-col { display: none; }
}

@media (max-width: 576px) {
  .act-row {
    font-size: 0.8rem;
  }
}

/* ============================================================
   COLOR PALETTE PER ACTIVITY TYPE
   Applied as a left border stripe + matching tipo label color.
   ============================================================ */

/* Color variables per tipo */
.act-row[data-tipo="torneo"]      { border-left: 4px solid #e63946; }
.act-row[data-tipo="concurso"]    { border-left: 4px solid #f4a261; }
.act-row[data-tipo="taller"]      { border-left: 4px solid #2dc653; }
.act-row[data-tipo="curso"]       { border-left: 4px solid #4cc9f0; }
.act-row[data-tipo="masterclass"] { border-left: 4px solid #9b5de5; }
.act-row[data-tipo="ponencia"]    { border-left: 4px solid #4895ef; }
.act-row[data-tipo="demo"]        { border-left: 4px solid #43aa8b; }
.act-row[data-tipo="exposicion"]  { border-left: 4px solid #f9c74f; }
.act-row[data-tipo="infantiles"]  { border-left: 4px solid #ff85a1; }
.act-row[data-tipo="promocion"]   { border-left: 4px solid #90e0ef; }
.act-row[data-tipo="publicidad"]  { border-left: 4px solid #adb5bd; }

/* Matching tipo badge text color */
.act-row[data-tipo="torneo"]      .act-row__tipo { color: #e63946; }
.act-row[data-tipo="concurso"]    .act-row__tipo { color: #f4a261; }
.act-row[data-tipo="taller"]      .act-row__tipo { color: #2dc653; }
.act-row[data-tipo="curso"]       .act-row__tipo { color: #4cc9f0; }
.act-row[data-tipo="masterclass"] .act-row__tipo { color: #9b5de5; }
.act-row[data-tipo="ponencia"]    .act-row__tipo { color: #4895ef; }
.act-row[data-tipo="demo"]        .act-row__tipo { color: #43aa8b; }
.act-row[data-tipo="exposicion"]  .act-row__tipo { color: #f9c74f; }
.act-row[data-tipo="infantiles"]  .act-row__tipo { color: #ff85a1; }
.act-row[data-tipo="promocion"]   .act-row__tipo { color: #90e0ef; }
.act-row[data-tipo="publicidad"]  .act-row__tipo { color: #adb5bd; }

/* ============================================================
   ACTIVITIES WRAPPER
   ============================================================ */

.activities-wrapper {
  width: 100%;
}
