/* Лендинг «Обслуживание сайтов» (/support/). Цвета, шрифты, шапка и сетка — из /style.css,
   поля формы — как в каталоге сувениров (/merch/) */

.support_page {
    /* Голубой светлее фирменного: мелкий текст этого цвета на синем читается лучше */
    --support-accent-text: #4CC9EC;
    --support-muted: rgba(255, 255, 255, 0.7);
    --support-placeholder: rgba(255, 255, 255, 0.6);
    --support-line: #6A93AF;
    --support-error: #FFA8A8;
    --support-field: rgba(7, 37, 57, 0.35);
    color: var(--white);
}

/* Якоря не прячутся под прилипшей шапкой. support.js уточняет отступ по её настоящей высоте */
html {
    scroll-padding-top: 108px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

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

/* style.css убирает обводку фокуса у всех элементов, для работы с клавиатуры она нужна */
.support_page :focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
}

.support_page button,
.support_page input,
.support_page select,
.support_page textarea {
    font-family: inherit;
}

.support_page a:not(.button) {
    color: inherit;
}

.support_logo {
    display: flex;
    align-items: center;
}

/* Светлый голубой: фирменный #0BB4E1 на синем фоне формы слишком бледный для мелкого знака */
.support_req {
    color: var(--support-accent-text);
    margin-left: 4px;
}

/* «152-ФЗ», «1-го», «что-то», «9:00–22:00», «пн–пт» не переносятся по дефису и тире (обёртку добавляет t() в index.php) */
.support_nowrap {
    white-space: nowrap;
}

/* Заголовки */

.support_page .support_h1 {
    max-width: 900px;
}

.support_page .support_h2 {
    font-size: 44px;
    line-height: 48px;
    letter-spacing: -1.1px;
    text-wrap: balance;
}

.support_card_title {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    color: var(--white);
}

/* Списки с галочкой, как в блоках главной */

