/* Court Command Navigation Chrome
   Mirrors the React Sidebar.tsx and PublicBottomTabs.tsx styling exactly */

:root {
  --cc-nav-bg: #0f172a;         /* bg-(--color-bg-sidebar) */
  --cc-nav-border: rgba(148, 163, 184, 0.1); /* border-(--color-border) */
  --cc-nav-text: #94a3b8;       /* text-(--color-text-secondary) */
  --cc-nav-text-hover: #e2e8f0; /* text-(--color-text-primary) */
  --cc-nav-accent: #22d3ee;     /* text-cyan-400 */
  --cc-nav-hover-bg: rgba(148, 163, 184, 0.08); /* bg-(--color-bg-hover) */
  --cc-nav-active-bg: rgba(34, 211, 238, 0.1);  /* bg-cyan-500/10 */
  --cc-sidebar-width: 220px;
}

/* === Sidebar (Desktop) === */
.cc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--cc-sidebar-width);
  background: var(--cc-nav-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid var(--cc-nav-border);
}

/* Header — matches h-14 border-b */
.cc-sidebar__header {
  display: flex;
  align-items: center;
  height: 3.5rem;           /* h-14 = 56px */
  padding: 0 1rem;          /* px-4 */
  border-bottom: 1px solid var(--cc-nav-border);
}

.cc-sidebar__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.cc-sidebar__logo-img {
  height: 1.5rem;           /* h-6 */
}

/* Nav area — matches flex-1 overflow-y-auto py-2 px-2 */
.cc-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;          /* py-2 px-2 */
}

/* Group label — matches px-3 mb-1 text-[10px] font-semibold uppercase tracking-wider */
.cc-sidebar__group-label {
  padding: 0.75rem 0.75rem 0.25rem;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cc-nav-text);
}

/* Link — matches flex items-center gap-3 rounded-lg px-3 py-2 text-sm */
.cc-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;             /* gap-3 */
  padding: 0.5rem 0.75rem;  /* py-2 px-3 */
  border-radius: 0.5rem;    /* rounded-lg */
  color: var(--cc-nav-text);
  text-decoration: none;
  font-size: 0.875rem;      /* text-sm */
  transition: all 0.15s;
}

.cc-sidebar__link:hover {
  background: var(--cc-nav-hover-bg);
  color: var(--cc-nav-text-hover);
}

/* Active link — matches bg-cyan-500/10 text-cyan-400 font-medium */
.cc-sidebar__link--active {
  background: var(--cc-nav-active-bg);
  color: var(--cc-nav-accent);
  font-weight: 500;
}

.cc-sidebar__link--active:hover {
  background: var(--cc-nav-active-bg);
  color: var(--cc-nav-accent);
}

/* Sign in link — matches text-cyan-400 hover:bg-cyan-500/10 */
.cc-sidebar__link--signin {
  color: var(--cc-nav-accent);
  font-weight: 500;
}

.cc-sidebar__link--signin:hover {
  background: var(--cc-nav-active-bg);
}

/* Icon sizing — matches h-5 w-5 shrink-0 */
.cc-sidebar__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.cc-sidebar__label {
  white-space: nowrap;
}

/* Footer — matches border-t border-(--color-border) p-2 */
.cc-sidebar__footer {
  border-top: 1px solid var(--cc-nav-border);
  padding: 0.5rem;
}

/* === Header (Mobile + Desktop) === */
.cc-header {
  background: var(--cc-nav-bg);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cc-nav-border);
}

.cc-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.cc-header__logo-icon {
  height: 1.75rem;
  width: 1.75rem;
}

.cc-header__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cc-nav-text-hover);
}

.cc-header__accent {
  color: var(--cc-nav-accent);
}

/* === Category Tabs === */
.cc-category-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--cc-nav-bg);
  border-bottom: 1px solid var(--cc-nav-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cc-category-tabs__tab {
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cc-nav-text);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.cc-category-tabs__tab:hover {
  background: var(--cc-nav-hover-bg);
  color: var(--cc-nav-text-hover);
}

.cc-category-tabs__tab--active {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cc-nav-accent);
}

/* === Bottom Nav (Mobile) === */
.cc-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cc-nav-bg);
  border-top: 1px solid var(--cc-nav-border);
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  z-index: 100;
}

.cc-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  color: var(--cc-nav-text);
  text-decoration: none;
  font-size: 0.625rem;
  transition: color 0.15s;
}

.cc-bottom-nav__item:hover,
.cc-bottom-nav__item--active {
  color: var(--cc-nav-accent);
}

.cc-bottom-nav__icon {
  width: 1.375rem;
  height: 1.375rem;
}

.cc-bottom-nav__label {
  font-size: 0.625rem;
  font-weight: 500;
}

/* === Ghost Content Width Classes === */
.gh-content .kg-width-wide {
  margin-left: -4rem;
  margin-right: -4rem;
  max-width: calc(100% + 8rem);
}

.gh-content .kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

/* === Layout === */
.cc-layout {
  display: flex;
  min-height: 100vh;
}

.cc-layout__main {
  flex: 1;
  margin-left: var(--cc-sidebar-width);
}

/* === Responsive === */
@media (max-width: 767px) {
  .cc-sidebar {
    display: none;
  }

  .cc-bottom-nav {
    display: flex;
    justify-content: space-around;
  }

  .cc-layout__main {
    margin-left: 0;
    padding-bottom: 4rem;
  }

  .gh-content .kg-width-wide {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
  }
}

/* === Base Reset (keep Ghost content clean) === */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
