@import url("./glass.css");

:root {
  --shell-bg: #f3efe6;
  --shell-text: #2b2b28;
  --shell-muted: #55554f;
  --shell-border: #e3ddcf;
  --shell-tabbar-h: 3.25rem;
  --shell-sidebar-w: 5.5rem;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --line-height-body: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.app-shell {
  margin: 0;
  min-height: 100dvh;
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: var(--font-sans);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-shell h1,
body.app-shell h2,
body.app-shell h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

body.app-shell.videos-theme {
  --shell-bg: #000;
  --shell-text: #fff;
  --shell-muted: rgba(255, 255, 255, 0.72);
  --shell-border: rgba(255, 255, 255, 0.12);
  background: #000;
  color: #fff;
}

.app-layout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: var(--tabbar-occupied);
}

body.videos-theme .app-main {
  padding-bottom: 0;
  overflow: hidden;
}

.app-sidebar {
  display: none;
}

.app-tabbar {
  position: fixed;
  left: var(--tabbar-float-inset);
  right: var(--tabbar-float-inset);
  bottom: calc(var(--tabbar-float-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  height: var(--shell-tabbar-h);
  padding-bottom: 0;
  border-radius: 999px;
  border-top: 0;
}

.app-tabbar__list,
.app-sidebar__list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--shell-tabbar-h);
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.app-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.125rem;
  height: 3.125rem;
  color: var(--shell-muted);
  text-decoration: none;
  border-radius: 0.85rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.app-nav-item:hover {
  color: var(--shell-text);
}

body.videos-theme .app-nav-item:hover {
  color: #fff;
}

.app-nav-item svg,
.app-nav-item .app-nav-icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.app-nav-item.is-active {
  color: var(--shell-text);
}

.app-nav-item.is-active svg,
.app-nav-item.is-active .app-nav-icon {
  stroke-width: 2.1;
}

body.videos-theme .app-nav-item.is-active {
  color: #fff;
}

/* Home is always identifiable — stronger ring than other nav items */
.app-nav-item--home {
  color: var(--shell-text);
  box-shadow:
    0 0 0 1.5px rgba(43, 43, 40, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.app-nav-item--home:hover {
  box-shadow:
    0 0 0 1.75px rgba(43, 43, 40, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

body.videos-theme .app-nav-item--home {
  color: #fff;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}

body.videos-theme .site-footer {
  display: none;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--shell-muted);
}

.site-footer__links a,
.site-footer__cookie-btn {
  color: inherit;
}

.site-footer__cookie-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.site-footer__cookie-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.login-wall {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: calc(100dvh - var(--tabbar-occupied));
}

body.videos-theme .login-wall {
  color: #fff;
}

.login-wall__logo {
  border-radius: 1rem;
}

.login-wall__title {
  margin: 0;
  font-size: 1.35rem;
}

.login-wall__text {
  margin: 0;
  max-width: 20rem;
  color: var(--shell-muted);
  line-height: 1.5;
}

body.videos-theme .login-wall__text {
  color: rgba(255, 255, 255, 0.72);
}

.login-wall__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: #4d5ee1;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.wip-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.wip-page h1 {
  margin: 0;
  font-size: 1.35rem;
}

.wip-page p {
  margin: 0;
  color: var(--shell-muted);
  max-width: 22rem;
}

@media (min-width: 768px) {
  .app-layout {
    flex-direction: row;
  }

  .app-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    width: var(--shell-sidebar-w);
    height: auto;
    z-index: 100;
    border-right: 0;
    border-radius: 0 0 1.15rem 0;
  }

  .app-sidebar__list {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    height: auto;
    max-width: none;
    padding: 1.25rem 0.5rem 1rem;
  }

  .app-sidebar__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    margin: 0 0 1.25rem;
    padding: 0.35rem 0.4rem;
    border-radius: 0.65rem;
    box-sizing: border-box;
  }

  body.videos-theme .app-sidebar__logo {
    background: rgba(255, 255, 255, 0.92);
  }

  .app-sidebar__logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 2rem;
    object-fit: contain;
    object-position: center;
  }

  .app-tabbar {
    display: none;
  }

  .app-main {
    margin-left: var(--shell-sidebar-w);
    min-height: 100dvh;
    padding-bottom: 0;
  }

  body.videos-theme .app-main {
    padding-bottom: 0;
  }
}
