/* ProSmile Center — доступность: стили виджета и режимы отображения.
   Отдельный файл, чтобы доступность не размазывалась по основной таблице
   стилей и её нельзя было случайно снести правкой оформления. */

/* ---------- ссылка «Перейти к содержимому» ---------- */

.ps-skip {
  position: fixed; top: -100px; inset-inline-start: 16px; z-index: 200;
  background: #16233f; color: #fff; padding: 12px 20px; border-radius: 0 0 10px 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: top .15s;
}
.ps-skip:focus { top: 0; }
main:focus { outline: none; }

/* ---------- кнопка и панель ---------- */

/* Угол задан физически (left), а не логически (inset-inline-start): на иврите
   логический угол стал бы правым, а справа внизу сидит пузырь чат-бота. Кнопку
   доступности закрывать нельзя — закон требует, чтобы она была доступна всегда,
   поэтому она держится левого угла на всех языках. */
.ps-a11y { position: fixed; left: 18px; bottom: 18px; z-index: 150; }

.ps-a11y__btn {
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid #fff;
  background: #16233f; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px -10px rgba(22, 35, 63, .65);
  transition: transform .15s, background .15s;
}
.ps-a11y__btn:hover { transform: scale(1.06); background: #1d2f52; }

.ps-a11y__panel {
  position: absolute; bottom: 66px; left: 0; width: 272px;
  background: #fff; border: 1px solid #e3ddcf; border-radius: 16px; padding: 14px;
  box-shadow: 0 26px 60px -24px rgba(22, 35, 63, .5);
  font-family: Rubik, system-ui, sans-serif;
}
.ps-a11y__panel[hidden] { display: none; }

.ps-a11y__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #efe9dd;
}
.ps-a11y__title { font-size: 15px; font-weight: 700; color: #16233f; }
.ps-a11y__close {
  width: 30px; height: 30px; border: 1px solid #e3ddcf; background: #fff;
  border-radius: 8px; cursor: pointer; color: #5b6478; font-size: 14px; line-height: 1;
}

.ps-a11y__zoom { display: flex; gap: 8px; margin-bottom: 8px; }
.ps-a11y__zoom button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border: 1px solid #e3ddcf; background: #faf8f3; border-radius: 10px;
  cursor: pointer; color: #16233f; font-size: 11.5px; line-height: 1.25; text-align: center;
}
.ps-a11y__zoom button:hover { border-color: #c6a25a; }

.ps-a11y__list { display: flex; flex-direction: column; gap: 4px; }
.ps-a11y__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 1px solid transparent; background: transparent;
  border-radius: 10px; cursor: pointer; color: #1c2540; font-size: 13.5px; text-align: start;
}
.ps-a11y__item:hover { background: #faf8f3; }
.ps-a11y__item span:first-of-type { flex: 1; }
.ps-a11y__mark {
  width: 16px; height: 16px; border: 1.5px solid #c9c2b2; border-radius: 5px; flex: none;
}
.ps-a11y__item[aria-pressed="true"] { background: #f4efe2; border-color: #e0cfa6; }
.ps-a11y__item[aria-pressed="true"] .ps-a11y__mark {
  background: #16233f; border-color: #16233f; position: relative;
}
.ps-a11y__item[aria-pressed="true"] .ps-a11y__mark::after {
  content: ''; position: absolute; inset-inline-start: 4.5px; top: 1px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.ps-a11y__reset {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px;
  padding: 9px 10px; border: 1px solid #e3ddcf; background: #fff; border-radius: 10px;
  cursor: pointer; color: #5b6478; font-size: 13.5px; text-align: start;
}
.ps-a11y__link {
  display: block; margin-top: 10px; font-size: 12.5px; color: #a07e34;
  text-align: center; text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .ps-a11y { left: 12px; bottom: 12px; }
  .ps-a11y__panel { width: calc(100vw - 24px); max-width: 300px; }
}

/* ---------- режимы ---------- */

/* Масштаб. Сайт свёрстан в пикселях, поэтому меняем не базовый размер шрифта,
   а масштаб содержимого — результат предсказуем и ничего не разъезжается. */
html.a11y-zoomed body { zoom: var(--a11y-zoom, 1); }
/* сам виджет не масштабируем: он должен остаться на месте и не уехать за край */
html.a11y-zoomed .ps-a11y { zoom: calc(1 / var(--a11y-zoom, 1)); }

/* Высокая контрастность. Переопределяем токены темы и те места, где цвет
   задан напрямую, — без инверсии фильтром, иначе портятся фотографии. */
html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast {
  --navy: #ffffff; --navy-deep: #000000; --ink: #ffffff;
  --muted: #e6e6e6; --muted-2: #d8d8d8; --muted-3: #d8d8d8;
  --gold: #ffd75e; --gold-dark: #ffd75e; --gold-darker: #ffd75e;
  --line: #666666; --line-2: #666666; --line-3: #666666; --cream: #000000;
}
html.a11y-contrast .ps-header,
html.a11y-contrast .ps-section,
html.a11y-contrast .ps-hero,
html.a11y-contrast .ps-article-card,
html.a11y-contrast .ps-video-card,
html.a11y-contrast .ps-review,
html.a11y-contrast .ps-form,
html.a11y-contrast .ps-service,
html.a11y-contrast .ps-stat,
html.a11y-contrast .ps-contact__item,
html.a11y-contrast .ps-article-page,
html.a11y-contrast .ps-footer,
html.a11y-contrast .ps-menu {
  background: #000 !important; color: #fff !important;
}
html.a11y-contrast h1, html.a11y-contrast h2, html.a11y-contrast h3,
html.a11y-contrast .ps-h2, html.a11y-contrast p, html.a11y-contrast li,
html.a11y-contrast span, html.a11y-contrast div, html.a11y-contrast time {
  color: #fff !important;
}
html.a11y-contrast a, html.a11y-contrast .ps-card__link, html.a11y-contrast .ps-eyebrow {
  color: #ffd75e !important;
}
html.a11y-contrast .ps-btn-book,
html.a11y-contrast .ps-cta-primary,
html.a11y-contrast .ps-submit,
html.a11y-contrast .ps-menu__book {
  background: #ffd75e !important; color: #000 !important; border-color: #ffd75e !important;
}
html.a11y-contrast .ps-cta-secondary,
html.a11y-contrast .ps-input, html.a11y-contrast .ps-field input,
html.a11y-contrast .ps-field select, html.a11y-contrast .ps-field textarea {
  background: #000 !important; color: #fff !important; border-color: #fff !important;
}
html.a11y-contrast .ps-article-card, html.a11y-contrast .ps-review,
html.a11y-contrast .ps-video-card, html.a11y-contrast .ps-form {
  border-color: #fff !important;
}
/* панель виджета остаётся светлой: иначе её не найти на чёрном фоне */
html.a11y-contrast .ps-a11y__panel { background: #fff !important; }
html.a11y-contrast .ps-a11y__panel * { color: #16233f !important; }
html.a11y-contrast .ps-a11y__link { color: #7a5c15 !important; }

/* Шрифт, удобный для чтения */
html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
  font-family: Verdana, Tahoma, "DejaVu Sans", Arial, sans-serif !important;
  letter-spacing: 0.02em !important;
}
html.a11y-readable p, html.a11y-readable li { line-height: 1.85 !important; }
html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable .ps-h2 {
  letter-spacing: 0 !important;
}

/* Подчёркивание ссылок */
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }

/* Остановка анимаций — и своих, и заданных в разметке */
html.a11y-nomotion *,
html.a11y-nomotion *::before,
html.a11y-nomotion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Крупный курсор */
html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='m5 3 14 7.6-5.8 1.6 2.9 6-2.6 1.2-2.9-5.9L6 17.6 5 3Z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 4 2, auto !important;
}
html.a11y-cursor a, html.a11y-cursor button, html.a11y-cursor [role="button"],
html.a11y-cursor label, html.a11y-cursor summary {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M9 2v9.5L6.8 9.3a2 2 0 0 0-2.8 2.8l5 6.4A4 4 0 0 0 12 20h4a4 4 0 0 0 4-4v-5a2 2 0 0 0-4 0 2 2 0 0 0-4 0V2a1.5 1.5 0 0 0-3 0Z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 10 2, pointer !important;
}

/* ---------- фокус ---------- */

/* Базовая рамка нужна всегда: без неё по сайту нельзя ходить с клавиатуры.
   Показываем только при навигации с клавиатуры, чтобы не мешать мыши. */
:focus-visible {
  outline: 3px solid #c6a25a;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Усиленный режим — по просьбе посетителя */
html.a11y-focus :focus,
html.a11y-focus :focus-visible {
  outline: 4px solid #ff5f1f !important;
  outline-offset: 3px !important;
}

/* ---------- только для скринридеров ---------- */

.ps-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- страница заявления ---------- */

.ps-a11y-page { max-width: 760px; margin: 0 auto; }
.ps-a11y-page .ps-head { text-align: start; margin-bottom: 26px; }
.ps-a11y-page__updated { font-size: 13.5px; color: #8089a0; margin: 0 0 26px; }
.ps-a11y-page h2 {
  font-size: 22px; font-weight: 600; color: #16233f; margin: 34px 0 12px; letter-spacing: -0.3px;
}
.ps-a11y-page p { font-size: 16.5px; line-height: 1.75; color: #3a4258; margin: 0 0 14px; }
.ps-a11y-page ul { margin: 0 0 16px; padding-inline-start: 22px; }
.ps-a11y-page li { font-size: 16px; line-height: 1.7; color: #3a4258; margin-bottom: 9px; }
.ps-a11y-page__contacts {
  background: #faf8f3; border: 1px solid #efe9dd; border-radius: 16px;
  padding: 22px 24px; margin-top: 14px;
}
.ps-a11y-page__contacts a { color: #a07e34; font-weight: 600; }
