/* ZEN Вход в CRM — кнопка в шапке, выпадающее меню и два модальных окна.
   Тема Ohio красит элементы по тегу (button, input), поэтому ниже идёт
   «щит» с !important. Без него поля и кнопка становятся белым по белому. */

/* ---------- кнопка в шапке ---------- */

.zenl-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  margin: 0;
  border: 1px solid #111013 !important;
  border-radius: 40px !important;
  background: transparent !important;
  color: #111013 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: .02em;
  text-transform: none !important;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.zenl-trigger:hover,
.zenl-trigger[aria-expanded="true"] {
  background: #111013 !important;
  color: #fff !important;
}

.zenl-trigger:focus-visible {
  outline: 2px solid #f2c94c !important;
  outline-offset: 2px;
}

/* На тёмной схеме Ohio (body.dark-scheme) фон шапки — rgb(22,21,25):
   чёрная кнопка на нём не видна, поэтому инвертируем. */
body.dark-scheme .zenl-trigger {
  border-color: rgba(255, 255, 255, .6) !important;
  color: #fff !important;
}

body.dark-scheme .zenl-trigger:hover,
body.dark-scheme .zenl-trigger[aria-expanded="true"] {
  background: #fff !important;
  color: #111013 !important;
}

/* в выезжающей панели меню — пункт в общем списке */
.zenl-nav-item .zenl-nav-link {
  cursor: pointer;
}

/* ---------- выпадающее меню ---------- */

.zenl-root[hidden] { display: none; }

.zenl-menu {
  position: absolute;
  z-index: 100000;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #e3e3e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 16, 19, .16);
  display: none;
}

.zenl-menu.-open { display: block; }

.zenl-menu__item {
  display: block !important;
  width: 100%;
  padding: 11px 14px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #111013 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-transform: none !important;
  cursor: pointer;
}

.zenl-menu__item:hover { background: #f3f3f5 !important; }
.zenl-menu__item:focus-visible { outline: 2px solid #f2c94c !important; outline-offset: -2px; }

/* ---------- модальное окно ---------- */

dialog.zenl {
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #111013 !important;
  box-shadow: 0 24px 60px rgba(17, 16, 19, .28);
}

dialog.zenl::backdrop { background: rgba(17, 16, 19, .55); }

dialog.zenl .zenl__box {
  position: relative;
  padding: 32px 28px 26px;
  outline: none;
}

dialog.zenl .zenl__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #8a8a90 !important;
  font-size: 26px !important;
  line-height: 1 !important;
  cursor: pointer;
}

dialog.zenl .zenl__close:hover { color: #111013 !important; background: #f3f3f5 !important; }
dialog.zenl .zenl__close:focus-visible { outline: 2px solid #f2c94c !important; outline-offset: 2px; }

.zenl__title {
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: #111013 !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
}

.zenl__err {
  margin: 0 0 16px !important;
  padding: 11px 14px !important;
  border-radius: 10px;
  background: #fdecec !important;
  color: #a02020 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

.zenl__err[hidden] { display: none !important; }

/* ---------- форма ---------- */

.zenl__form { margin: 0 !important; }

.zenl__label {
  display: block !important;
  margin: 0 0 6px !important;
  color: #6c6c73 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

input.zenl__input {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 50px !important;
  padding: 0 15px !important;
  margin: 0 0 16px !important;
  border: 1px solid #d9d9de !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111013 !important;
  font-family: inherit !important;
  /* 16px обязательно: меньше — и iOS зумит страницу при фокусе */
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 50px !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

input.zenl__input::placeholder { color: #a6a6ad !important; opacity: 1; }

input.zenl__input:focus {
  border-color: #111013 !important;
  outline: none !important;
  box-shadow: none !important;
}

input.zenl__input:focus-visible {
  outline: 2px solid #f2c94c !important;
  outline-offset: 1px;
}

button.zenl__submit {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 52px !important;
  padding: 0 20px !important;
  margin: 6px 0 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #111013 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 52px !important;
  letter-spacing: .02em;
  text-transform: none !important;
  cursor: pointer;
  transition: opacity .18s ease;
}

button.zenl__submit:hover { opacity: .86; }
button.zenl__submit:focus-visible { outline: 2px solid #f2c94c !important; outline-offset: 2px; }

.zenl__note {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  color: #8a8a90 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: center;
}

/* ---------- запасная страница /login/ ---------- */

.zenl-noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  padding: 12px 18px;
  border-radius: 40px;
  background: #111013;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}

body.zenl-page {
  margin: 0;
  background: #f4f4f6;
  color: #111013;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.zenl-page__wrap {
  box-sizing: border-box;
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

.zenl-page__back {
  display: inline-block;
  margin-bottom: 18px;
  color: #6c6c73;
  font-size: 15px;
  text-decoration: none;
}

.zenl-page__h1 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 600;
}

.zenl-page__err {
  margin: 0 0 20px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fdecec;
  color: #a02020;
  font-size: 15px;
}

.zenl-page__card {
  margin: 0 0 20px;
  padding: 26px 22px 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 16, 19, .08);
}

@media (max-width: 480px) {
  dialog.zenl .zenl__box { padding: 28px 20px 22px; }
  .zenl__title { font-size: 20px !important; }
}
