/* =============================================
   Ladder standings / public page styles.
   Extracted from the inline <style> blocks in
   templates/public/ladder_standings.html.
   Loaded via {% block head_extra %} on that page only.
   ============================================= */

/* ── Page-scoped icon sizes ── */
.ld-icon-16 { width: 16px; height: 16px; }
.ld-icon-20 { width: 20px; height: 20px; }
.ld-icon-24 { width: 24px; height: 24px; }

.dashboard-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 280px;
}
.dashboard-hero--has-image { grid-template-columns: 1fr 400px; }

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 400px; height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-30%, -30%);
}

.hero-content {
    position: relative; z-index: 1;
    padding: 2.5rem;
    display: flex; flex-direction: column; justify-content: center;
}

.hero-image {
    position: relative; width: 100%; height: 100%; overflow: hidden;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(26,58,82,0.3) 0%, transparent 100%);
}

.status-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 20px;
    font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem;
}
.status--active { background: var(--t-status-success-bg); color: var(--t-status-success-text); border: 2px solid var(--t-status-success-border); }
.status--inactive { background: var(--t-surface-elevated); color: var(--t-text-muted); border: 2px solid var(--t-border); }

.hero-title { font-size: 2.5rem; font-weight: 800; margin: 0 0 1rem 0; }
.hero-meta-row { display: flex; flex-wrap: wrap; gap: 2rem; font-size: 1rem; opacity: 0.95; }
.hero-meta-item { display: flex; align-items: center; gap: 0.5rem; }
.hero-chevron-muted { opacity: 0.6; }

/* ── Registration CTA badges ── */
.ld-reg-opens-badge {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin-top: 1.5rem; padding: 0.8rem 2rem;
    background: rgba(245,158,11,0.15); color: #d97706;
    font-weight: 700; font-size: 1rem; border-radius: 10px;
    border: 1px solid rgba(245,158,11,0.3);
}
.ld-register-now-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin-top: 1.5rem; padding: 0.8rem 2rem;
    background: var(--mint); color: #fff;
    font-weight: 700; font-size: 1rem; border-radius: 10px;
    text-decoration: none; transition: opacity 0.15s;
}
.ld-registered-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 1.5rem; padding: 0.6rem 1.4rem;
    background: rgba(16,185,129,0.2); color: #10b981;
    font-weight: 600; font-size: 0.9rem; border-radius: 8px;
    border: 1px solid rgba(16,185,129,0.4);
}

/* ── Event details card ── */
.event-details-card {
    background: var(--t-surface-elevated);
    border: 1px solid var(--t-border);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ld-description {
    font-size: 1rem; line-height: 1.65; color: var(--t-text);
    margin: 0 0 1.25rem 0; white-space: pre-line;
}
.ld-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem 2rem;
}
.ld-detail-item { display: flex; align-items: flex-start; gap: 0.6rem; }
.ld-detail-icon { width: 18px; height: 18px; color: var(--mint); flex-shrink: 0; margin-top: 2px; }
.ld-detail-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--t-text-secondary); margin-bottom: 2px;
}
.ld-detail-value { font-size: 0.92rem; color: var(--t-text); }
.ld-spots-warning { color: #d97706; font-weight: 600; }
.ld-registered-count {
    margin-top: 1.25rem; padding-top: 1rem;
    border-top: 1px solid var(--t-border);
    font-size: 0.9rem; color: var(--t-text);
    display: flex; align-items: center; gap: 0.5rem;
}

/* ── Stats grid ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem; margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--t-surface); padding: 2rem; border-radius: 16px;
    box-shadow: var(--t-card-shadow, 0 4px 6px -1px rgba(0,0,0,0.1));
    text-align: center; transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--mint);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.stat-icon {
    width: 48px; height: 48px; margin: 0 auto 1rem; padding: 12px;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.stat-icon--primary { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); }
.stat-icon--secondary { background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%); }
.stat-icon i, .stat-icon svg { color: white; }
.stat-value { font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; color: var(--t-text); }
.stat-label { color: var(--t-text-muted); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Rankings card ── */
.content-card {
    background: var(--t-surface); padding: 2rem; border-radius: 16px;
    box-shadow: var(--t-card-shadow, 0 4px 6px -1px rgba(0,0,0,0.1));
    border: 1px solid var(--t-border); margin-bottom: 2rem;
}
.card-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.5rem; padding-bottom: 1rem;
    border-bottom: 2px solid var(--t-border);
}
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--t-heading); margin: 0; }

