/* Бриф на разработку сайта (/brief/). Цвета, шрифты, шапка и сетка — из /style.css */

.brief_page {
    --brief-muted: rgba(255, 255, 255, 0.7);
    --brief-placeholder: rgba(255, 255, 255, 0.6);
    --brief-line: #6A93AF;
    --brief-error: #FFA8A8;
    --brief-field: rgba(7, 37, 57, 0.35);
    --brief-sticky: 124px;
}

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

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

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

.visually_hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.brief_req {
    color: var(--accent);
    margin-left: 4px;
}

.brief_noscript {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--blue);
}

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

/* Панель с брифом */

.brief_panel {
    padding: 60px 0 80px;
    color: var(--white);
    scroll-margin-top: var(--brief-sticky);
}

.brief_draft_note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 32px;
    padding: 14px 20px;
    border-radius: 12px;
    background: var(--brief-field);
    font-size: 14px;
    line-height: 20px;
}

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

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

.brief_layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}

.brief_layout.is_done {
    display: block;
}

.brief_body {
    min-width: 0;
    max-width: 880px;
}

/* Шаги */

.brief_steps {
    position: sticky;
    top: var(--brief-sticky);
}

.brief_steps ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brief_tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 12px;
    padding: 8px 12px 8px 8px;
    font-size: 16px;
    line-height: 20px;
    color: var(--brief-muted);
    text-align: left;
    cursor: pointer;
}

.brief_tab:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.brief_tab:disabled {
    cursor: default;
    color: rgba(255, 255, 255, 0.45);
}

.brief_tab_num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.brief_tab.is_done .brief_tab_num {
    border-color: var(--accent);
    color: transparent;
    background: 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="%230BB4E1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

.brief_tab.is_current {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-weight: 500;
}

.brief_tab.is_current .brief_tab_num {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* Шаг брифа: без JS видны все шаги сразу */

.js .brief_step {
    display: none;
}

.js .brief_step.is_current {
    display: block;
}

html:not(.js) .brief_steps,
html:not(.js) .brief_nav {
    display: none;
}

html:not(.js) .brief_step + .brief_step {
    margin-top: 80px;
}

.brief_step {
    scroll-margin-top: var(--brief-sticky);
}

.brief_step_count {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--accent);
}

.brief_step_title {
    margin-top: 8px;
    font-size: 40px;
    line-height: 44px;
    letter-spacing: -0.8px;
}

.brief_step_title:focus {
    outline: none;
}

.brief_step_lead {
    margin-top: 16px;
    font-size: 18px;
    line-height: 24px;
    color: var(--brief-muted);
}

.brief_items {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.brief_group {
    margin-top: 12px;
    padding-top: 36px;
    border-top: 1px solid var(--blue-light);
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
}

.brief_note {
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: rgba(11, 180, 225, 0.12);
    font-size: 16px;
    line-height: 22px;
}

/* Вопрос */

.brief_field {
    min-width: 0;
    border: none;
    scroll-margin-top: var(--brief-sticky);
}

.brief_label {
    display: block;
    padding: 0;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--white);
}

.brief_hint {
    margin: -4px 0 12px;
    font-size: 14px;
    line-height: 20px;
    color: var(--brief-muted);
}

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

.brief_error {
    margin-top: 8px;
    font-size: 14px;
    line-height: 20px;
    color: var(--brief-error);
    overflow-wrap: anywhere;
}

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

.brief_input {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--brief-line);
    border-radius: 8px;
    background: var(--brief-field);
    color: var(--white);
    font-size: 18px;
    line-height: 24px;
    transition: border-color 0.15s ease;
}

textarea.brief_input {
    resize: vertical;
    min-height: 74px;
}

.brief_input::placeholder {
    color: var(--brief-placeholder);
    opacity: 1;
}

.brief_input:hover {
    border-color: var(--accent);
}

.brief_input:focus {
    border-color: var(--accent);
}

.brief_page .brief_input:focus-visible {
    outline-offset: 1px;
}

.has_error .brief_input,
.has_error .brief_files_box {
    border-color: var(--brief-error);
}

/* Варианты ответа: чипы как в форме на главной и карточки с описанием */

.brief_options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brief_option {
    position: relative;
}

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

.brief_option label {
    display: block;
    border: 1px solid var(--brief-line);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    line-height: 20px;
    color: var(--white);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.brief_option label:hover {
    border-color: var(--accent);
}

.brief_option input:checked + label {
    background: var(--accent);
    border-color: var(--accent);
}

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

.brief_option input:disabled + label {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: var(--brief-line);
}

.has_error .brief_option label {
    border-color: var(--brief-error);
}

.has_error .brief_option input:checked + label {
    border-color: var(--accent);
}

.is_capped .brief_hint {
    color: var(--white);
}

.brief_cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.brief_cards .brief_option {
    display: flex;
}

.brief_cards .brief_option label {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    padding: 18px 52px 18px 20px;
    border-radius: 16px;
}

.brief_cards .brief_option label::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--brief-line);
    border-radius: 50%;
    box-sizing: border-box;
}

.brief_cards .brief_option input[type="checkbox"] + label::after {
    border-radius: 6px;
}

.brief_cards .brief_option input:checked + label {
    background: rgba(11, 180, 225, 0.16);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.brief_cards .brief_option input:checked + label::after {
    border: 6px solid var(--accent);
    background: var(--white);
}

.brief_cards .brief_option input[type="checkbox"]:checked + label::after {
    border: none;
    background: var(--accent) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" 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;
}

.brief_card_title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
}

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

