/* Small additions on top of Tailwind. Component classes live in partials/tailwind-source.php. */

/* Inter (variable, self-hosted: latin, latin-ext, cyrillic) */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('../vendor/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('../vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('../vendor/fonts/inter-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

.lucide { stroke-width: 1.9; flex-shrink: 0; }

/* Skeleton shimmer */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgb(226 232 240 / .7);
  border-radius: .75rem;
}
.dark .skeleton { background: rgb(30 41 59 / .8); }
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .45), transparent);
  animation: uzd-shimmer 1.4s infinite;
}
.dark .skeleton::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .06), transparent); }
@keyframes uzd-shimmer { 100% { transform: translateX(100%); } }

/* Pulsing status dot (sync badge, live lessons) */
.dot-live { position: relative; }
.dot-live::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: currentColor;
  opacity: .35;
  animation: uzd-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes uzd-ping { 75%, 100% { transform: scale(2); opacity: 0; } }

/* Bottom nav must clear the iPhone home indicator */
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* Thin scrollbars inside panels */
.scroll-thin { scrollbar-width: thin; scrollbar-color: rgb(148 163 184 / .5) transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Grid and flex children may shrink below their content (long names, inputs, button rows),
   otherwise one long line widens the whole page on a 375 px phone. */
.grid > *, .flex-1 { min-width: 0; }
.break-anywhere { overflow-wrap: anywhere; }

/* Visible keyboard focus everywhere (links, nav items, sortable headers, summary toggles). */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input[type="checkbox"]:focus-visible {
  outline: 2px solid #2ea3f7; outline-offset: 2px; border-radius: .5rem;
}
.skip-link { position: absolute; left: .75rem; top: -3rem; z-index: 100; padding: .5rem .9rem; border-radius: .6rem; background: #0e74cf; color: #fff; font-weight: 600; font-size: .875rem; transition: top .15s; }
.skip-link:focus { top: .75rem; }

/* Navigation feedback: progress bar + skeleton over the content while the next page loads. */
.nav-progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 90; background: linear-gradient(90deg, #0e74cf, #2ea3f7); opacity: 0; transition: opacity .2s; }
.is-navigating .nav-progress { opacity: 1; animation: uzd-progress 8s cubic-bezier(.1,.8,.2,1) forwards; }
@keyframes uzd-progress { from { width: 0; } 10% { width: 35%; } to { width: 92%; } }
.nav-skeleton { display: none; position: absolute; inset: 0; z-index: 30; padding: inherit; background: rgb(248 250 252); }
.dark .nav-skeleton { background: rgb(2 6 23); }
.is-navigating .nav-skeleton { display: block; }
@media (prefers-reduced-motion: reduce) { .is-navigating .nav-progress { animation: none; width: 60%; } .skeleton::after { animation: none; } }

/* Legal pages */
.legal h2 { font-size: 1.05rem; font-weight: 700; color: rgb(15 23 42); margin-top: 1.75rem; }
.dark .legal h2 { color: #fff; }
.legal ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: .35rem; margin-top: .5rem; }
.legal a { color: #0e74cf; text-decoration: underline; text-underline-offset: 2px; }
