/* SK Badminton mobile admin/coach shell */

:root {
  --sk-shell-bg: #f6f8fb;
  --sk-shell-card: #ffffff;
  --sk-shell-border: rgba(15, 23, 42, .10);
  --sk-shell-text: #0f172a;
  --sk-shell-muted: #64748b;
  --sk-shell-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  --sk-shell-radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--sk-shell-bg);
}

.card,
.list-group-item,
.border.rounded {
  border-color: var(--sk-shell-border) !important;
}

.text-muted,
.form-text,
.small.text-muted {
  color: var(--sk-shell-muted) !important;
  opacity: 1 !important;
}

.sk-mobile-bottom-nav {
  display: none;
}

/* Let desktop content use more of wide screens while keeping a clear gutter. */
@media (min-width: 1200px) {
  .container {
    max-width: min(94vw, 1600px);
  }
}

/* Better desktop/laptop cards too, but very light */
.card {
  border-radius: 14px;
}

/* Mobile-first admin/coach polish */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .container,
  .container-fluid {
    max-width: 100% !important;
    padding-left: .85rem !important;
    padding-right: .85rem !important;
  }

  h1,
  .h1 {
    font-size: 1.45rem !important;
    line-height: 1.2;
  }

  h2,
  .h2 {
    font-size: 1.25rem !important;
  }

  h3,
  .h3 {
    font-size: 1.12rem !important;
  }

  .h4,
  h4 {
    font-size: 1.05rem !important;
  }

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  }

  .card,
  .card-touch,
  .booking-card,
  .att-stickybar,
  .list-group-item,
  .border.rounded {
    border-radius: var(--sk-shell-radius) !important;
  }

  .card {
    box-shadow: var(--sk-shell-shadow);
    overflow: hidden;
  }

  .card-header {
    padding: .9rem 1rem !important;
    background: rgba(248, 250, 252, .92) !important;
  }

  .card-body {
    padding: 1rem !important;
  }

  .btn,
  .form-control,
  .form-select {
    border-radius: 13px !important;
  }

  .form-control,
  .form-select,
  input,
  select,
  textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
  }

  .btn-sm {
    min-height: 38px;
    padding: .48rem .72rem !important;
  }

  .d-flex.gap-2.flex-wrap .btn,
  .d-flex.gap-2.flex-wrap form,
  .d-flex.gap-2.flex-wrap a {
    max-width: 100%;
  }

  .table-responsive,
  .sk-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
  }

  table.table {
    font-size: .88rem;
    white-space: nowrap;
  }

  .alert {
    border-radius: 15px;
  }

  .badge {
    border-radius: 999px;
  }

  .dropdown-menu {
    border-radius: 15px;
    box-shadow: var(--sk-shell-shadow);
  }

  .sk-mobile-bottom-nav {
    position: fixed;
    left: .65rem;
    right: .65rem;
    bottom: calc(.55rem + env(safe-area-inset-bottom));
    z-index: 1055;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .35rem;
    padding: .5rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  }

  .sk-mobile-bottom-nav a {
    text-decoration: none;
    color: #334155;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.05;
    min-height: 48px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .16rem;
  }

  .sk-mobile-bottom-nav a span:first-child {
    font-size: 1.1rem;
    line-height: 1;
  }

  .sk-mobile-bottom-nav a.sk-active {
    background: #0d6efd;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(13, 110, 253, .28);
  }

  .sk-mobile-bottom-nav a:active {
    transform: scale(.98);
  }

  .hide-mobile,
  .hide-xs {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .sk-mobile-only {
    display: none !important;
  }
}

/* Dark mode support if device is dark */
@media (prefers-color-scheme: dark) {
  body {
    background: #0f172a;
  }

  .sk-mobile-bottom-nav {
    background: rgba(15, 23, 42, .96);
    border-color: rgba(255, 255, 255, .14);
  }

  .sk-mobile-bottom-nav a {
    color: #cbd5e1;
  }
}

/* =========================================================
   Public page top duplicate button cleanup
   Keeps main black navbar, removes extra pill nav row
   ========================================================= */

/* Hide duplicate pill nav row on public pages */
main .container > .d-flex.justify-content-end:has(a[href="/"]):has(a[href*="sessions"]),
main .container > .d-flex.justify-content-end:has(a[href*="sessions"]):has(a[href*="events"]),
main .container > .d-flex.justify-content-end:has(a[href*="login"]),
.public-page-actions,
.public-quick-nav,
.public-top-actions,
.home-pill-nav,
.hero-actions,
.session-pill-nav {
  display: none !important;
}

/* Better spacing after removing duplicate buttons */
main .container {
  padding-top: 1.5rem;
}

/* Desktop title/filter cleanup */
@media (min-width: 768px) {
  main h1,
  main .h1 {
    font-size: clamp(2.2rem, 3vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.9rem;
  }

  main form.d-flex,
  main .filters-row {
    gap: 0.6rem;
    align-items: center;
  }
}

/* Mobile navbar and page heading cleanup */
@media (max-width: 767.98px) {
  .navbar {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .navbar-brand {
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
  }

  main .container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    padding-top: 1rem;
  }

  main h1,
  main .h1 {
    font-size: 1.8rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
  }

  main select,
  main input,
  main .form-select,
  main .form-control {
    min-height: 44px;
    font-size: 1rem;
  }

  main .btn {
    min-height: 44px;
  }
}

/* Public mobile bottom navigation polish */
@media (max-width: 767.98px) {
  .sk-role-bottom-final {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    border-radius: 20px !important;
    padding: 8px !important;
    gap: 6px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .24) !important;
  }

  .sk-role-bottom-final a {
    border-radius: 16px !important;
    padding: 8px 6px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    min-height: 48px !important;
  }

  .sk-role-bottom-final a span:first-child {
    font-size: 18px !important;
    margin-bottom: 2px !important;
  }

  body {
    padding-bottom: 82px;
  }
}

/* Force hide wrong mobile Home/Public button for logged-in coach/admin navigation */
@media (max-width: 767.98px) {
  .sk-role-bottom-final a[href="/"],
  .sk-role-bottom-final a[href="/sessions/calendar"],
  .sk-mobile-bottom a[href="/"],
  .sk-mobile-bottom a[href="/sessions/calendar"],
  .sk-bottom-nav a[href="/"],
  .sk-bottom-nav a[href="/sessions/calendar"] {
    display: none !important;
  }
}

/* Hide Home button from clean mobile bottom nav */
@media (max-width: 767.98px) {
  #skCleanMobileBottomNav a:first-child {
    display: none !important;
  }
}

/* Hide Home button from clean mobile bottom nav */
@media (max-width: 767.98px) {
  #skCleanMobileBottomNav a:first-child {
    display: none !important;
  }
}
