/* ============================================================
   Fimmtudagsbolti í Fífunni — Custom styles
   (Tailwind CDN handles utilities; this fills the gaps)
   ============================================================ */

/* Custom font — Inter from Google Fonts
   To revert: remove this block and the <link> tags in each HTML file */
body, button, input, select, textarea {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* Safe area padding for iOS notch / home indicator */
body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Bottom nav clears the home indicator on iOS */
.bottom-nav {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

/* Smooth page transitions */
.page-enter {
  animation: fadeSlideUp 0.2s ease-out;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card tap highlight on mobile */
.card-tap {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Badge for "Team A / Team B" splits */
.badge-a { background-color: #059669; }   /* emerald-600 */
.badge-b { background-color: #2563eb; }   /* blue-600    */

/* Rank stars — coloured dots */
.rank-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.rank-1 { background: #94a3b8; }   /* slate */
.rank-2 { background: #22d3ee; }   /* cyan   */
.rank-3 { background: #facc15; }   /* yellow */
.rank-4 { background: #f97316; }   /* orange */
.rank-5 { background: #ef4444; }   /* red    */

/* View-mode banner */
.player-view-banner {
  background: #1d4ed8;  /* blue-700 */
  font-size: 0.75rem;
  text-align: center;
  padding: 4px 0;
  letter-spacing: 0.05em;
}

/* Scrollable list without visible scrollbar on iOS */
.scroll-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar { width: 0; }

/* ── Desktop sidebar layout ────────────────────────────────── */
#sidebar { display: none; }

@media (min-width: 768px) {
  #sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0;
    height: 100%;
    width: 240px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    z-index: 30;
    transition: transform 0.2s ease;
  }
  #main-wrapper {
    margin-left: 240px;
    transition: margin-left 0.2s ease;
  }
  body[data-sidebar="collapsed"] #sidebar {
    transform: translateX(-240px);
  }
  body[data-sidebar="collapsed"] #main-wrapper {
    margin-left: 0;
  }
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #94a3b8;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
  }
  .sidebar-link:hover {
    background: #1e293b;
    color: #fff;
  }
  .sidebar-link.active {
    background: #1e293b;
    color: #34d399;
    font-weight: 600;
  }

  /* Page title in header — hidden by default on desktop, shown when sidebar is collapsed */
  .collapsed-page-title { display: none !important; }
  body[data-sidebar="collapsed"] .collapsed-page-title { display: block !important; }
}
