/* ==========================================================================
   Заявка на участие (индивидуальная и командная).
   Светлые макеты 1600 px: 423:35, 509:6592, 459:383, 459:770, 459:2880.
   Hero, кнопки, футер и контейнер берутся из style.css.
   ========================================================================== */

:root {
    --app-blue: #094aaa;
    --app-line: #7898d0;
    --app-text: #596d8f;
    --app-grey: #f0f1f2;
    --app-chip: rgba(120, 152, 208, .1);
}

body.page-app {
    background: #fdfdff;
}

/* --------------------------------------------------------------------------
   Hero: заголовок в две части, без фото и точек
   -------------------------------------------------------------------------- */

.hero--app .hero__content {
    top: 227px;
    width: 900px;
}

.hero--app .hero__title {
    width: 579px;
}

.hero__subtitle {
    width: 867px;
    margin: 4px 0 0 9px;
    font-weight: 400;
    font-size: 49.411px;
    line-height: 53.529px;
    letter-spacing: -1.647px;
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Вводная часть
   -------------------------------------------------------------------------- */

.app {
    padding-bottom: 87px;
}

.app-intro {
    padding-top: 32.5px;
}

.app-intro__lead {
    width: 1107px;
    max-width: 100%;
    margin-left: -1px;
    font-size: 32px;
    line-height: 48px;
    letter-spacing: -1.2px;
    color: #000;
}

.app-intro__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 827px;
    max-width: 100%;
    margin: 14px 0 0 -2px;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 21px;
    width: 100%;
    min-height: 60px;
    padding: 5px 22px;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: 21.818px;
    letter-spacing: 1.12px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease, background-color .2s ease;
}

.app-btn:hover {
    filter: brightness(.97);
}

.app-btn:active {
    transform: translateY(1px);
}

.app-btn--grey {
    background: var(--app-grey);
    color: var(--app-blue);
}

.app-btn--green {
    background: var(--green);
    color: #fff;
}

.app-btn--green:hover {
    filter: brightness(1.06);
}

.app-btn__icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.app-btn__icon--check {
    width: 22px;
    height: 22px;
}

.app-btn__icon--up {
    transform: scaleY(-1);
}

/* «Ознакомлен»: по просьбе клиента до клика серая с пустым кружком, после клика зелёная с галочкой */
.app-btn--ack .app-btn__icon--done,
.app-btn--ack.is-done .app-btn__icon--empty {
    display: none;
}

.app-btn--ack.is-done .app-btn__icon--done {
    display: block;
}

.app-btn--ack.is-done {
    background: var(--green);
    color: #fff;
}

.app-btn--ack.is-invalid {
    box-shadow: inset 0 0 0 1px #c4453f;
}

.app-intro__note {
    width: 920px;
    max-width: 100%;
    margin-top: 33.68px;
    font-size: 19px;
    line-height: normal;
    letter-spacing: -.2px;
    color: var(--muted);
}

.app-intro__note + .app-intro__note {
    width: 823px;
    margin-top: 12.5px;
    margin-left: -.5px;
}

.app-intro__note b {
    font-weight: 700;
}

.app-intro__foot {
    position: relative;
    margin-top: 14.8px;
}

.app-intro__wish {
    font-weight: 600;
    font-size: 18px;
    line-height: 44px;
    letter-spacing: -1.2px;
    text-transform: uppercase;
    color: var(--app-blue);
}

/* Бейдж с таймером (Group 11829, 255×53) ---------------------------------- */

.app-timer {
    position: absolute;
    left: 627.6px;
    top: -1.33px;
    width: 254.806px;
    height: 52.813px;
    pointer-events: none;
}

.app-timer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/svg/app/timer-badge.svg') no-repeat 0 0 / 100% 100%;
    transform: rotate(180deg);
}

.app-timer__inner {
    position: absolute;
    left: 6.22px;
    top: 21.09px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 24px;
    color: var(--badge-text);
    font-size: 16px;
    line-height: normal;
    white-space: nowrap;
}

.app-timer__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.app-timer__icon img {
    width: 3px;
    height: 14.64px;
}

/* --------------------------------------------------------------------------
   Карточка формы
   -------------------------------------------------------------------------- */

.app-form {
    margin-top: 38px;
}

.app-card {
    padding: 34px 95px 30px;
    border-radius: 14px;
    background: var(--surface);
}

.app-card--member {
    padding-bottom: 62px;
}

