/*
  FPLSpotz — Base App Shell
  Shared layout primitives used by Public / Owner / Admin portals.
*/

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-body);
}

body {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

::-webkit-scrollbar { width: 0; height: 0; }

.app-shell {
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, rgba(214, 255, 63, 0.10), transparent 55%), var(--color-bg);
  padding: 24px 16px calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-accent);
  text-transform: uppercase;
}

h1, .h1 { font-family: var(--font-display); font-size: var(--fs-h1); color: var(--color-text); margin: 8px 0; }
h2, .h2 { font-family: var(--font-display); font-size: var(--fs-h2); color: var(--color-text); }

.text-muted { color: var(--color-text-muted); }

.panel {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
  padding: var(--space-3);
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-body);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--color-accent); color: #14150F; }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-danger { background: var(--color-danger); color: #1A1B1D; }

.input, select.input, textarea.input {
  width: 100%;
  background: #16171A;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  color: var(--color-text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.badge {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.badge-live { background: rgba(214,255,63,.15); color: var(--color-accent); }
.badge-sold { background: rgba(74,222,128,.15); color: var(--color-success); }
.badge-pending { background: rgba(255,92,92,.15); color: var(--color-danger); }

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Placeholder shown when a player/team has no photo yet — a subtle silhouette
   instead of a blank black rectangle. Add the class to an empty div sized like
   the image it stands in for. */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #202225, #16171A);
  color: rgba(242, 244, 240, 0.22);
}
.photo-placeholder svg { width: 42%; height: 42%; }

/* App-wide copyright footer — sits at the end of scrollable content, above the fixed nav */
.app-footer {
  text-align: center;
  padding: 24px 16px 8px;
  margin-top: 12px;
}
.app-footer a {
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.app-footer a:hover { color: var(--color-accent); }

/* Bottom nav — reused by Public and Admin (different item sets) */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--color-text-muted);
  font-size: 11px;
}
.bottom-nav a.active { color: var(--color-accent); }
.bottom-nav svg { width: 24px; height: 24px; display: block; }

/* Confirmation dialog / modal (used for Confirm Sold, Delete, etc.) */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
}
.modal-panel {
  background: var(--color-panel);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  padding: var(--space-4);
  width: 100%; max-width: 480px;
  animation: popupPop 0.25s ease-out;
}
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .modal-panel { border-radius: var(--radius-card); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .pulse-dot, .modal-panel { animation: none; }
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