.support_check {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.support_check li {
    position: relative;
    padding-left: 36px;
    font-size: 16px;
    line-height: 24px;
}

.support_check li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.95 12L10.65 14.7L16.05 9.3M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="%230BB4E1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

.support_dots {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support_dots li {
    position: relative;
    padding-left: 22px;
    font-size: 16px;
    line-height: 24px;
}

.support_dots li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

/* Кнопки */

.support_page .support_button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.support_button_outline {
    display: inline-block;
    padding: 15px 39px;
    border: 1px solid var(--accent);
    border-radius: 100px;
    background: transparent;
    color: var(--white);
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.support_page a.support_button_outline {
    color: var(--white);
}

.support_button_outline:hover {
    background: rgba(11, 180, 225, 0.14);
}

.support_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

/* Первый экран */

.support_hero_list {
    max-width: 780px;
}

.support_hero_list li {
    font-size: 18px;
}

.support_hero_price {
    font-size: 30px;
    line-height: 36px;
    font-weight: 500;
}

/* Тарифы */

.support_section_head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 32px;
}

/* Переключатель периода работает только с JavaScript, без него показаны цены за месяц */
.support_period {
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 100px;
    background: var(--blue);
}

.js .support_period {
    display: inline-flex;
}

.support_period_button {
    border: none;
    border-radius: 100px;
    padding: 10px 20px;
    background: none;
    color: var(--white);
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

/* Не светлее: на более светлом фоне «−5%» и «−10%» хуже читаются */
.support_period_button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.support_period_button[aria-pressed="true"] {
    background: var(--accent);
}

.support_period_off {
    color: var(--support-accent-text);
}

.support_period_button[aria-pressed="true"] .support_period_off {
    color: var(--white);
}

.support_tariffs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.support_tariff {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 32px 28px 28px;
    border-radius: 24px;
    background: var(--blue);
}

.support_tariff.is_recommended {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.support_badge {
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--accent);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

/* В три колонки пометка сидит на верхней рамке карточки: иначе названия и цены «Стандарта» ниже, чем у соседей */
@media (min-width: 1101px) {
    .support_badge {
        position: absolute;
        top: 0;
        left: 28px;
        margin: 0;
        transform: translateY(-50%);
    }
}

.support_tariff_name {
    font-size: 30px;
    line-height: 36px;
    font-weight: 500;
    letter-spacing: -0.6px;
}

.support_tariff_for {
    margin-top: 8px;
    font-size: 16px;
    line-height: 22px;
    color: var(--support-muted);
}

.support_price {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.support_price_value {
    font-size: 40px;
    line-height: 44px;
    font-weight: 500;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.support_price_unit {
    font-size: 14px;
    line-height: 20px;
    color: var(--support-muted);
}

.support_price_total {
    margin-top: 6px;
    font-size: 14px;
    line-height: 20px;
    color: var(--support-accent-text);
}

.support_tariff_note {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--support-field);
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
}

.support_tariff_lead {
    margin-top: 24px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    color: var(--support-accent-text);
}

.support_tariff_list {
    margin-top: 16px;
    margin-bottom: 28px;
}

.support_tariff_lead + .support_tariff_list {
    margin-top: 12px;
}

.support_tariff_note + .support_tariff_list {
    margin-top: 24px;
}

/* Кнопка внизу карточки, на одной линии у всех тарифов */
.support_page .support_tariff_button {
    margin-top: auto;
    width: 100%;
}

.support_notes {
    max-width: 880px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    color: var(--support-muted);
}

/* Подробное сравнение */

.support_compare_summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--support-accent-text);
    cursor: pointer;
    list-style: none;
}

.support_compare_summary::-webkit-details-marker {
    display: none;
}

.support_compare_summary::after {
    content: '';
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M5 7.5L10 12.5L15 7.5" stroke="%234CC9EC" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
    transition: transform 0.2s ease;
}

.support_compare[open] .support_compare_summary::after {
    transform: rotate(180deg);
}

.support_compare_summary:hover {
    color: var(--white);
}

.support_table_wrap {
    margin-top: 20px;
    overflow-x: auto;
    border-radius: 16px;
    background: var(--blue);
}

/* 720px — таблица целиком помещается на планшете шириной 768px, на более узком экране она листается вбок */
.support_table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 21px;
}

.support_table th,
.support_table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(106, 147, 175, 0.35);
}

.support_table thead th {
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    color: var(--white);
}

.support_table tbody th {
    width: 25%;
    font-weight: 400;
    color: var(--support-muted);
}

.support_table tbody tr:last-child > * {
    border-bottom: none;
}

/* Первая колонка остаётся на месте, когда таблицу листают вбок на телефоне */
.support_table tr > :first-child {
    position: sticky;
    left: 0;
    background: var(--blue);
}

/* Карточки: опции, что входит, разовые работы */

.support_card {
    min-width: 0;
    padding: 32px;
    border-radius: 24px;
    background: var(--blue);
}

.support_card_price {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--support-accent-text);
}

.mt16 {
    margin-top: 16px;
}

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

.support_options.is_single {
    grid-template-columns: minmax(0, 880px);
}

.support_included {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.support_included_col.is_main {
    box-shadow: inset 0 0 0 1px var(--accent);
}

/* Вопросы и ответы */

.support_faq {
    max-width: 880px;
    border-top: 1px solid var(--blue-light);
}

.support_faq_item {
    border-bottom: 1px solid var(--blue-light);
}

.support_faq_question {
    position: relative;
    display: block;
    padding: 20px 48px 20px 0;
    font-size: 20px;
    line-height: 26px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.support_faq_question::-webkit-details-marker {
    display: none;
}

/* Плюс, который превращается в минус у открытого вопроса */
.support_faq_question::before,
.support_faq_question::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 18px;
    height: 2px;
    margin-top: -1px;
    border-radius: 1px;
    background: var(--accent);
    transition: transform 0.2s ease;
}

.support_faq_question::after {
    transform: rotate(90deg);
}

.support_faq_item[open] .support_faq_question::after {
    transform: rotate(0deg);
}

.support_faq_question:hover {
    color: var(--support-accent-text);
}

.support_faq_answer {
    padding: 0 48px 24px 0;
    font-size: 18px;
    line-height: 26px;
    color: var(--support-muted);
}

@media (prefers-reduced-motion: reduce) {
    .support_compare_summary::after,
    .support_faq_question::before,
    .support_faq_question::after {
        transition: none;
    }
}

/* Заявка */

.support_form_box {
    max-width: 760px;
    padding: 48px;
    border-radius: 24px;
    background: var(--blue);
}

.support_noscript {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--support-field);
}

