/* The look of the Student site (student5): the colors of its app-shell, and its app-toolbar,
   paper-card and raised paper-button, in plain CSS. Every page links it. */

:root {
  /* student5's app-shell.component.js */
  --app-text-color: #333333;
  --app-reverse-text-color: #ffffff;
  --app-main-color: #0046a9;
  --app-secondary-color: #4285f4;
  --app-error-color: #b00020;
  /* Material elevation 2, as paper-card and a raised paper-button use */
  --app-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
    0 3px 1px -2px rgba(0, 0, 0, 0.2);
  --app-shadow-pressed: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12),
    0 5px 5px -3px rgba(0, 0, 0, 0.4);

  /* Cherub's elements (its elements/styles.js) */
  --cherub-accent: var(--app-secondary-color);
  --cherub-accent-text: var(--app-reverse-text-color);
  --cherub-danger: var(--app-error-color);
  --cherub-radius: 3px;
}

[hidden] {
  display: none !important;
}

/* Inter, as Gmail Lite uses: one variable woff2 with the Latin subset, from
   @fontsource-variable/inter 5.3.0 (SIL OFL 1.1, fonts/inter-LICENSE.txt). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

/* student5's index.html */
body {
  margin: 0;
  font-family:
    Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  color: var(--app-text-color);
}

/* In English (www/i18n.js sets <html lang>), Inter, then student5's fonts. */
:root:lang(en) body {
  font-family:
    'Inter', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol';
}

a {
  color: var(--app-secondary-color);
}

.error {
  color: var(--app-error-color);
}

/* app-toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  height: 64px;
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 20px;
  color: var(--app-reverse-text-color);
  background: var(--app-main-color);
  border-bottom: 1px solid var(--app-secondary-color);
}

.toolbar h1 {
  margin: 0;
  font: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar a {
  color: var(--app-reverse-text-color);
  text-decoration: none;
}

/* The title, or the Student Site link, on the left; the rest on the right. */
.toolbar > :first-child {
  margin-right: auto;
}

.toolbar .who {
  font-size: 14px;
}

/* The language switch (www/i18n.js) */
.toolbar .language {
  max-width: 9em;
  padding: 4px 6px;
  font: inherit;
  font-size: 14px;
  color: var(--app-reverse-text-color);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  cursor: pointer;
}

.toolbar .language option {
  color: var(--app-text-color);
  background: #ffffff;
}

/* app-header-layout main */
.page {
  margin: 0 12px;
  padding: 2px 0 12px;
}

/* paper-card, with student5's 5px corners. Its parts are spaced by the gap, so a hidden part
   leaves no space. */
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  max-width: 40rem;
  margin: 10px 0;
  padding: 16px;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: var(--app-shadow);
}

.card > * {
  margin: 0;
}

.card > * > :first-child {
  margin-top: 0;
}

.card > * > :last-child {
  margin-bottom: 0;
}

/* raised paper-button; .primary is student5's #4285f4 button */
button {
  min-width: 5.14em;
  margin: 0 0.29em 0 0;
  padding: 0.7em 0.57em;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.018em;
  text-transform: uppercase;
  color: inherit;
  background: #ffffff;
  border: 0;
  border-radius: 3px;
  box-shadow: var(--app-shadow);
  cursor: pointer;
}

button.primary {
  color: var(--app-reverse-text-color);
  background: var(--app-secondary-color);
}

button:active {
  box-shadow: var(--app-shadow-pressed);
}

button:focus-visible {
  outline: 2px solid var(--app-secondary-color);
  outline-offset: 2px;
}

/* A row of buttons: the first on the left, the last on the right, even when it is alone */
.actions {
  display: flex;
  gap: 0.57em;
}

.actions > button {
  margin: 0;
}

.actions > :last-child {
  margin-left: auto;
}

/* Cherub's buttons, as raised paper-buttons. Their colors come from --cherub-accent. */
cherub-account-picker::part(button),
cherub-account-creation::part(button),
cherub-account-manager::part(button) {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.018em;
  text-transform: uppercase;
  border: 0;
  box-shadow: var(--app-shadow);
}
