/* ============================================
   CALENDAR LAYOUT - SPECIFIC STYLES
   ============================================ */

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}

.header-content {
  flex: 1;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--txt);
  margin: 0;
}

.section-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--panel-2);
  color: var(--accent);
  font-size: 1.25rem;
  border-radius: var(--radius);
}

/* Calendar Navigation */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--panel-2);
  color: var(--txt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: var(--hover);
}

.nav-button:active {
  transform: scale(0.95);
}

.nav-info {
  flex: 1;
  text-align: center;
}

.nav-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 0.25rem;
}

.nav-subtitle {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Calendar Content */
.calendar-content {
  position: relative;
}

.calendar-day {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Match Stack */
.match-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Match Card */
.match-card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 2px solid var(--panel-2);
}

.match-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Spoiler Overlays */
.match-spoiler-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.score-spoiler-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  z-index: 5;
}

.btn-spoiler {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.5rem;
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-spoiler:hover {
  background: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(232, 0, 40, 0.4);
}

.btn-spoiler:active {
  transform: scale(0.95);
}

.btn-spoiler i {
  font-size: 1rem;
  color: #ffffff;
}


/* Match Header */
.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--panel-2);
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.match-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--panel-3);
  color: var(--txt-2);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: calc(var(--radius) / 2);
}

.match-format {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
}

.match-format i {
  font-size: 0.875rem;
}

.match-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.match-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.match-time i {
  font-size: 1rem;
}

.btn-details {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--panel-3);
  color: var(--txt-2);
  font-size: 0.75rem;
  border-radius: calc(var(--radius) / 2);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-details:hover {
  transform: scale(1.1);
}

.btn-details:active {
  transform: scale(0.95);
}

.btn-watch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: var(--txt-2);
  font-size: 0.75rem;
  border-radius: calc(var(--radius) / 2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-watch:hover {
  background: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(232, 0, 40, 0.3);
}

.btn-watch:active {
  transform: scale(0.95);
}

/* Match Body */
.match-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 2rem;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-team.team-blue {
  flex-direction: row;
}

.match-team.team-red {
  flex-direction: row-reverse;
}

.team-abbr {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius);
  padding: 0.5rem;
}

.team-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Espejo para logos del equipo rojo (lado derecho) */
.match-team.team-red .team-logo {
  transform: scaleX(-1);
}

/* Alternativa: si team-red no está funcionando, aplicar al tercer elemento */
.match-body .match-team:last-child .team-logo {
  transform: scaleX(-1);
}

/* Match Separator */
.match-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-score {
  font-size: 2rem;
  font-weight: 700;
  color: var(--txt);
  min-width: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.score-divider {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
}

.vs-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Match Footer */
.match-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--panel-2);
}

.match-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.match-status.live {
  color: var(--accent);
}

.match-status.finished {
  color: var(--muted);
}

.match-status.upcoming {
  color: var(--txt);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* State Indicators */
.state-live {
  box-shadow: 0 2px 12px rgba(232, 0, 40, 0.15);
}

.state-finished {
  /* Sin opacidad - totalmente visible */
}

.state-upcoming {
  /* Default state */
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 2.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--txt);
  margin: 0 0 0.5rem 0;
}

.empty-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-badge {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .calendar-nav {
    padding: 1rem;
  }

  .nav-title {
    font-size: 1rem;
  }

  .nav-subtitle {
    font-size: 0.75rem;
  }

  .match-stack {
    gap: 1.5rem;
  }

  .match-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }

  .match-actions {
    width: 100%;
    justify-content: space-between;
  }

  .match-body {
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .team-abbr {
    font-size: 1rem;
    min-width: 2.5rem;
  }

  .team-logo-wrapper {
    width: 3rem;
    height: 3rem;
  }

  .team-score {
    font-size: 1.5rem;
    min-width: 2rem;
  }

  .score-divider {
    font-size: 1.25rem;
  }

  .vs-text {
    font-size: 0.875rem;
  }

  .match-footer {
    padding: 0.5rem 1rem;
  }

  .empty-state {
    padding: 3rem 1.5rem;
  }

  .empty-icon {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
  }

  .empty-title {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .match-stack {
    gap: 1rem;
  }

  .match-card {
    border-radius: calc(var(--radius) / 1.5);
  }

  .match-body {
    padding: 1rem;
  }

  .team-abbr {
    font-size: 0.875rem;
    min-width: 2rem;
  }

  .team-logo-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.375rem;
  }

  .score-container {
    gap: 0.75rem;
  }

  .team-score {
    font-size: 1.25rem;
    min-width: 1.75rem;
  }

  .score-divider {
    font-size: 1rem;
  }

  .match-actions {
    gap: 0.5rem;
  }
}