/* ======================================================================
   Вхід, реєстрація й запрошення на публічному сайті (Claude, 2026-10-29).
   Мовою самого сайту: сіра картка з білою рамкою (як вікна «Залишилися питання?»),
   поля з підкресленням, кнопки-«пігулки» сайту (.btn, .btn-two). Тема — класи html.light / html.dark сайту.
   ====================================================================== */

.acc {
    --acc-ink: #1c1c1c;
    --acc-muted: #3a3a3a;
    --acc-line: #ffffff;
    --acc-card: #b8b8b8;
    --acc-red: #e31e24;
    --acc-error: #8f0a0e;
    color: var(--acc-ink);
    font-family: Montserrat, sans-serif;
    text-align: left;
}
.dark .acc {
    --acc-ink: #ffffff;
    --acc-muted: #b8b8b8;
    --acc-card: #000000;
    --acc-error: #ff7a7e;
}

/* ---------- Вікно поверх сторінки (оболонка — .popup сайту) ---------- */
.popup__content.acc-popup { max-width: 31.5rem; padding: 3rem 2.5rem 2.25rem; }
@media (max-width: 30em) {
    .popup__content.acc-popup { padding: 3.75rem 1.25rem 1.75rem; }
}

/* ---------- Сторінка (без вікна): той самий вигляд картки ---------- */
/* шапка сайту фіксована (≈94 px на комп'ютері) — відступ зверху з її урахуванням */
.acc-page { padding: clamp(7rem, 5.5rem + 4vw, 10rem) 0 clamp(3rem, 2rem + 4vw, 6rem); }
.acc-page__container { width: 100%; max-width: 31.5rem; margin: 0 auto; padding: 0 1rem; }
.acc-page__container--wide { max-width: 46rem; }
.acc-card {
    background: var(--acc-card);
    border: .125rem solid #ffffff;
    border-radius: .9375rem;
    padding: clamp(1.75rem, 1.25rem + 2vw, 3rem) clamp(1.25rem, .75rem + 2vw, 2.5rem);
}
.dark .acc-card { border-color: #ffffff; }

/* ---------- Заголовок і текст ---------- */
.acc__title {
    margin: 0 0 .75rem;
    font-family: Benzin, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem);
    line-height: 1.1;
    color: var(--acc-ink);
}
.acc__lead { margin: 0 0 1.75rem; font-size: 1rem; line-height: 1.5; font-weight: 500; color: var(--acc-ink); max-width: 38rem; }
.acc__title + .acc-form { margin-top: 1.75rem; }
.acc__note { margin: 1.25rem 0 0; font-size: .9375rem; line-height: 1.45; color: var(--acc-muted); }
.acc__note + .acc__note { margin-top: .625rem; }
.acc__note--quiet { font-size: .875rem; }

.acc a:not(.btn):not(.btn-two) {
    color: var(--acc-ink);
    text-decoration: underline;
    text-decoration-color: var(--acc-red);
    text-decoration-thickness: 2px;
    text-underline-offset: .2em;
}
.acc a:not(.btn):not(.btn-two):hover { text-decoration-thickness: 3px; }
.acc a:focus-visible, .acc button:focus-visible { outline: 2px solid var(--acc-ink); outline-offset: 3px; }