.support_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Без JavaScript заявку не отправить (сервер ждёт отметку js_check): остаётся только подсказка с адресом почты */
html:not(.js) .support_form {
    display: none;
}

.support_form .hp {
    position: absolute;
    left: -9999px;
}

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

.support_label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
}

.support_input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--support-line);
    border-radius: 8px;
    background: var(--support-field);
    color: var(--white);
    font-size: 16px;
    line-height: 22px;
    transition: border-color 0.15s ease;
}

textarea.support_input {
    resize: vertical;
    min-height: 96px;
}

.support_input::placeholder {
    color: var(--support-placeholder);
    opacity: 1;
}

.support_input:hover,
.support_input:focus {
    border-color: var(--accent);
}

.support_page .support_input:focus-visible {
    outline-offset: 1px;
}

/* Список: своя стрелка, тёмное системное меню */
.support_select_wrap {
    position: relative;
}

.support_select_wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    pointer-events: none;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M5 7.5L10 12.5L15 7.5" stroke="white" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

.support_select {
    padding-right: 44px;
    color-scheme: dark;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.support_select option {
    background: var(--blue-dark);
    color: var(--white);
}

.support_hint {
    margin-top: 8px;
    font-size: 13px;
    line-height: 18px;
    color: var(--support-muted);
}

.support_page .support_hint a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.support_error {
    margin-top: 6px;
    font-size: 14px;
    line-height: 20px;
    color: var(--support-error);
    overflow-wrap: anywhere;
}

.support_error:empty {
    margin-top: 0;
}

.support_consent .support_error {
    margin-left: 36px;
}

.has_error .support_input {
    border-color: var(--support-error);
}

.support_check_box {
    position: relative;
}

.support_check_box input {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    opacity: 0;
}

.support_check_box label {
    position: relative;
    display: block;
    padding-left: 36px;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
}

.support_check_box label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 1px solid var(--support-line);
    border-radius: 6px;
    background: var(--support-field);
}

