/* Shared accessibility button and cookie choice. Colors are written out so the
   homepage and the Academy render the same control. */

.a11y-btn {
  position: fixed;
  inset-inline-end: 14px;
  inset-block-end: calc(14px + env(safe-area-inset-bottom));
  z-index: 45;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #1f63ff;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
  cursor: pointer;
  padding: 0;
}
.a11y-btn svg { inline-size: 26px; block-size: 26px; }
.a11y-btn:hover { background: #3d7bff; }
html:has(.dock.is-on) .a11y-btn { inset-block-end: calc(78px + env(safe-area-inset-bottom)); }
.a11y-panel {
  position: fixed;
  inset-inline-end: 14px;
  inset-block-end: calc(72px + env(safe-area-inset-bottom));
  z-index: 46;
  inline-size: min(290px, 100vw - 28px);
  max-block-size: calc(100svh - 100px);
  overflow: auto;
  padding: 14px 16px 16px;
  color: #eef1f6;
  background: #0b1120;
  border: 1px solid rgba(238, 241, 246, .22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
html:has(.dock.is-on) .a11y-panel { inset-block-end: calc(136px + env(safe-area-inset-bottom)); }
.a11y-panel__head { display: flex; justify-content: space-between; align-items: center; }
.a11y-panel__head h2, .a11y-panel__title { margin: 0; font-weight: 900; font-size: 20px; }
.a11y-panel__list { list-style: none; display: grid; gap: 6px; margin: 8px 0 0; padding: 0; }
.a11y-panel__list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  min-block-size: 46px;
  padding: 8px 12px;
  text-align: start;
  font-weight: 700;
  font-size: 16px;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(238, 241, 246, .22);
  cursor: pointer;
}
.a11y-panel__list button::after { content: "כבוי"; content: "כבוי" / ""; flex: none; font-weight: 500; font-size: 14px; color: #c9d0dc; }
.a11y-panel__list button[aria-pressed="true"] { color: #04060a; background: #eef1f6; border-color: #eef1f6; }
.a11y-panel__list button[aria-pressed="true"]::after { content: "פעיל"; content: "פעיל" / ""; color: #04060a; }
.a11y-panel__note { min-block-size: 1.4em; margin: 8px 0 0; font-size: 14px; color: #c9d0dc; }
.a11y-panel__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; }
.a11y-panel__foot .link, .a11y-panel__foot a { font-size: 15px; color: inherit; }

html.a11y-contrast, html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-big body { font-size: 20px; }
@media (min-width: 900px) { html.a11y-big body { font-size: 21px; } }
html.a11y-links a, html.a11y-links .link { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; outline: 2px solid #ffd400; outline-offset: 2px; }
html.a11y-font :is(body, h1, h2, h3, h4, p, li, a, button, span, b, strong, em, label, input, summary, small) {
  font-family: Arial, "Arial Hebrew", Helvetica, sans-serif !important;
  letter-spacing: normal;
}
.consent {
  position: fixed;
  z-index: 40;
  inset-inline: 12px 76px;
  inset-block-end: calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
html:has(.dock.is-on) .consent { inset-block-end: calc(76px + env(safe-area-inset-bottom)); }
html.is-locked .consent { display: none !important; }
.consent[hidden],
.consent [hidden] { display: none !important; }
.consent__card {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  max-inline-size: 1120px;
  margin-inline: auto;
  overflow: hidden;
  padding: 8px 12px;
  color: #eef1f6;
  background: #0b1120;
  border: 1px solid rgba(238, 241, 246, .22);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.consent__card:not(:has(.consent__actions[hidden])) { max-block-size: 64px; }
.consent__card:has(.consent__actions[hidden]) {
  flex-direction: column;
  align-items: stretch;
  max-block-size: min(520px, calc(100svh - 32px));
  overflow: auto;
  padding: 14px 16px;
}
.consent__card:has(.consent__actions[hidden]) .consent__brief { display: none; }
.consent__copy { flex: 1 1 auto; min-inline-size: 0; }
.consent__card:not(:has(.consent__actions[hidden])) :is(.consent__title, .consent__note) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.consent__card h2, .consent__title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 900; }
.consent__card h2:focus, .consent__title:focus { outline: none; }
.consent__lead, .consent__note { margin: 6px 0 0; color: #c9d0dc; font-size: 14.5px; line-height: 1.45; }
.consent__note a { color: inherit; }
.consent__actions { display: flex; flex-wrap: nowrap; gap: 8px; flex: 0 0 auto; margin: 0; }
.consent__btn {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0 12px;
  white-space: nowrap;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #eef1f6;
  background: transparent;
  border: 1px solid rgba(238, 241, 246, .45);
  border-radius: 12px;
  cursor: pointer;
}
.consent__btn--accept { color: #fff; background: #1f63ff; border-color: #1f63ff; }
.consent__custom { flex: 1 0 100%; margin: 0; }
.consent__custom .consent__actions { flex: none; inline-size: 100%; }
.consent__custom fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.consent__row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; }
.consent__row input { margin-top: 4px; inline-size: 18px; block-size: 18px; }
.consent .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.consent__brief { display: block; margin: 0; color: #dfe5ee; font-size: 14px; line-height: 1.3; }
@media (max-width: 760px) {
  /* The first choice is one row, at most 60px. The preferences form stays the taller dialog.
     The strip steps aside while the dock, the quiz, or the lead form is open. */
  .consent {
    inset-inline: 8px;
    inset-block-end: calc(8px + env(safe-area-inset-bottom));
  }
  /* The phone dock is on from the first screen. The strip sits above it.
     The dock steps aside beside the form, and the strip hides with it.
     A quiz or lead dialog hides the strip as well. */
  html:has(.dock.is-on) .consent { inset-block-end: calc(72px + env(safe-area-inset-bottom)); }
  html.is-near-form .consent,
  html:has(dialog.warm[open]) .consent,
  html:has(dialog.sheet[open]) .consent { display: none !important; }
  .consent__card:not(:has(.consent__actions[hidden])) {
    gap: 6px;
    max-block-size: 60px;
    padding: 0 8px;
  }
  .consent__card:not(:has(.consent__actions[hidden])) .consent__brief {
    font-size: 11px;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .consent__card:not(:has(.consent__actions[hidden])) .consent__actions { display: flex; flex-wrap: nowrap; gap: 4px; }
  .consent__card:not(:has(.consent__actions[hidden])) .consent__btn {
    inline-size: auto;
    min-inline-size: 44px;
    min-block-size: 44px;
    padding: 0 8px;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
  }
  .consent__card:has(.consent__actions[hidden]) {
    flex-direction: column;
    align-items: stretch;
    max-block-size: min(520px, calc(100svh - 32px));
    padding: 12px;
  }
  .consent__custom .consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
  html:has(.consent:not([hidden])) .a11y-btn {
    inset-block-end: calc(76px + env(safe-area-inset-bottom));
  }
  html:has(.dock.is-on):has(.consent:not([hidden])) .a11y-btn {
    inset-block-end: calc(148px + env(safe-area-inset-bottom));
  }
}
