/* =========================================================
   ONLINE OIL — МОДАЛЬНЫЕ ФОРМЫ
   ========================================================= */

.oo-form-modal,
.oo-form-modal * {
    box-sizing: border-box;
}

.oo-form-modal {
    width: min(700px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;

    overflow: auto;
    overscroll-behavior: contain;

    color: #f5fff9;
    background:
        radial-gradient(
            ellipse at top right,
            rgba(0, 183, 141, 0.18),
            transparent 60%
        ),
        #003c31;

    border: 1px solid #398b75;
    border-radius: 24px;
    box-shadow: 0 28px 100px #001d1870;

    font-family: inherit;
}

.oo-form-modal::backdrop {
    background: rgba(0, 22, 17, 0.58);
}

.oo-form-modal[open] {
    animation: oo-form-enter 260ms ease-out;
}

.oo-form-modal__body {
    position: relative;
    padding: 38px;
}

.oo-form-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 38px;
    height: 38px;
    padding: 0;

    color: #eafff6;
    background: #ffffff0a;
    border: 1px solid #ffffff30;
    border-radius: 50%;

    font: 28px/1 sans-serif;
    cursor: pointer;
}

.oo-form-modal__eyebrow {
    color: #76dfbf;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.oo-form-modal h2 {
    margin: 16px 36px 12px 0;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.oo-form-modal__intro {
    margin: 0 0 28px;
    color: #b9d9cc;
    font-size: 15px;
    line-height: 1.6;
}

.oo-form[hidden] {
    display: none;
}

.oo-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 18px;
}

.oo-form label {
    display: block;
    min-width: 0;
    color: #e0f2e9;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.oo-form input,
.oo-form select,
.oo-form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 8px 0 0;
    padding: 13px 14px;

    color: #143f33;
    background: #f5faf7;
    border: 1px solid #c7ded3;
    border-radius: 10px;

    font: 400 16px/1.4 inherit;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
}

.oo-form textarea {
    resize: vertical;
    min-height: 100px;
}

.oo-form input::placeholder,
.oo-form textarea::placeholder {
    color: #768c82;
    opacity: 1;
}

.oo-form input:focus,
.oo-form select:focus,
.oo-form textarea:focus {
    outline: 2px solid #58d6b6;
    outline-offset: 2px;
}

.oo-form__full {
    grid-column: 1 / -1;
}

.oo-form__optional {
    font-weight: 400;
    color: #56bd92;
}

.oo-form__password {
    position: relative;
    display: block;
}

.oo-form__password input {
    padding-right: 88px;
}

.oo-form__password button {
    position: absolute;
    top: 0;
    right: 4px;
    bottom: 0;
    padding: 0 10px;

    color: #08775f;
    background: transparent;
    border: 0;

    font: 600 11px/1.2 sans-serif;
    cursor: pointer;
}

.oo-form__hint {
    margin: 14px 0 0;
    color: #b9d9cc;
    font-size: 12px;
    line-height: 1.6;
}

.oo-form__submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: 100%;
    margin-top: 26px;
    padding: 16px 20px;

    color: #13392b;
    background: linear-gradient(110deg, #ffe451, #ffc400);
    border: 0;
    border-radius: 12px;

    font-family: inherit;
    font-size: 16px;
    font-weight: 800;

    cursor: pointer;
}

.oo-form__submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.oo-form__submit span {
    font-size: 23px;
}

.oo-form-modal button:focus-visible {
    outline: 2px solid #77e4c8;
    outline-offset: 3px;
}

.oo-form__message {
    margin: 16px 0 0;
    color: #d4f3e5;
    font-size: 14px;
    line-height: 1.5;
}

.oo-form__message:empty {
    display: none;
}

.oo-form__message[data-error="true"] {
    color: #ffd2bb;
}

@keyframes oo-form-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .oo-form-modal__body {
        padding: 30px 22px;
    }

    .oo-form__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oo-form-modal[open] {
        animation: none;
    }
}