.support_check_box input:checked + label::before {
    border-color: var(--accent);
    background: var(--accent) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3.5 8.5L6.5 11.5L12.5 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

.support_check_box input:focus-visible + label::before {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.has_error .support_check_box label::before {
    border-color: var(--support-error);
}

.support_check_box a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.support_submit_row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.support_page .support_submit[aria-disabled="true"] {
    opacity: 0.6;
    cursor: progress;
}

.support_submit_note {
    font-size: 14px;
    line-height: 20px;
    color: var(--support-muted);
}

.support_status {
    font-size: 14px;
    line-height: 20px;
    color: var(--support-muted);
}

/* Пустая строка статуса остаётся на странице, чтобы программы чтения с экрана сразу знали о ней,
   а отрицательный отступ убирает лишний промежуток в форме */
.support_status:empty {
    margin-top: -20px;
}

.support_status.is_error {
    color: var(--support-error);
}

.support_link_button {
    margin-left: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--support-accent-text);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.support_link_button:hover {
    color: var(--white);
}

.support_done {
    margin-top: 32px;
}

.support_done:focus {
    outline: none;
}

.support_done_title {
    font-size: 30px;
    line-height: 36px;
    font-weight: 500;
    letter-spacing: -0.6px;
}

.support_footer {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* В одну колонку переключатель периода стоит над карточками, а не у правого края страницы */
@media (max-width: 1100px) {
    .support_tariffs {
        grid-template-columns: minmax(0, 1fr);
        max-width: 728px;
    }

    .support_section_head {
        max-width: 728px;
    }
}

@media (max-width: 991px) {
    html {
        scroll-padding-top: 88px;
    }

    .support_page .support_h2 {
        font-size: 30px;
        line-height: 36px;
        letter-spacing: -0.6px;
    }

    .support_page .support_button {
        padding: 14px 28px;
    }

    .support_button_outline {
        padding: 13px 27px;
    }

    .support_hero_price {
        font-size: 24px;
        line-height: 30px;
    }

    .support_options,
    .support_included {
        grid-template-columns: minmax(0, 1fr);
    }

    .support_card {
        padding: 24px;
    }

    .support_faq_question {
        font-size: 18px;
        line-height: 24px;
    }

    .support_faq_answer {
        padding-right: 0;
        font-size: 16px;
        line-height: 24px;
    }

    .support_form_box {
        padding: 32px 24px;
    }
}

@media (max-width: 767px) {
    .support_tariff {
        padding: 28px 20px 20px;
    }

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

@media (max-width: 575px) {
    .support_page .support_h1 {
        font-size: 40px;
        line-height: 44px;
    }

    .support_page .support_button,
    .support_button_outline {
        width: 100%;
    }

    .support_period {
        display: none;
        width: 100%;
    }

    .js .support_period {
        display: flex;
    }

    .support_period_button {
        flex: 1 1 0;
        padding: 10px 8px;
        font-size: 15px;
    }

    .support_form_box {
        padding: 28px 16px;
        border-radius: 20px;
    }

    /* Таблица на телефоне: узкая колонка подписей и колонки тарифов по ширине экрана, чтобы целиком
       был виден хотя бы один тариф. 144px вмещает «Восстановление», 162px — «С рекомендациями» */
    .support_table {
        table-layout: fixed;
        min-width: 0;
        width: calc(144px + 3 * clamp(162px, 100vw - 208px, 200px));
    }

    .support_table tr > :first-child {
        width: 144px;
    }

    .support_table th,
    .support_table td {
        padding: 10px 12px;
    }
}

/* Таблица на планшете и горизонтальном телефоне (576–759px): видны подписи и два тарифа целиком, а третий —
   краем, чтобы было понятно, что таблицу можно листать вбок */
@media (min-width: 576px) and (max-width: 759px) {
    .support_table {
        table-layout: fixed;
        min-width: 0;
        width: calc(144px + 1.5 * (100vw - 224px));
    }

    .support_table tr > :first-child {
        width: 144px;
    }

    .support_table th,
    .support_table td {
        padding: 10px 12px;
    }
}

/* Самые узкие телефоны (до 359px): текст таблицы чуть мельче, чтобы рядом с подписями поместился целый тариф,
   а заголовок как в каталоге — «Обслуживание» в 40px занимает всю колонку 280px без запаса */
@media (max-width: 359px) {
    .support_page .support_h1 {
        font-size: 34px;
        line-height: 38px;
    }

    .support_table {
        font-size: 14px;
        line-height: 20px;
        width: calc(126px + 3 * 144px);
    }

    .support_table tr > :first-child {
        width: 126px;
    }

    .support_table th,
    .support_table td {
        padding: 10px 8px;
    }
}

/* Режим высокой контрастности Windows: видно, какой период выбран и отмечена ли галочка согласия */
@media (forced-colors: active) {
    .support_period_button[aria-pressed="true"] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
    }

    .support_period_button[aria-pressed="true"] .support_period_off {
        color: HighlightText;
    }

    .support_page .support_period_button[aria-pressed="true"]:focus-visible {
        outline-color: CanvasText;
    }

    .support_check_box input {
        opacity: 1;
    }

    .support_check_box label::before {
        display: none;
    }
}
