/* ═══════════════════════════════════════════════════════════════
   MAIN.CSS — Bádminton Perú
   Base global: variables, reset, tipografía, container
   → En Angular: este archivo será styles.scss
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ── Variables globales ───────────────────────────────────────── */
/* → En Angular: variables en styles.scss o _variables.scss       */
:root {
  /* Colores */
  --bp-red:        #CC0000;
  --bp-red-dark:   #aa0000;
  --bp-red-orange: #e67e00;
  --bp-green:      #16a34a;
  --bp-black:      #111;
  --bp-dark:       #1a1a1a;
  --bp-gray-dark:  #1e1e1e;
  --bp-gray:       #555;
  --bp-gray-mid:   #888;
  --bp-gray-light: #e0e0e0;
  --bp-white:      #fff;

  /* Tipografía */
  --bp-font:       'Montserrat', sans-serif;

  /* Layout */
  --bp-container:  1200px;
  --bp-gap:        24px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--bp-font);
  background: var(--bp-white);
  color: var(--bp-black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* ── Container ────────────────────────────────────────────────── */
/* → En Angular: directiva o clase global reutilizable            */
.bp-container {
  max-width: var(--bp-container);
  margin: 0 auto;
  padding: 0 var(--bp-gap);
  width: 100%;
}

/* ── Utilidades mínimas ───────────────────────────────────────── */
.bp-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Prevenir scroll horizontal global ────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── SCORES EN VIVO ─────────────────────────────── */
.bp-scores {
  background: #111;
  padding: 24px 0 28px;
  border-top: 3px solid #CC0000;
  border-bottom: 3px solid #CC0000;
}

.bp-scores-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.bp-scores-title {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.bp-scores-header .bp-live-badge {
  background: #CC0000;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bp-live-pulse 1s infinite;
  box-shadow: 0 0 0 0 rgba(204,0,0,0.7);
}

@keyframes bp-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(204,0,0,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(204,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(204,0,0,0); }
}

.bp-scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.bp-court-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.bp-court-card:hover {
  border-color: var(--bp-red);
  transform: translateY(-2px);
}

.bp-court-img {
  width: 72px;
  min-width: 72px;
  height: 72px;
  overflow: hidden;
  flex-shrink: 0;
  background: #CC0000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.bp-court-img img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.bp-court-info {
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
  border-left: 3px solid var(--bp-red);
}

.bp-court-name {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
  font-family: var(--bp-font);
}

.bp-court-event {
  color: #555;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--bp-font);
}

.bp-court-badge {
  background: rgba(204,0,0,0.12);
  border: 1px solid rgba(204,0,0,0.25);
  color: var(--bp-red);
  font-size: 8px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--bp-font);
}

.bp-court-dot {
  width: 5px;
  height: 5px;
  background: var(--bp-red);
  border-radius: 50%;
  display: inline-block;
  animation: bp-pulse 1.5s infinite;
  flex-shrink: 0;
}

/* Modal */
.bp-score-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.bp-score-overlay.open {
  display: flex;
}

.bp-score-modal {
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--bp-red);
  width: 660px;
  max-width: 95vw;
}

.bp-score-modal-header {
  background: var(--bp-red);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bp-score-modal-title {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bp-font);
}

.bp-score-modal-close {
  background: rgba(0,0,0,0.3);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-score-modal-close:hover {
  background: rgba(0,0,0,0.5);
}

.bp-score-modal-frame {
  width: 100%;
  height: 320px;
}

.bp-score-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .bp-scores-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .bp-score-overlay {
    padding: 0;
  }

  .bp-score-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 100vh;
    height: 100vw;
    max-width: none;
    border-radius: 0;
    border: none;
  }

  .bp-score-modal-header {
    padding: 8px 12px;
  }

  .bp-score-modal-frame {
    height: calc(100vw - 44px);
  }

  .bp-score-modal-frame iframe {
    width: 100vh;
    height: 100%;
  }
}