@font-face {
    font-family: HarmonyOS;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/HarmonyOS-Regular.woff2') format('woff2');
}

@font-face {
    font-family: HarmonyOS;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/HarmonyOS-Bold.woff2') format('woff2');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #a6192e;
}

body {
    min-width: 320px;
    font: 400 16px/19px HarmonyOS, Arial, sans-serif;
    color: #000;
}

button, input {
    font: inherit;
}

button, a, input {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: #a6192e;
    transition: color .3s;
}

:focus-visible {
    outline: 2px solid #a6192e;
    outline-offset: 4px;
}

button:disabled {
    cursor: default;
}

img {
    max-width: 100%;
    height: auto;
}

#app {
    position: relative;
    isolation: isolate;
    max-width: 1900px;
    margin: 0 auto;
}

.page-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
}

.header {
    background: #fff;
}

.header__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    padding-bottom: 30px;
}

.header__logo {
    display: flex;
    align-items: center;
    flex: 0 1 480px;
    min-width: 0;
}

.header__logo img {
    display: block;
    width: calc(100% / 3 - 20px);
    max-width: 140px;
    min-width: 0;
    margin-right: 20px;
}

.header__dealer {
    margin-left: 30px;
    font-size: 14px;
    flex-shrink: 0;
}

.header__dealer b {
    display: block;
    font-size: 16px;
}

.header__contacts {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.header__address {
    font-size: 14px;
    margin-right: 40px;
}

.header__phone {
    color: #000;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.header__phone:hover {
    color: #a6192e;
}

.hero {
    padding-top: 50px;
}

h1 {
    font-size: 30px;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
}

h1 span {
    display: block;
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
    margin: 20px auto;
}

.chat {
    width: 100%;
    max-width: 830px;
    margin: 40px auto 0;
    animation: chat-appear .7s ease both;
}

.chat__inner {
    padding: 0 15px;
}

.chat__header {
    padding: 30px;
    background: #3e3a39;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 4px 10px #26243c14;
}

.benefits {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 10px;
}

.benefits li {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    line-height: 19px;
    color: #fff;
}

.benefits__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #002c5f;
    background: #f8f8f8;
    font: 700 13px/1 Arial, sans-serif;
    position: relative;
}

.benefits__icon::after {
    content: '';
    position: absolute;
    inset: 9px;
    border: 1.5px solid #002c5f;
    border-radius: 50%;
}

.benefits__icon--svg {
    background: transparent;
}

.benefits__icon--svg::after {
    display: none;
}

.benefits__icon--svg svg {
    display: block;
    width: 36px;
    height: 36px;
}

.chat__body {
    padding: 25px 30px 100px;
    background: rgb(251 251 251 / 95%);
}

.message {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 20px;
    margin-top: 30px;
    animation: message-appear .5s ease both;
    scroll-margin-top: 110px;
}