/* Затемнение страницы за окном */
.oo-form-modal::backdrop {
    background: rgba(0, 12, 9, 0.8);
}

/* Более компактное окно */
.oo-form-modal {
    width: min(540px, calc(100% - 32px));
}

/* Поля в одну колонку */
.oo-form__grid {
    grid-template-columns: 1fr;
    gap: 18px;
}


/* Контакты под формой консультации */
.oo-form__contacts {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(131, 234, 213, 0.2);
}

.oo-form__contacts p {
    margin: 0 0 16px;
    color: #b9d9cc;
    font-size: 14px;
    text-align: center;
}

.oo-form__contacts a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;

    padding: 10px 0;
    color: #effff7;
    text-decoration: none;
}

.oo-form__contacts a span {
    font-size: 15px;
}

.oo-form__contacts a strong {
    color: #83ead5;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.oo-form__contacts a:hover strong {
    color: #ffda35;
}

.oo-form__contacts a:focus-visible {
    outline: 2px solid #83ead5;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Широкое окно только для регистрации */
.oo-form-modal[data-mode="registration"] {
    width: min(810px, calc(100% - 32px));
}

/* Консультация: шире на 20% */
.oo-form-modal[data-mode="consultation"] {
    width: min(648px, calc(100% - 32px));
}

/* Согласие с документами */
.oo-form .oo-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-top: 24px;

    color: #c1dcd0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.65;
}

.oo-form .oo-form__consent input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;

    margin: 3px 0 0;
    padding: 0;

    accent-color: #35cfa8;
    cursor: pointer;
}

.oo-form__consent span {
    min-width: 0;
}

.oo-form__consent a {
    color: #83ead5;
    text-decoration: underline;
    text-decoration-color: rgba(131, 234, 213, 0.45);
    text-underline-offset: 3px;
}

.oo-form__consent a:hover {
    color: #ffda35;
}

.oo-form__consent a:focus-visible {
    outline: 2px solid #83ead5;
    outline-offset: 3px;
}

/* Окно входа */
.oo-form-modal[data-mode="login"] {
    width: min(540px, calc(100% - 32px));
}

.oo-form .oo-form__remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;

    color: #c1dcd0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.oo-form .oo-form__remember input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0;
    accent-color: #35cfa8;
}

.oo-form__login-links {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(131, 234, 213, 0.2);
}

.oo-form__login-links p {
    margin: 0;
    color: #b9d9cc;
    font-size: 14px;
    line-height: 1.7;
}

.oo-form__login-links p + p {
    margin-top: 12px;
}

.oo-form__login-links a {
    color: #83ead5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.oo-form__login-links a:hover {
    color: #ffda35;
}

.oo-form__login-links a:focus-visible {
    outline: 2px solid #83ead5;
    outline-offset: 3px;
}


/* ======================================================
   МОДАЛЬНЫЕ ОКНА — СДЕРЖАННОЕ ИЗУМРУДНОЕ ОФОРМЛЕНИЕ
   ====================================================== */

.oo-form-modal,
.oo-form-modal * {
  box-sizing: border-box;
}

/* Общий размер для всех трёх окон */
.oo-form-modal,
.oo-form-modal[data-mode="login"],
.oo-form-modal[data-mode="registration"],
.oo-form-modal[data-mode="consultation"] {
  width: min(1040px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;

  overflow: auto;
  background: #ffffff;
  color: #17352f;

  border: 1px solid #dce6e1;
  border-radius: 22px;

  box-shadow: 0 28px 90px rgb(0 24 18 / 25%);
}

.oo-form-modal::backdrop {
  background: rgb(0 19 14 / 72%);
}

.oo-form-modal__layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-width: 0;
}

