/*
 * Rizes styles beyond Bootstrap. Keep this small (docs/guidelines/coding.md).
 * Colours live in theme.css.
 */

/* Noto Sans with Latin and Greek, served from our own server (D-022). */
@font-face {
  font-family: "Noto Sans";
  src: url("../vendor/noto-sans/NotoSans-LatinGreek.d9e4e253c98b.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bs-body-font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --bs-body-line-height: 1.6;
}

/*
 * Larger text for older members: 18 px instead of the browser's usual 16 px.
 * A percentage still respects a larger text size chosen in the browser, and
 * Bootstrap's spacing, buttons and headings grow with it.
 */
html {
  font-size: 112.5%;
}

/*
 * Big enough to tap comfortably on a phone (at least 2.75rem, about 50 px).
 * Buttons and links get there with a little more padding, which keeps single-line
 * text centred without changing how their contents are laid out.
 */
.btn:not(.btn-sm, .btn-lg) {
  --bs-btn-padding-y: 0.6rem;
}

.nav-link {
  --bs-nav-link-padding-y: 0.625rem;
}

/* Language buttons (EN / ΕΛ): compact in width, full height for easy tapping. */
.language-option {
  --bs-btn-padding-x: 0.85rem;
  min-width: 3rem;
  font-weight: 600;
}

.form-control,
.form-select {
  min-height: 2.75rem;
}

/* A clearly visible outline for keyboard users. */
:focus-visible {
  outline: 3px solid var(--rizes-primary);
  outline-offset: 2px;
}

/* "Skip to main content" link: hidden until reached with the keyboard. */
.skip-link:focus {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1080;
  padding: 0.5rem 1rem;
  background-color: var(--bs-body-bg);
  color: var(--rizes-primary);
}

/* The main area receives focus from the skip link; no outline needed there. */
main:focus {
  outline: none;
}

/* htmx loading indicators. htmx normally adds these rules itself, in a <style>
   element the Content Security Policy blocks (base.html switches that off). */
.htmx-indicator {
  opacity: 0;
  visibility: hidden;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease-in;
}
