.form-page {
    max-width: 1048px;
    margin: 0 auto;
    padding: 27px 20px 48px;
}

.form-page__content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-page .breadcrumb {
    margin: 0;
}

.form-page__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--cke-brand);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
}

.form-page__back:hover {
    text-decoration: underline;
}

.form-page__back img {
    display: block;
    width: 16px;
    height: 16px;
}

.form-page__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -24px;
}

.form-page__header h1 {
    margin: 0;
    color: var(--cke-ink);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.form-page__header p {
    max-width: 835px;
    margin: 0;
    color: var(--cke-ink);
    font-size: 16px;
    line-height: 1.5;
}

.form-page__form-shell {
    padding-bottom: 16px;
}

.form-page__form-shell form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-page .form-builder-section {
    margin: 0;
    padding: 32px;
    border: 1px solid var(--cke-border-soft);
    border-radius: 12px;
    background: var(--cke-surface-strong);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .05);
}

.form-page .form-builder-section > h2,
.form-page .form-builder-section__heading > h2 {
    margin: 0 0 16px;
    color: var(--Base-Neutral-Black-00);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.form-page .form-builder-section__heading,
.form-page .form-field-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-page .form-field-group__header h3 {
    margin-bottom: 12px;
}

.form-page [data-repeatable-item][hidden] {
    display: none;
}

.form-page__add-document,
.form-page__remove-document {
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.form-page__add-document {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 6px 24px;
    border-radius: 32px;
    background: var(--primary-500, #004488);
    color: var(--White, #FBFBFB);
    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.form-page__add-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.form-page__add-document-icon img {
    display: block;
    width: 13.5px;
    height: 13.5px;
}

.form-page__add-document-label,
.form-page__add-document-icon {
    line-height: 1;
    text-decoration: none;
}

.form-page__remove-document {
    margin: 0 0 12px;
    padding: 0;
    color: var(--Red-900, #B71C1C);
    text-align: right;
    font-family: "Nunito Sans", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
}

.form-page .form-page__add-document:hover,
.form-page .form-page__add-document:focus-visible,
.form-page .form-page__add-document:active {
    background: var(--primary-500, #004488);
    color: var(--White, #FBFBFB);
    text-decoration: none;
}

.form-page .form-page__add-document:hover .form-page__add-document-icon,
.form-page .form-page__add-document:focus-visible .form-page__add-document-icon,
.form-page .form-page__add-document:active .form-page__add-document-icon {
    text-decoration: none;
}

.form-page .form-page__add-document:hover .form-page__add-document-label,
.form-page .form-page__add-document:focus-visible .form-page__add-document-label,
.form-page .form-page__add-document:active .form-page__add-document-label {
    text-decoration: underline;
}

.form-page .form-page__remove-document:hover,
.form-page .form-page__remove-document:focus-visible,
.form-page .form-page__remove-document:active {
    background: transparent;
    color: var(--Red-900, #B71C1C);
    text-decoration: underline;
}

.form-generated-file {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    overflow: hidden;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    background: #fff;
}

.form-generated-file h2 {
    margin: 0;
    color: #22272f;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.form-generated-file__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid #c1cddb;
    border-radius: 8px;
    background: #f7fafc;
}

.form-generated-file__format {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    border-radius: 4px;
    background: #e1e8f0;
    color: #0f263b;
    font-size: 12px;
    line-height: 1.5;
}

.form-generated-file__info {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    line-height: 1.5;
}

.form-generated-file__name {
    overflow: hidden;
    color: #223954;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-generated-file__meta {
    color: #516a87;
    font-size: 14px;
}

.form-generated-file__download {
    display: inline-flex;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 12px 24px;
    border: 0;
    border-radius: 90px;
    background: #004488;
    color: #fff;
    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.form-generated-file__description {
    margin: 0;
    color: #080808;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .form-generated-file {
        padding: 24px;
    }

    .form-generated-file__row {
        align-items: stretch;
        flex-direction: column;
    }

    .form-generated-file__download {
        width: 100%;
    }
}

.form-page .form-section-description {
    margin: -8px 0 16px;
    color: var(--cke-ink);
    font-size: 16px;
}

.form-leave-modal .modal__backdrop {
    background: rgba(8, 8, 8, 0.2);
}

.form-page .form-field-group + .form-field-group {
    margin-top: 16px;
}

.form-page .form-field-group--nested {
    padding: 8px;
    border: 1px solid var(--cke-border-soft);
    border-radius: 4px;
    background: #f6f9fc;
}

.form-page .form-field-group h3 {
    margin: 0 0 12px;
    color: var(--Base-Neutral-Black-00);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.form-page .form-fields-grid {
    gap: 16px;
}

.form-page .custom-dropdown {
    display: block;
    width: 100%;
}

.form-page .custom-dropdown__trigger {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--cke-ink-soft);
    border-radius: 16px;
    background: var(--cke-surface);
    color: #516a87;
    font: inherit;
    line-height: 1.5;
}

.form-page .custom-dropdown__trigger:hover,
.form-page .custom-dropdown__trigger:focus-visible,
.form-page .custom-dropdown.is-open .custom-dropdown__trigger {
    border-color: var(--cke-brand);
    background: var(--cke-surface);
    color: #080808;
}

.form-page .custom-dropdown__trigger:focus-visible {
    outline: 3px solid var(--semantic-focus-40);
    outline-offset: 2px;
}

.form-page .custom-dropdown__value {
    flex: 1 1 auto;
    color: #516a87;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.form-page .custom-dropdown[data-custom-dropdown-selected-value]:not([data-custom-dropdown-selected-value=""]) .custom-dropdown__value {
    color: #080808;
}

.form-page .custom-dropdown__chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.form-page .custom-dropdown__chevron-icon {
    width: 16px;
    height: 16px;
}

.form-page .custom-dropdown.is-open .custom-dropdown__chevron {
    transform: rotate(180deg);
}

.form-page .custom-dropdown__panel {
    top: calc(100% + 4px);
    width: 100%;
    max-width: none;
    border-radius: 12px;
}

.form-page .custom-dropdown__option {
    min-height: 48px;
    padding: 12px;
}

.form-page .custom-dropdown.is-invalid .custom-dropdown__trigger {
    border-color: #f04438;
}

.form-page .form-field {
    margin: 0;
}

.form-page .form-field label,
.form-page .form-legend {
    margin: 0 0 4px;
    color: #080808;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.form-page .form-field label > span[aria-hidden="true"] {
    color: #b71c1c;
}

.form-page input:not([type="checkbox"]):not([type="radio"]):not(.custom-calendar__input),
.form-page select,
.form-page textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border: 1px solid var(--cke-ink-soft);
    border-radius: 16px;
    background-color: var(--cke-surface);
    color: #080808;
    font: inherit;
    line-height: 1.5;
}

.form-page input::placeholder,
.form-page textarea::placeholder,
.form-page select:invalid {
    color: #516a87;
    opacity: 1;
}

.form-page select {
    appearance: none;
    padding-right: 44px;
    background-image: url('/images/shared/arrow-down.svg');
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 24px 24px;
}

.form-page .form-field:has(input[aria-invalid="true"]) input,
.form-page .form-field:has(select[aria-invalid="true"]) select,
.form-page .form-field:has(textarea[aria-invalid="true"]) textarea {
    border-color: #f04438;
}

.form-page .form-field:has(.custom-calendar__input[aria-invalid="true"]) .custom-calendar__input {
    border-color: #f04438;
}

.form-page .choice {
    gap: 12px;
    align-items: center;
    min-height: 24px;
}

.form-page .choice input {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    margin: 0;
    vertical-align: middle;
    accent-color: var(--cke-brand);
}

.form-page .choice span {
    color: #080808;
    font-size: 16px;
    line-height: 1.5;
}

.form-page .field-hint {
    margin: 0;
    color: var(--cke-ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.form-page .field-error {
    color: #b71c1c;
    font-size: 14px;
}

.form-page__message,
.form-page__error {
    padding: 16px;
    border-radius: 12px;
}

.form-page__message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px;
    border: 1.5px solid #13800a;
    background: #e3f8e2;
    color: #13800a;
}

.form-page__message h2,
.form-page__error h2 {
    margin: 0;
}

.form-page__message h2 {
    color: #13800a;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.form-page__message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.form-page__message-icon img {
    display: block;
    width: 24px;
    height: 24px;
}

.form-page__error {
    border: 1.5px solid #b71c1c;
    background: #ffebee;
    color: #b71c1c;
    font-size: 16px;
    scroll-margin-top: 24px;
}

.form-page__error h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.form-page__error-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-page__error-heading img {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.form-page__error ul {
    display: grid;
    gap: 5px;
    margin: 14px 0 0 21px;
    padding: 0;
    list-style: none;
}

.form-page__error li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 15px;
    font-size: 16px;
    line-height: 1.5;
}

.form-page__error li img {
    display: block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.form-page__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-page__button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 32px;
    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
    text-decoration: none;
}

.form-page__button--secondary {
    border: 1px solid var(--cke-brand);
    background: var(--cke-surface-strong);
    color: var(--cke-brand);
}

.form-page__button--primary {
    border: 1px solid var(--cke-brand);
    background: var(--cke-brand);
    color: #fff;
    cursor: pointer;
}

.form-page__button:hover {
    text-decoration: none;
}

.form-page__button--secondary:hover {
    background: var(--cke-surface-accent);
    color: var(--cke-brand);
}

.form-page__button--primary:hover {
    background: var(--cke-brand-hover);
}

.form-page__back:focus-visible,
.form-page__button:focus-visible,
.form-page input:not(.custom-calendar__input):focus-visible,
.form-page select:focus-visible,
.form-page textarea:focus-visible {
    outline: 3px solid var(--semantic-focus-40);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .form-page {
        padding-right: 16px;
        padding-left: 16px;
    }

    .form-page .form-builder-section {
        padding: 20px 16px;
    }

    .form-page .form-field {
        grid-column: span 12;
    }

    .form-page__actions {
        flex-direction: column-reverse;
    }

    .form-page__button {
        width: 100%;
    }
}