.app-card__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 918px;
    max-width: 100%;
}

.app-card__inner--team {
    gap: 10px;
}

/* карточка темы командной заявки (459:536): 1110×410 */
.app-card--team {
    padding-bottom: 57px;
}

/* пока участники не выбраны, кнопки отправки нет и футер ближе (459:383) */
.app:has(.app-submit[hidden]) {
    padding-bottom: 52px;
}

/* командная форма: свёрнутые участники → футер через 58 (459:770), после «Отправить» — 105 (459:2880) */
.app:has([data-nomination="team"]) {
    padding-bottom: 69px;
}

.app:has([data-nomination="team"] .app-member):has(.app-submit[hidden]) {
    padding-bottom: 22px;
}

.app-card__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 117px;
}

.app-card__heading {
    font-weight: 600;
    font-size: 18px;
    line-height: normal;
    text-transform: uppercase;
    color: #000;
}

.app-card__sub {
    margin-top: 6px;
    font-weight: 500;
    font-size: 18px;
    line-height: normal;
    color: var(--muted);
}

.app-card__hint {
    font-weight: 500;
    font-size: 14px;
    line-height: normal;
    color: var(--muted-2);
}

/* Поля ----------------------------------------------------------------- */

.app-field {
    display: block;
    width: 100%;
    min-height: 60px;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    box-shadow: none;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    resize: none;
    overflow: hidden;
}

.app-field::placeholder {
    color: var(--app-text);
    opacity: 1;
}

.app-field:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 3px rgba(9, 74, 170, .12);
}

.app-field.is-invalid,
.app-box.is-invalid,
.app-upload.is-invalid {
    border-color: #c4453f;
}

/* Блоки с вариантами и загрузкой ---------------------------------------- */

.app-box {
    padding: 18px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #fff;
}

.app-box--choice {
    min-height: 120px;
}

.app-box--plain {
    min-height: 299px;
    border-color: transparent;
}

.app-box--student {
    min-height: 232px;
}

/* выбор темы: из списка организатора или своя (правка клиента 07.09.2026) */
.app-box--theme {
    min-height: 0;
}

.app-box--theme .app-select,
.app-box--theme .app-field--own {
    margin-top: 16px;
}

.app-box--theme [hidden] {
    display: none;
}

.app-select {
    position: relative;
}

.app-select__toggle {
    position: relative;
    width: 100%;
    padding-right: 48px;
    text-align: left;
    cursor: pointer;
    white-space: normal;
}

.app-select__toggle::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--app-blue);
    border-bottom: 2px solid var(--app-blue);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
}

.app-select__toggle[aria-expanded="true"]::after {
    transform: translateY(-20%) rotate(-135deg);
}

.app-select__toggle.is-placeholder {
    color: var(--app-text);
}

.app-select__label {
    display: block;
    font-size: 16px;
    line-height: 22px;
}

/* раскрытый список: темы переносятся целиком, шрифт меньше (просьба клиента 08.09.2026) */
.app-select__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 0;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(9, 74, 170, .12);
}

.app-select__menu[hidden] {
    display: none;
}

.app-select__group {
    padding: 12px 18px 6px;
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--app-blue);
}

.app-select__option {
    display: block;
    width: 100%;
    padding: 9px 18px;
    border: 0;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 20px;
    text-align: left;
    white-space: normal;
    cursor: pointer;
}

.app-select__option:hover,
.app-select__option:focus-visible {
    background: var(--app-chip);
    outline: none;
}

.app-select__option[aria-selected="true"] {
    color: var(--app-blue);
    font-weight: 600;
}

.app-upload.is-invalid .app-btn {
    box-shadow: inset 0 0 0 1px #c4453f;
}

.app-box__label {
    font-size: 18px;
    line-height: 22px;
    color: var(--app-text);
}

.app-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 16px;
}

.app-chips--wide {
    gap: 16px;
}

.app-chip {
    position: relative;
    display: flex;
    flex: 0 0 170px;
    align-items: center;
    gap: 12px;
    width: 170px;
    height: 43px;
    padding: 12px;
    border-radius: 8px;
    background: var(--app-chip);
    font-size: 14px;
    line-height: normal;
    color: var(--app-text);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease, color .2s ease;
}

.app-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.app-chip__icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    transition: filter .2s ease;
}

.app-chip:hover {
    background: rgba(120, 152, 208, .18);
}

.app-chip:has(input:checked),
.app-chip.is-checked {
    background: var(--green);
    color: #fff;
}