/* Левая панель */
.oo-form-modal__brand {
  display: flex;
  flex-direction: column;
  padding: 52px 42px;

  background: linear-gradient(150deg, #064c3f, #022f27);
  color: #ffffff;
}

.oo-form-modal__brand-label {
  color: #a5d7c5;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.14em;
}

.oo-form-modal__brand-title {
  margin: 30px 0 22px;

  color: #ffffff;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.oo-form-modal__brand-text {
  margin: 0 0 52px;
  max-width: 310px;

  color: #c4ddd3;
  font-size: 16px;
  line-height: 1.7;
}

.oo-form-modal__brand-footer {
  margin: auto 0 0;
  padding-top: 22px;

  border-top: 1px solid rgb(204 235 222 / 20%);
  color: #c4ddd3;
  font-size: 12px;
  line-height: 1.6;
}

/* Правая панель */
.oo-form-modal__body {
  position: relative;
  min-width: 0;
  padding: 48px 40px 36px;

  background: #ffffff;
  color: #17352f;
}

.oo-form-modal__eyebrow {
  display: none;
}

.oo-form-modal #oo-form-title {
  margin: 0 32px 12px 0;

  color: #17352f;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.oo-form-modal__intro {
  margin: 0 0 28px;
  color: #65776f;
  font-size: 15px;
  line-height: 1.6;
}

/* Закрытие */
.oo-form-modal__close {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 8px;
  background: #f0f5f2;
  color: #315b4c;
  box-shadow: none;
}

.oo-form-modal__close:hover {
  background: #e1eee7;
}

/* Поля — вертикально */
.oo-form-modal .oo-form__grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.oo-form-modal .oo-form label {
  color: #29473c;
}

.oo-form-modal .oo-form input:not([type="checkbox"]),
.oo-form-modal .oo-form select,
.oo-form-modal .oo-form textarea {
  width: 100%;
  border: 1px solid #cbd9d1;
  border-radius: 8px;

  background: #fbfcfb;
  color: #17352f;
  box-shadow: none;

  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.oo-form-modal .oo-form input::placeholder,
.oo-form-modal .oo-form textarea::placeholder {
  color: #84948b;
}

.oo-form-modal .oo-form input:focus-visible,
.oo-form-modal .oo-form select:focus-visible,
.oo-form-modal .oo-form textarea:focus-visible {
  border-color: #13795f;
  outline: 2px solid rgb(19 121 95 / 20%);
  outline-offset: 2px;
}

.oo-form-modal .oo-form__password button {
  color: #11674f;
}

.oo-form-modal .oo-form__hint,
.oo-form-modal #oo-password-hint {
  color: #65776f;
}

/* Основная кнопка */
.oo-form-modal .oo-form__submit {
  justify-content: center;
  gap: 14px;

  min-height: 50px;
  padding: 14px 20px;

  border: 0;
  border-radius: 8px;
  background: #126b54;
  color: #ffffff;
  box-shadow: none;

  font-size: 15px;
  font-weight: 650;

  transition: background-color 180ms ease;
}

.oo-form-modal .oo-form__submit:hover:not(:disabled) {
  background: #0b5542;
}

.oo-form-modal .oo-form__submit:focus-visible,
.oo-form-modal__close:focus-visible {
  outline: 2px solid #13795f;
  outline-offset: 3px;
}

/* Согласие и запоминание */
.oo-form-modal .oo-form__consent,
.oo-form-modal .oo-form__remember {
  color: #65776f;
}

.oo-form-modal .oo-form input[type="checkbox"] {
  accent-color: #126b54;
}

/* Ссылки и контакты */
.oo-form-modal .oo-form a {
  color: #116b53;
  text-underline-offset: 3px;
}

.oo-form-modal .oo-form a:hover {
  color: #064332;
}

.oo-form-modal .oo-form a:focus-visible {
  outline: 2px solid #13795f;
  outline-offset: 3px;
}

.oo-form-modal .oo-form__login-links,
.oo-form-modal .oo-form__contacts {
  border-top-color: #e0e8e3;
}

.oo-form-modal .oo-form__login-links p,
.oo-form-modal .oo-form__contacts p {
  color: #65776f;
}

.oo-form-modal .oo-form__contacts a {
  color: #29473c;
}

.oo-form-modal .oo-form__contacts strong {
  color: #116b53;
}