/* ---------- Поля ---------- */
.acc-form { display: grid; gap: 1.375rem; }
.acc-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1.25rem; min-width: 0; }
.acc-fieldset + .acc-fieldset { padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .55); }
/* float робить legend звичайним рядком сітки (інакше браузер садить його на лінію рамки) */
.acc-legend { float: left; width: 100%; padding: 0; margin: 0; font-family: Benzin, sans-serif; font-weight: 600; font-size: 1rem; text-transform: uppercase; color: var(--acc-ink); }
.acc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.acc-field { display: grid; gap: .375rem; min-width: 0; align-content: start; }
.acc-label { font-size: .875rem; font-weight: 600; color: var(--acc-ink); }
.acc-input {
    width: 100%;
    border: 0;
    border-bottom: 2px solid var(--acc-line);
    border-radius: 0;
    background: transparent;
    padding: .5rem 0;
    font: 500 1.0625rem/1.3 Montserrat, sans-serif;
    color: var(--acc-ink);
    outline: 0;
    transition: border-color .2s ease;
}
.acc-input::placeholder { color: var(--acc-muted); opacity: .8; font-weight: 400; }
.acc-input:focus { border-bottom-color: var(--acc-red); }
.acc-input[aria-invalid="true"] { border-bottom-color: var(--acc-error); }
.acc-input[readonly] { color: var(--acc-muted); border-bottom-style: dashed; }
.acc-input:-webkit-autofill,
.acc-input:-webkit-autofill:hover,
.acc-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px var(--acc-card) inset;
    -webkit-text-fill-color: var(--acc-ink);
    caret-color: var(--acc-ink);
}
.dark .acc-input { color-scheme: dark; }
.acc-hint { font-size: .8125rem; line-height: 1.4; color: var(--acc-muted); }
.acc-error { font-size: .8125rem; line-height: 1.4; font-weight: 600; color: var(--acc-error); }

.acc-password { position: relative; }
.acc-password .acc-input { padding-right: 2.5rem; }
.acc-password__toggle {
    position: absolute; right: 0; bottom: .25rem;
    width: 2.25rem; height: 2.25rem;
    display: grid; place-items: center;
    border: 0; padding: 0; background: none; color: var(--acc-ink); cursor: pointer; border-radius: .3125rem;
}
.acc-password__toggle[aria-pressed="true"] { color: var(--acc-red); }

/* Стать — дві «пігулки», як перемикачі сайту */
.acc-segment { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .25rem; }
.acc-segment label { position: relative; margin: 0; }
.acc-segment input { position: absolute; opacity: 0; inset: 0; }
.acc-segment span {
    display: inline-block; padding: .5rem 1.125rem; border-radius: 2.1875rem;
    border: 1px solid var(--acc-ink); font-size: .9375rem; font-weight: 500; cursor: pointer; transition: background-color .2s, color .2s;
}
.acc-segment input:checked + span { background: var(--acc-ink); color: var(--acc-card); }
.acc-segment input:focus-visible + span { outline: 2px solid var(--acc-red); outline-offset: 2px; }

/* Прапорці */
.acc-check { display: inline-flex; align-items: flex-start; gap: .625rem; cursor: pointer; font-size: .9375rem; line-height: 1.4; font-weight: 500; margin: 0; }
.acc-check input {
    appearance: none; -webkit-appearance: none; flex: none;
    width: 1.125rem; height: 1.125rem; margin: .125rem 0 0;
    border: 2px solid var(--acc-line); border-radius: .1875rem; background: transparent; cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.acc-check input:checked {
    background: var(--acc-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
    border-color: var(--acc-red);
}
.acc-check input:focus-visible { outline: 2px solid var(--acc-ink); outline-offset: 2px; }

.acc-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; font-size: .9375rem; }

/* ---------- Кнопки: класи сайту + розмір для форм ---------- */
.acc .btn { width: 100%; padding: 1.0625rem 1.5rem; font-size: 1rem; cursor: pointer; font-family: Montserrat, sans-serif; }
.acc .btn-two {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: .625rem;
    padding: .875rem 1.25rem; font-size: .9375rem; font-family: Montserrat, sans-serif;
    color: var(--acc-ink); text-decoration: none; background: transparent; cursor: pointer;
}
.light .acc .btn-two { border-color: var(--acc-ink); }
.acc .btn-two:hover { background: var(--acc-ink); color: var(--acc-card); }
.acc .btn-two svg { width: 1.125rem; height: 1.125rem; flex: none; }
.acc .btn--auto { width: auto; min-width: 12rem; }

.acc-or { display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--acc-muted); }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .7); }