.avatar {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.message:not(:first-child) > .avatar {
    visibility: hidden;
}

.message__content {
    min-width: 0;
}

.bubble {
    width: 100%;
    max-width: 560px;
    padding: 15px 20px;
    color: #282d30;
    background: #fff;
    font-size: 16px;
    line-height: 1.48;
    border-radius: 2px 15px 15px 15px;
    box-shadow: 0 3px 10px #26243c12;
    overflow-wrap: anywhere;
}

.bubble__text {
    white-space: pre-line;
}

.message--answer {
    display: block;
    width: 85%;
    max-width: 295px;
    margin-left: auto;
    text-align: right;
}

.message--answer .bubble {
    width: fit-content;
    margin-left: auto;
    background: linear-gradient(180deg, #ae3043, #a6192e);
    color: #fff;
    border-radius: 15px 15px 2px 15px;
}

.cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.car {
    display: block;
    width: 100%;
    border: 0;
    padding: 5px;
    background: #d4d5d5;
    color: #282d30;
    border-radius: 10px;
    font-size: inherit;
    line-height: 1.48;
    text-align: center;
    transition: opacity .3s, box-shadow .3s;
    overflow: hidden;
}

.car:hover:not(:disabled), .car:focus-visible {
    box-shadow: 0 0 0 2px #a6192e;
}

.car img {
    display: block;
    width: 100%;
}

.car > span {
    display: block;
}

.car img.car__image {
    aspect-ratio: 640 / 396;
    object-fit: contain;
}

.car__description {
    margin-top: 10px;
    text-align: left;
    overflow-wrap: anywhere;
}

.car__description p, .car__description div {
    margin: 0;
}

.car__description h2 { font-size: 1.5em; line-height: 1.3; }
.car__description h3 { font-size: 1.25em; line-height: 1.3; }
.car__description ul, .car__description ol { padding-left: 1.5em; }
.car__description .ql-align-left { text-align: left; }
.car__description .ql-align-center { text-align: center; }
.car__description .ql-align-right { text-align: right; }
.car__description .ql-align-justify { text-align: justify; }
.car__description .ql-size-small { font-size: .75em; }
.car__description .ql-size-large { font-size: 1.5em; }
.car__description .ql-size-huge { font-size: 2.5em; }
.car__description .ql-direction-rtl { direction: rtl; }
.car__description .ql-indent-1 { padding-left: 3em; }
.car__description .ql-indent-2 { padding-left: 6em; }
.car__description .ql-indent-3 { padding-left: 9em; }
.car__description .ql-indent-4 { padding-left: 12em; }
.car__description .ql-indent-5 { padding-left: 15em; }
.car__description .ql-indent-6 { padding-left: 18em; }
.car__description .ql-indent-7 { padding-left: 21em; }
.car__description .ql-indent-8 { padding-left: 24em; }

.car__name {
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.car__benefit, .car__price, .car__bonus {
    font-weight: 700;
}

.car__price, .car__bonus {
    color: #e2000b;
}

.cards--answered .car {
    opacity: .7;
}

.message__hint {
    margin-top: 30px;
}

.options {
    margin-top: 10px;
    border: 0;
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    line-height: 1.4;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.option input, .consent input {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    accent-color: #1686f9;
}

.button {
    display: block;
    border: 0;
    border-radius: 30px;
    padding: 12px 20px;
    margin-top: 13px;
    color: #fff;
    background: #a6192e;
    font-size: 15px;
    line-height: 1.2;
    box-shadow: 0 1px 8px #26243c0d;
    transition: background-color .3s, opacity .3s;
}

.button:hover:not(:disabled) {
    background: #000;
}

.button:disabled {
    opacity: .5;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 5px;
    margin-top: 15px;
}

.color-option {
    border: 0;
    border-radius: 50px;
    padding: 13px 20px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-option:hover:not(:disabled) {
    background: #e8e8e8;
}

.color-swatch {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    border-radius: 25%;
}

.color-preview {
    display: block;
    margin-top: 10px;
    transition: opacity .3s;
}

.typing {
    margin: 30px 0 0 80px;
    color: #b0b0b0;
    font-style: italic;
    font-size: 14px;
}

.contact-form {
    max-width: 300px;
    width: 100%;
    margin-top: 30px;
}

.field {
    display: block;
    margin-bottom: 15px;
    font-size: 15px;
    color: #767676;
    line-height: 1.3;
}

.field input {
    display: block;
    width: 100%;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 15px;
    padding: 7px 27px;
    margin-top: 5px;
    color: #767676;
    background: #fff;
    box-shadow: 0 4px 10px #26243c08;
    font-size: 16px;
}

.field input[aria-invalid="true"] {
    border-color: #a6192e;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 15px;
    color: #767676;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.consent input {
    margin-top: 3px;
}

.consent a {
    color: inherit;
}

.form-error {
    color: #a6192e;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 10px;
}

.demo-notice {
    color: #767676;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 15px;
}

.contact-form > .button {
    padding: 17px 40px;
    font-size: 17px;
    margin-top: 15px;
}

.restart {
    border: 0;
    background: transparent;
    color: #767676;
    font-size: 12px;
    text-decoration: underline;
    margin-top: 15px;
}

.manager {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 800px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    background: #fff;
    box-shadow: 0 0 10px #00000017;
    animation: manager-appear .2s ease;
}

.manager[hidden] {
    display: none;
}

.manager__name {
    margin: 0 auto 0 20px;
    font-size: 16px;
    line-height: 1.48;
}

.manager__name b {
    display: block;
}

.manager__phone {
    padding: 10px 15px;
    border-radius: 6px;
    background: #3e3a39;
    color: #fff;
    text-decoration: none;
    line-height: 1.48;
}

.manager__phone span {
    white-space: nowrap;
}

.footer {
    max-width: 830px;
    margin: 0 auto;
    padding: 20px 15px;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.footer > p {
    margin-bottom: 12px;
}

.offer {
    display: block;
    width: fit-content;
    margin-top: 12px;
}



dialog {
    margin: auto;
    width: min(520px, calc(100% - 30px));
    max-height: calc(100% - 40px);
    overflow: auto;
    border: 0;
    border-radius: 15px;
    padding: 30px;
    color: #282d30;
    box-shadow: 0 8px 40px #0003;
    animation: message-appear .3s ease;
}

dialog::backdrop {
    background: #000a;
}

dialog h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 20px;
}

dialog p, dialog dl {
    line-height: 1.5;
    margin-bottom: 15px;
}

dialog dt {
    font-size: 13px;
    color: #767676;
    margin-top: 10px;
}

dialog dd {
    overflow-wrap: anywhere;
}

@keyframes message-appear {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes chat-appear {
    from { opacity: 0; transform: translateY(100px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes manager-appear {
    from { opacity: 0; top: -80px; }
    to { opacity: 1; top: 0; }
}

@media (max-width: 1200px) {
    h1 { font-size: 36px; }
    .header__dealer { margin-left: 10px; }
    .header__address { margin-right: 20px; }
    .header__logo { flex-basis: 420px; }
}

@media (max-width: 996px) {
    .header__dealer { display: none; }
}

@media (max-width: 768px) {
    .header__wrapper { display: block; padding-top: 15px; padding-bottom: 15px; }
    .header__contacts { margin-left: 30px; }
    .header__address { font-size: 11px; line-height: 1.4; margin-right: 12px; white-space: nowrap; }
    .header__phone { font-size: 16px; margin-left: auto; }
    .benefits { grid-template-columns: minmax(0, 1fr); }
    .chat__body { padding: 10px; }
    .message { grid-template-columns: 45px minmax(0, 1fr); gap: 10px; }
    .avatar { width: 35px; height: 35px; }
    .bubble { padding: 9px 13px 10px; font-size: 14px; line-height: 1.4; }
    .typing { margin-left: 55px; }
    .manager { width: 100%; padding: 10px; }
    .manager__name { font-size: 10px; margin-left: 10px; }
    .manager__name b { font-size: 16px; }
    .manager__phone { font-size: 12px; padding: 10px; }
    .footer { padding-top: 18px; padding-bottom: 18px; font-size: 10px; }
}

@media (max-width: 760px) {
    h1 { font-size: 24px; }
    .button { min-height: 40px; }
    .contact-form > .button { font-size: 14px; padding: 15px; min-height: 47px; }
}

@media (max-width: 580px) {
    .hero { padding-top: 10px; }
    h1 { font-size: 16px; }
}

@media (max-width: 480px) {
    .header__logo { width: 100%; margin-bottom: 10px; gap: 0; }
    .header__logo img { width: calc(100% / 3 - 10px); margin: 0 5px; }
    .header__contacts { margin-left: 0; }
    .manager__phone { max-width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms; transition-duration: .01ms; }
}

/* Отправка реальных заявок без изменения структуры диалога. */
.contact-form { position: relative; }
.contact-trap { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-success { color: #28784e; white-space: pre-line; }
.form-success:empty { display: none; }
.button--loading::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: lead-spinner .8s linear infinite; }
@keyframes lead-spinner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .button--loading::before { animation: none; } }