/* Результат отправки */
.oo-form-modal .oo-form__message {
  color: #116b53;
}

.oo-form-modal .oo-form__message[data-error="true"] {
  color: #a53232;
}

/* На телефоне оставляем компактную форму */
@media (max-width: 760px) {
  .oo-form-modal,
  .oo-form-modal[data-mode="login"],
  .oo-form-modal[data-mode="registration"],
  .oo-form-modal[data-mode="consultation"] {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }

  .oo-form-modal__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .oo-form-modal__brand {
    display: none;
  }

  .oo-form-modal__body {
    padding: 46px 24px 28px;
  }

  .oo-form-modal #oo-form-title {
    font-size: 26px;
  }
}


/* Лёгкий зелёный фон полей */
.oo-form-modal .oo-form input:not([type="checkbox"]),
.oo-form-modal .oo-form select,
.oo-form-modal .oo-form textarea {
  background: #edf6f1;
  border-color: #c6ddd0;

  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

/* При наведении */
.oo-form-modal .oo-form input:not([type="checkbox"]):hover,
.oo-form-modal .oo-form select:hover,
.oo-form-modal .oo-form textarea:hover {
  background: #e6f2eb;
  border-color: #a9d3be;
}

/* Во время ввода */
.oo-form-modal .oo-form input:not([type="checkbox"]):focus,
.oo-form-modal .oo-form select:focus,
.oo-form-modal .oo-form textarea:focus {
  background: #f2faf5;
  border-color: #13795f;
  outline: 2px solid rgb(19 121 95 / 15%);
  outline-offset: 2px;
}

/* Телефоны: при наведении становятся темнее */
.oo-form-modal .oo-form__contacts a strong {
  color: #116b53;
  transition: color 180ms ease;
}

.oo-form-modal .oo-form__contacts a:hover strong,
.oo-form-modal .oo-form__contacts a:focus-visible strong {
  color: #064332;
}


/* Более чёткие границы полей */
.oo-form-modal .oo-form input:not([type="checkbox"]),
.oo-form-modal .oo-form select,
.oo-form-modal .oo-form textarea {
  border: 1.6px solid #b5cfc0;
}

.oo-form-modal .oo-form input:not([type="checkbox"]):hover,
.oo-form-modal .oo-form select:hover,
.oo-form-modal .oo-form textarea:hover {
  border-color: #8eb7a2;
}

.oo-form-modal .oo-form input:not([type="checkbox"]):focus,
.oo-form-modal .oo-form select:focus,
.oo-form-modal .oo-form textarea:focus {
  border-color: #13795f;
}


/* Компактное окно поддержки */
.oo-support,
.oo-support * {
  box-sizing: border-box;
}

.oo-support {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;

  background: #fff;
  color: #17352f;
  border: 1px solid #d5e3db;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(0 24 18 / 24%);
  font-family: inherit;
}

.oo-support::backdrop {
  background: rgb(0 19 14 / 72%);
}

.oo-support__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e1eae5;
}

.oo-support__heading h2 {
  margin: 0;
  color: #17352f;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.oo-support__close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;

  background: #f0f5f2;
  color: #426456;
  border: 0;
  border-radius: 8px;
  font-size: 26px;
  cursor: pointer;
}

.oo-support__close:hover {
  background: #e1eee7;
}

.oo-support__body {
  padding: 8px 24px 20px;
}

.oo-support__body > p {
  margin: 18px 0;
  color: #65776f;
  font-size: 15px;
  line-height: 1.6;
}

.oo-support__contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 20px 0;

  border-top: 1px solid #e1eae5;
  color: #116b53;
  font-size: 16px;
  text-decoration: none;
  transition: color 180ms ease;
}

.oo-support__contact strong {
  color: inherit;
  white-space: nowrap;
}

.oo-support__contact:hover {
  color: #064332;
}

.oo-support a:focus-visible,
.oo-support button:focus-visible {
  outline: 2px solid #13795f;
  outline-offset: 3px;
}