/* ---------- Повідомлення ---------- */
.acc-message {
    margin: 0 0 1.5rem; padding: .875rem 1rem; border-radius: .625rem;
    border-left: 4px solid var(--acc-ink); background: rgba(255, 255, 255, .35);
    font-size: .9375rem; line-height: 1.45; font-weight: 500; color: var(--acc-ink);
}
.dark .acc-message { background: #1c1c1c; }
.acc-message--error { border-left-color: var(--acc-red); }
.acc-message--success { border-left-color: #1f8a4c; }
.acc-message p { margin: 0; }

/* Запрошення */
.acc-invite { display: grid; gap: .25rem; margin: 0 0 1.5rem; font-size: 1rem; line-height: 1.45; }
.acc-invite strong { font-weight: 700; }
.acc-invite span { color: var(--acc-muted); font-weight: 500; }
.acc-inline-form { margin: 0 0 1.5rem; font-size: .9375rem; }
.acc-link-btn {
    border: 0; padding: 0; background: none; font: inherit; font-weight: 600; color: var(--acc-ink); cursor: pointer;
    text-decoration: underline; text-decoration-color: var(--acc-red); text-decoration-thickness: 2px; text-underline-offset: .2em;
}

@media (max-width: 40em) {
    .acc-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .acc-input, .acc-check input, .acc-segment span { transition: none; }
}

/* Закрите вікно входу не потрапляє в порядок Tab (оболонка сайту ховає вікна лише прозорістю) */
#popupLogin { visibility: hidden; transition: opacity .65s ease 0s, visibility 0s linear .65s; }
#popupLogin.popup_show { visibility: visible; transition: opacity .65s ease 0s, visibility 0s linear 0s; }

/* Поле телефону з вибором країни (спільний <x-phone-input>, public/ui/phone-field.css) у формах сайту */
.acc .iti.phone-field { color: var(--acc-ink); }
.acc .iti.phone-field .acc-input { width: 100%; }
.acc .iti.phone-field .iti__selected-country { border-radius: 0; }
.acc .iti.phone-field .iti__selected-dial-code { font-weight: 600; }
/* сильніший за загальний .phone-field__error:not(...) з phone-field.css — темно-червоний читається на сірій картці */
.acc .acc-field[data-phone-block] > .phone-field__error { margin: 0; color: var(--acc-error); font-size: .8125rem; line-height: 1.4; font-weight: 600; }

/* ---------- Юридичні документи (згода на обробку ПД, нерозголошення) ---------- */
.acc-check__doc {
    border: 0; padding: 0; margin: 0; background: none; cursor: pointer; text-align: left;
    font: inherit; font-weight: 500; line-height: 1.4; color: var(--acc-ink);
    text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.acc-check__doc:hover { text-decoration-style: solid; text-decoration-color: var(--acc-red); }
.acc-check__doc:focus-visible { outline: 2px solid var(--acc-ink); outline-offset: 3px; }
div.acc-check { cursor: default; }
.popup__content.acc-popup--doc { max-width: 48rem; }
.acc-doc { margin: 0 0 1.75rem; font-size: .9375rem; line-height: 1.55; font-weight: 500; color: var(--acc-ink); }
.acc-doc h3 { margin: 1.5rem 0 .5rem; font: 700 1rem/1.3 Montserrat, sans-serif; color: var(--acc-ink); }
.acc-doc p { margin: 0 0 .75rem; }
.acc-doc ul { margin: 0 0 .75rem; padding-left: 1.25rem; list-style: disc; }
.acc-doc li { margin: .25rem 0; }
.acc-doc a { color: var(--acc-ink); text-decoration: underline; text-decoration-color: var(--acc-red); text-underline-offset: .2em; }
.acc-doc__version { margin-top: 1.25rem !important; font-size: .8125rem; color: var(--acc-muted); }
/* закриті вікна не потрапляють у порядок Tab */
.popup.acc-modal { visibility: hidden; transition: opacity .65s ease 0s, visibility 0s linear .65s; }
.popup.acc-modal.popup_show { visibility: visible; transition: opacity .65s ease 0s, visibility 0s linear 0s; }
.acc-doc ul > li { list-style: disc outside; display: list-item; }
.acc-doc ul > li::marker { color: var(--acc-red); }
.acc-popup--doc .acc__title { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); padding-right: 3.5rem; }

/* РНОКПП або паспорт (public/ui/tax-id.js): приховані частини не показувати, навіть якщо клас задає display */
[data-taxid] [hidden] { display: none !important; }
.acc [data-taxid-passport] { display: grid; gap: .75rem; margin-top: .25rem; }