.brief_other {
    margin-top: 12px;
    max-width: 480px;
}

/* Сайты, которые нравятся */

.brief_rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brief_row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 12px;
}

.brief_add {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px dashed var(--brief-line);
    border-radius: 8px;
    background: none;
    color: var(--white);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.brief_add:hover {
    border-color: var(--accent);
}

.brief_add span {
    font-size: 20px;
    color: var(--accent);
}

/* Файлы */

.brief_files_box {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 24px;
    border: 1px dashed var(--brief-line);
    border-radius: 16px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.brief_files_box.is_dragover {
    border-color: var(--accent);
    background: rgba(11, 180, 225, 0.1);
}

.brief_page .brief_files_pick {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    line-height: 20px;
}

.brief_files_box input:focus-visible + .brief_files_pick {
    outline: 2px solid var(--white);
    outline-offset: 3px;
}

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

.brief_files_list {
    list-style: none;
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brief_files_list:empty {
    display: none;
}

.brief_file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 8px;
    background: var(--brief-field);
    font-size: 14px;
    line-height: 20px;
}

.brief_file_name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.brief_file_size {
    flex: 0 0 auto;
    color: var(--brief-muted);
    white-space: nowrap;
}

.brief_file_remove {
    flex: 0 0 auto;
    padding: 6px 14px;
    border: 1px solid var(--brief-line);
    border-radius: 100px;
    background: none;
    color: var(--white);
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
}

.brief_file_remove:hover {
    border-color: var(--accent);
}

.brief_files_summary,
.brief_files_formats {
    flex: 1 1 100%;
    font-size: 13px;
    line-height: 18px;
    color: var(--brief-muted);
}

.brief_files_summary:empty {
    display: none;
}

/* Согласие */

.brief_check {
    position: relative;
}

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

.brief_check label {
    position: relative;
    display: block;
    padding-left: 40px;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
}

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

.brief_check 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;
}

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

.has_error .brief_check label::before {
    border-color: var(--brief-error);
}

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

.brief_consent .brief_hint,
.brief_consent .brief_error {
    margin-left: 40px;
}

.brief_consent .brief_hint {
    margin-top: 8px;
    margin-bottom: 0;
}

/* Кнопки и статус отправки */

.brief_nav {
    display: flex;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--blue-light);
}

.brief_page .brief_nav .button {
    padding: 16px 48px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.brief_next {
    margin-left: auto;
}

.brief_page .brief_prev {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--brief-line);
}

.brief_page .brief_prev:hover {
    background: var(--blue-dark);
}

.brief_page .button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.brief_status {
    margin-top: 16px;
    font-size: 14px;
    line-height: 20px;
    color: var(--brief-muted);
}

.brief_status.is_error {
    color: var(--brief-error);
}

.brief_status .brief_link_button {
    margin-left: 8px;
}

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

/* Бриф отправлен */

.brief_done {
    max-width: 720px;
    padding: 20px 0;
}

.brief_done:focus {
    outline: none;
}

.brief_done_title {
    font-size: 56px;
    line-height: 52px;
    letter-spacing: -1.68px;
}

.brief_page .brief_done_link {
    display: inline-block;
    margin-top: 40px;
}

.brief_footer {
    padding-top: 40px;
    padding-bottom: 40px;
}

@media (max-width: 991px) {
    .brief_page {
        --brief-sticky: 96px;
    }

    .brief_panel {
        padding: 32px 0 40px;
    }

    .brief_layout {
        display: block;
    }

    .brief_body {
        max-width: none;
    }

    .brief_steps {
        position: static;
        margin-bottom: 32px;
    }

    .brief_steps ol {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }

    .brief_tab,
    .brief_tab.is_current,
    .brief_tab:not(:disabled):hover {
        justify-content: center;
        padding: 4px 0;
        background: none;
    }

    .brief_tab_num {
        width: 36px;
        height: 36px;
    }

    .brief_tab_label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

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

    .brief_step_lead {
        font-size: 16px;
        line-height: 22px;
    }

    .brief_items {
        margin-top: 32px;
        gap: 28px;
    }

    .brief_group {
        margin-top: 4px;
        padding-top: 28px;
        font-size: 22px;
        line-height: 28px;
    }

    .brief_option label {
        padding: 10px 14px;
    }

    .brief_row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .brief_row + .brief_row {
        padding-top: 12px;
        border-top: 1px solid var(--blue-light);
    }

    .brief_files_box {
        padding: 20px 16px;
    }

    .brief_files_drop {
        display: none;
    }

    .brief_nav {
        margin-top: 40px;
        padding-top: 24px;
    }

    .brief_page .brief_nav .button {
        flex: 1 1 auto;
        padding: 14px 16px;
    }

    .brief_page .brief_nav .brief_prev {
        flex: 0 0 auto;
        padding: 14px 24px;
    }

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

    .brief_page .brief_done_link {
        padding: 16px 48px;
    }
}

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

    .brief_label,
    .brief_check label,
    .brief_card_title {
        font-size: 16px;
        line-height: 22px;
    }

    .brief_input {
        font-size: 16px;
        line-height: 22px;
        padding: 12px 14px;
    }

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

    .brief_file {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .brief_file_name {
        flex-basis: 100%;
    }

    .brief_file_remove {
        margin-left: auto;
    }
}