.app-chip:has(input:checked) .app-chip__icon,
.app-chip.is-checked .app-chip__icon {
    filter: brightness(0) invert(1);
}

.app-chip:has(input:focus-visible) {
    outline: 2px solid var(--app-blue);
    outline-offset: 2px;
}

.app-box .app-btn {
    width: 835px;
    max-width: 100%;
    margin-top: 16px;
}

.app-box__note {
    width: 836px;
    max-width: 100%;
    margin-top: 16px;
    font-size: 18px;
    line-height: 22px;
    color: var(--app-text);
}

.app-box__note b {
    font-weight: 700;
}

/* Загрузка файла ---------------------------------------------------------- */

.app-upload {
    position: relative;
}

.app-upload input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.app-upload.is-filled {
    background: #e4f5ec;
    color: #0a7a3c;
}

.app-upload.is-filled .app-btn__icon {
    filter: hue-rotate(-70deg) saturate(1.4);
}

.app-upload__name {
    display: none;
    margin-top: 6px;
    font-size: 14px;
    line-height: 18px;
    color: var(--green);
}

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

.app-submit {
    justify-content: flex-start;
    gap: 12px;
    margin: 46px 0 0 95.5px;
    padding-left: 12px;
}

/* в макете блок персональных полей начинается на 2 px выше сетки */
.app-card__inner > .app-field:nth-of-type(2) {
    margin-top: -2px;
}

.app-submit__icon {
    width: 24px;
    height: 16px;
    flex: 0 0 auto;
}

.app-submit[hidden] {
    display: none;
}

.app-submit[disabled] {
    opacity: .6;
    cursor: wait;
    box-shadow: none;
    transform: none;
}

.app-message {
    display: none;
    width: 918px;
    max-width: 100%;
    margin: 20px 0 0 95.5px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #e4f5ec;
    font-size: 16px;
    line-height: 22px;
    color: #0a7a3c;
}

.app-message.is-visible {
    display: block;
}

.app-message--error {
    background: #fdecea;
    color: #c4453f;
}

/* Командная заявка: участники --------------------------------------------- */

.app-members {
    display: flex;
    flex-direction: column;
}

.app-member {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
    height: 59px;
    margin: 51px 0 0 95.5px;
    padding: 5px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: normal;
    letter-spacing: 1.12px;
    cursor: pointer;
    transition: filter .2s ease;
}

/* свёрнутые кнопки идут с шагом 16 (459:770, 459:2090); после раскрытой карточки — 51 */
.app-member[aria-expanded='false'] + .app-card--member + .app-member {
    margin-top: 16px;
}

.app-member:hover {
    filter: brightness(1.06);
}

.app-member__icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.app-member[aria-expanded='true'] {
    margin-left: 121.5px;
}

.app-member[aria-expanded='true'] + .app-card--member {
    display: block;
}

.app-card--member {
    display: none;
    margin-top: 45px;
}

.app-card--member + .app-member {
    margin-top: 45px;
}

.app:has([data-nomination="team"]) .app-submit {
    margin-top: 43px;
}

/* --------------------------------------------------------------------------
   Всплывающие окна (479:6590 — очная форма, 479:6564 — тема участника)
   -------------------------------------------------------------------------- */

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(22, 28, 45, .45);
}

.app-modal[hidden] {
    display: none;
}

.app-modal__box {
    position: relative;
    width: 734.689px;
    max-width: 100%;
    min-height: 249.255px;
    padding: 37.38px 50.8px 37px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 30px 60px -20px rgba(9, 74, 170, .35);
}

.app-modal__text {
    width: 648.711px;
    max-width: 100%;
    font-size: 18px;
    line-height: normal;
    letter-spacing: 1.44px;
    color: #000;
}

.app-modal__text + .app-modal__text {
    margin-top: 0;
}

.app-modal__text b {
    font-weight: 700;
}

.app-modal__close {
    position: absolute;
    right: 32px;
    top: 17px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    opacity: .8;
}

.app-modal__close:hover {
    opacity: 1;
}

.app-modal__close img {
    width: 20px;
    height: 20px;
}

/* Приём заявок завершён ----------------------------------------------------- */

.app-closed {
    margin-top: 38px;
    padding: 34px 95px;
    border-radius: 14px;
    background: var(--surface);
    font-size: 22px;
    line-height: 32px;
    color: #000;
}

.app-closed a {
    color: var(--app-blue);
}