/* ── Rankings header ── */
.lsd-rankings-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem;
}
.lsd-session-filter { display: flex; align-items: center; gap: 0.5rem; }
.lsd-session-filter label { font-size: 0.85rem; opacity: 0.7; white-space: nowrap; }
.lsd-session-filter select { width: auto; min-width: 160px; padding: 0.3rem 0.5rem; font-size: 0.85rem; }

.lsd-session-link { color: var(--t-text); text-decoration: none; }
.lsd-session-link:hover { color: var(--mint); }

/* ── Next session card ── */
.next-session-card {
  background: linear-gradient(135deg, var(--brand-accent, #75c9a7) 0%, var(--accent-dark, #4ea683) 100%);
  color: white;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem;
}
.next-session-card--out {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}
.next-session-card .ns-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; opacity: 0.85; margin-bottom: 0.3rem;
}
.next-session-card .ns-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.4rem; }
.next-session-card .ns-meta {
  display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; opacity: 0.95;
}
.next-session-card .ns-meta-item {
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.next-session-card .ns-actions {
  display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end;
}
.ns-btn-primary {
  background: white; color: var(--accent-dark, #4ea683); border: none;
  padding: 0.5rem 1rem; border-radius: 8px;
  font-weight: 600; font-size: 0.85rem;
  text-decoration: none; white-space: nowrap;
}
.ns-btn-primary:hover { background: rgba(255,255,255,0.92); }
.ns-im-out-form { margin: 0; }
.ns-btn-out {
  background: rgba(255,255,255,0.18); color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.45rem 0.9rem; border-radius: 8px;
  font-weight: 500; font-size: 0.8rem; cursor: pointer;
  white-space: nowrap;
}
.ns-btn-out:hover { background: rgba(255,255,255,0.28); }
.ns-out-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.18); color: white;
  border-radius: 8px; padding: 0.4rem 0.8rem;
  font-size: 0.78rem; font-weight: 500;
}

/* ── Provisional standings rows ── */
.standings-table tr.standings-provisional-divider td {
  background: var(--t-surface);
  border-top: 2px solid var(--t-border);
  font-size: 0.85rem;
  color: var(--t-text-muted);
  padding: 0.6rem 0.85rem;
  letter-spacing: 0.02em;
}
.standings-table tr.standings-provisional-divider strong {
  color: var(--t-text);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.standings-provisional-hint { margin-left: 0.4rem; }
.standings-table tr.standings-provisional-row td { opacity: 0.78; }
.standings-table tr.standings-provisional-row:hover td { opacity: 1; }
.standings-provisional-progress {
  color: var(--t-text-muted);
  font-size: 0.78rem;
  font-weight: 400;
  margin-left: 0.15rem;
}

/* ── Responsive ── */
@media (max-width: 968px) {
    .dashboard-hero { grid-template-columns: 1fr !important; min-height: auto; }
    .hero-content { padding: 2rem; }
    .hero-image { display: none; }
    .stat-grid { grid-template-columns: 1fr !important; }
    .stat-value { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .lsd-rankings-header { flex-direction: column; align-items: flex-start; }
    .standings-table .col-movement,
    .standings-table .col-sessions,
    .standings-table .col-winpct { display: none; }
    .lsd-session-filter { width: 100%; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .lsd-session-filter select { width: 100%; min-width: 0; }
}

@media (max-width: 700px) {
  .next-session-card { grid-template-columns: 1fr; }
  .next-session-card .ns-actions { align-items: stretch; flex-direction: row; }
  .ns-btn-primary, .ns-btn-out { flex: 1; text-align: center; justify-content: center; display: inline-flex; align-items: center; }
}
