* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

#login-form {
   display: flex;
   flex-direction: column;
   align-items: center;
   align-self: stretch;
   gap: 16px;
   width: 100%;
   max-width: 600px;
   border-radius: 30px;
   margin: 0 !important;
}

.password-wrapper {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 12px;
   align-self: stretch;
}

.password-wrapper .link-button {
   text-align: left;
}

#login-button {
   width: 100%;
   height: 64px;
   border-radius: 20px;
   border: none;
   background: #D2CAE8;
   color: #fff;
   font-size: 18px;
   font-weight: 600;
   line-height: 24px;
   pointer-events: none;
}

#login-button.active {
   background: #7527B2;
   pointer-events: auto;
}

.language-switcher {
   position: relative;
   width: 190px;
}

.language-custom-select {
   position: relative;
   width: 100%;
}

/* Кнопка селекта */

.language-select-trigger {
   position: relative;

   display: flex;
   width: 100%;
   min-height: 38px;
   padding: 10px 46px 10px 16px;

   align-items: center;
   justify-content: space-between;

   border: 1px solid #fff;
   border-radius: 12px;
   background: rgba(255, 255, 255, 0.6);
   backdrop-filter: blur(20px);

   color: #291161;
   text-align: left;

   cursor: pointer;
   transition: border-color 0.2s ease;
}

.language-custom-select.open .language-select-trigger {
   border-color: #7527B2;
}

/* Поточна мова */

.language-select-value,
.language-option-content {
   display: flex;
   min-width: 0;
   align-items: center;
   gap: 10px;
}

.language-select-value {
   color: #291161;
   font-size: 16px;
   font-weight: 400;
   line-height: 20px;
}

.language-select-flag,
.language-option-content img {
   width: 14px;
   height: 11px;
   flex-shrink: 0;
   object-fit: cover;
}

/* Стрілка */

.language-select-arrow {
   position: absolute;
   top: 50%;
   right: 16px;

   display: flex;
   align-items: center;
   justify-content: center;

   transform: translateY(-50%);
   pointer-events: none;
}

.language-select-arrow svg {
   transition: transform 0.2s ease;
   transform-origin: center;
}

.language-custom-select.open .language-select-arrow svg {
   transform: rotate(180deg);
}

/* Випадаючий список */

.language-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    bottom: auto;
    left: 0;
    z-index: 1000;

    display: none;
    width: 100%;
    max-height: 240px;
    padding: 8px;

    flex-direction: column;
    gap: 4px;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;

    border: 1px solid #fff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);

    box-sizing: border-box;
}

.language-custom-select.open .language-select-dropdown {
    display: flex;
}

/* Якщо знизу не вистачає місця */
.language-custom-select.open-up .language-select-dropdown {
    top: auto;
    bottom: calc(100% + 4px);
}

/* Варіанти мов */

.language-select-option {
   display: flex;
   width: 100%;
   min-height: 32px;
   padding: 8px 12px;

   align-items: center;
   justify-content: space-between;
   gap: 8px;

   border: none;
   border-radius: 12px;
   background: transparent;

   color: #5B4296;
   font-size: 16px;
   font-weight: 400;
   line-height: 20px;
   text-align: left;

   cursor: pointer;
   transition: background 0.2s ease;
}

.language-select-option:hover,
.language-select-option:focus-visible {
   background: #EFECF8;
   outline: none;
}

.language-option-check {
   flex-shrink: 0;
   opacity: 0;
}

.language-select-option.active .language-option-check {
   opacity: 1;
}

.native-language-select {
   position: absolute;
   width: 1px;
   height: 1px;
   padding: 0;
   margin: 0;

   opacity: 0;
   pointer-events: none;
   overflow: hidden;
}

.top-panel {
   position: static;
   display: flex;
   padding: 0;
   justify-content: center;
   align-items: center;
}

.language-switcher {
   position: relative;
   width: 190px;
}

.language-custom-select {
   position: relative;
   width: 100%;
   overflow: visible;
}

.language-custom-select.open {
   z-index: 10;
}

.language-select-trigger,
.language-select-dropdown,
.language-select-option {
   pointer-events: auto;
}

#recoveryModal {
   display: none;
   width: 406px;
   height: auto !important;
   min-height: 0 !important;
   max-height: 90%;

   padding: 40px 30px;

   flex-direction: column;
   align-items: flex-start;
   gap: 28px;

   border-radius: 30px;
   border: 1px solid #fff;
   background: rgba(255, 255, 255, 0.60);
   backdrop-filter: blur(50px);

   margin: 0 !important;
   overflow-x: hidden;
   overflow-y: auto;
}

#recoveryModal.active {
   display: flex;
}

.divider {
   width: 100%;
   height: 1px;
   border-radius: 23px;
   background: linear-gradient(90deg,
         rgba(171, 119, 235, 0.00) 0%,
         rgba(171, 119, 235, 0.50) 50.27%,
         rgba(171, 119, 235, 0.00) 100%);
   margin: 0;
   padding: 0;
}

.radio-buttons-wrapper {
   display: flex;
   flex-direction: column;
   width: 100%;
   gap: 28px;
   margin: 0;
   padding: 0;
   position: relative;
}

.recovery_modal_content {
   display: flex;
   width: 100%;
   padding: 0;

   flex: 0 0 auto;
   flex-direction: column;
   align-items: center;
   align-self: stretch;

   overflow: visible;
}

.form-wrapper {
   display: flex;
   flex-direction: column;
   overflow: visible;
   flex-shrink: 0;
   width: 100%;
   gap: 28px;
   position: relative;
}

.form-group {
   display: flex;
   width: 100%;
   flex-direction: column;
   align-items: flex-start;
   gap: 4px;
   align-self: stretch;
   padding: 0 !important;
}

.form-group input[type="text"] {
   width: 100%;
   height: fit-content;
   margin: 0 !important;
   padding: 0;
   background: transparent;
   border: none !important;
   border-radius: 0 !important;
   outline: none !important;
}

.form-group label {
   height: 20px;
   align-self: stretch;
   color: #B1A1DA;
   font-size: 16px;
   font-style: normal;
   font-weight: 400;
   line-height: 20px;
}

.additional-field {
   display: flex;
   flex-direction: column;
   width: 100%;
   align-items: flex-start;
   gap: 12px;
   align-self: stretch;
}

.research-buttons-container {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 12px;
   align-self: stretch;
}

.storage_option_recovery_modal input[type="radio"] {
   position: absolute;
   opacity: 0;
   width: 1px;
   height: 1px;
}

.storage_option_recovery_modal {
   display: flex;
   padding: 16px;
   margin: 0;
   min-height: 56px;
   width: 100%;
   align-items: center;
   gap: 12px;
   flex: 1 0 0;
   border-radius: 20px;
   border: 1px solid #FFF;
   background: rgba(255, 255, 255, 0.60);
   position: relative;
   overflow: hidden;
}

.option-label {
   overflow: hidden;
   color: #5B4296;
   text-overflow: ellipsis;
   white-space: nowrap;
   font-size: 18px;
   font-style: normal;
   font-weight: 600;
   line-height: 24px;
}

.storage_option_recovery_modal .custom-radio {
   position: relative;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   margin: 0 !important;
   box-sizing: border-box;
   flex-shrink: 0;
   border: 1.5px solid #B1A1DA;
   border-radius: 50%;
   cursor: pointer;
}

.storage_option_recovery_modal .custom-radio-checked {
   position: absolute;
   top: 50%;
   left: 50%;
   display: block;
   opacity: 0;
   transform: translate(-50%, -50%);
   line-height: 0;
   width: 17px;
   height: 17px;
   pointer-events: none;
}

.storage_option_recovery_modal input[type="radio"]:checked+.custom-radio {
   border: 1.5px solid #5B4296;
   cursor: pointer;
}

.storage_option_recovery_modal input[type="radio"]:checked+.custom-radio .custom-radio-checked {
   opacity: 1;
   cursor: pointer;
}

.manual-input-container,
.download-files-container {
   display: none;
   flex-direction: column;
   align-items: center;
   gap: 28px;
   width: 100%;
   align-self: stretch;
   margin: 0;
   padding: 0;
   overflow: hidden;
}

.manual-input-container.active,
.download-files-container.active {
   display: flex !important;
}

.input-field {
   width: 100%;
   display: flex;
   flex-direction: column;
}



label {
   display: flex;
   font-size: 16px;
   line-height: 20px;
   font-weight: 400;
   color: #B1A1DA;
   margin: 0;
}

.manual-input-textarea-wrapper {
   width: 100%;
   height: 240px;
   max-height: 240px !important;
   padding: 16px;
   box-sizing: border-box !important;
   border: 1px solid #fff;
   border-radius: 20px;
   outline: none;
   background: rgba(255, 255, 255, 0.6);
   overflow: hidden !important;
   cursor: text;
}

.manual-input-textarea {
   display: block;
   width: 100%;
   height: 100% !important;
   min-height: 100% !important;
   padding: 0;
   margin: 0;
   box-sizing: border-box !important;
   resize: none;
   border: none;
   outline: none;
   background: transparent;
   font-size: 18px;
   line-height: 24px;
   color: #2A1665;
   overflow-y: auto;
   overflow-x: hidden;
   pointer-events: auto;
   cursor: text;
}

textarea:focus {
   outline: transparent;
}

.manual-input-submit {
   display: flex;
   position: static !important;
   inset: auto !important;
   transform: none !important;
   flex-shrink: 0;

   width: fit-content;
   height: 64px;
   margin: 0 auto;
   padding: 20px 26px;

   align-items: center;
   justify-content: center;

   border: none;
   border-radius: 20px;

   background: #7527B2;
   color: #fff;

   font-size: 18px;
   font-weight: 600;
   line-height: 24px;

   opacity: 0.55;
   cursor: not-allowed;
   pointer-events: none;

   transform: none;
   transition:
      opacity 0.15s ease,
      transform 0.15s ease;
}

.manual-input-submit.active {
   opacity: 1;
   cursor: pointer;
   pointer-events: auto;
}

.manual-input-submit:active:not(:disabled) {
   transform: translateY(2px);
}

.manual-input-submit:disabled {
   background: #D2CAE8;
   cursor: not-allowed;
}

.modal-buttons-container {
   width: 100%;
   max-width: 600px;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 16px;
   background: rgba(255, 255, 255, 0.6) !important;
   border-radius: 16px;
   padding: 16px !important;
   border: 1px solid #fff;
   box-sizing: border-box;
   position: relative;
}

.download-files-tooltip {
   position: absolute;
   top: 68px;
   left: 50%;
   transform: translate(-50%, 6px);
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.2s ease, transform 0.2s ease;
   padding: 10px 12px;
   border: 1px solid #fff;
   border-radius: 12px;
   background: rgba(255, 255, 255, 0.1);
   backdrop-filter: blur(40px);
   color: #291161;
   font-size: 14px;
   line-height: 18px;
   white-space: nowrap;
   z-index: 10;
}

.modal-buttons-container:has(#downloadFilesUploadBtn:disabled):hover .download-files-tooltip {
   opacity: 1;
   transform: translate(-50%, 0);
}

.download-files-upload-btn:disabled {
   color: #D2CAE8;
   border: 1px solid #D2CAE8;
   background: rgba(255, 255, 255, 0.6);
   cursor: not-allowed;
}

.download-files-upload-btn {
   margin: 0;
   width: 100%;
   height: 46px;
   border-radius: 14px;
   border: 1px solid #7527B2;
   background: rgba(255, 255, 255, 0.6);
   color: #7527B2;
   font-weight: 600;
   font-size: 13px;
   cursor: pointer;
}

.download-files {
   display: flex;
   flex-direction: column;
   gap: 4px;
   text-align: center;
}

.download-files-label {
   font-size: 18px;
   line-height: 24px;
   font-weight: 500;
   color: #5B4296;
}

.download-files-hint {
   font-size: 14px;
   line-height: 18px;
   color: #B2AFBA;
}

.download-files-list {
   display: none;
   gap: 24px;
   justify-content: center;
   flex-wrap: wrap;
}

.download-files-file-chip {
   display: inline-flex;
   align-items: center;
   gap: 2px;
   font-size: 16px;
   line-height: 20px;
   font-weight: 400;
   color: #5B4296;
   cursor: default;
}

.download-files-file-name {
   padding: 0;
   max-width: 130px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

.download-files-file-ext {
   padding: 0;
}

.storage_option_recovery_modal.disabled {
   opacity: 0.55;
   cursor: not-allowed;
}

.storage_option_recovery_modal.disabled * {
   pointer-events: none;
}


input {
   margin: 0;
   width: 100% !important;
   display: flex;
   align-self: stretch;
   font-size: 18px;
   font-style: normal;
   font-weight: 400;
   line-height: 24px;

}

::placeholder {
   font-size: 18px;
   font-style: normal;
   font-weight: 400;
   line-height: 24px;
   color: #B1A1DA;
   opacity: 1;
}

:-ms-input-placeholder {
   font-size: 18px;
   font-style: normal;
   font-weight: 400;
   line-height: 24px;
   color: #B1A1DA;
   opacity: 1;
}

::-ms-input-placeholder {
   font-size: 18px;
   font-style: normal;
   font-weight: 400;
   line-height: 24px;
   color: #B1A1DA;
   opacity: 1;
}

.form-group {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 4px;
   align-self: stretch;
   padding: 0 !important;
   margin: 0 !important;
}

.form-label {
   align-self: stretch;
   flex-shrink: 0;
   font-size: 16px;
   font-style: normal;
   font-weight: 600;
   line-height: 20px;
}

.form-input-wrapper {
   display: flex;
   align-items: center;
   align-self: stretch;
   gap: 12px;
   max-height: 56px;
   padding: 16px;
   box-sizing: border-box;
   border: 1px solid #fff !important;
   border-radius: 20px;
   background-color: rgba(255, 255, 255, 0.6);
}

/* Активний інпут */
.form-input-wrapper:focus-within {
   border: 1px solid #7527B2 !important;
}

/* Зміна кольору ока під час focus */
.form-input-wrapper:focus-within path {
   fill: #5B4296;
}

.form-input {
   width: 100% !important;
   height: 24px;
   margin: 0 !important;
   padding: 0;
   background: transparent;
   border: none !important;
   outline: none !important;
}

.form-input:focus {
   outline: none;
}

/* Червона рамка помилки */
.form-input-wrapper.error,
.form-input-wrapper.error:focus-within {
   border: 1px solid #DF1125 !important;
}

/* Обидва ока приховані за замовчуванням */
.closed-eye,
.opened-eye {
   display: none;
   width: 24px;
   height: 24px;
   flex-shrink: 0;
}

/* Показується лише SVG із класом active */
.closed-eye.active,
.opened-eye.active {
   display: flex;
   cursor: pointer;
}

/* Текст помилки */
.password-error,
.password-invalid-error {
   display: none;
   color: #DF1125;
   font-size: 14px;
   font-style: normal;
   font-weight: 400;
   line-height: 18px;
}

.password-error.active,
.password-invalid-error.active {
   display: flex;
}

/* Підказка з вимогами до пароля */
.warning-wrapper {
   display: flex;
   width: 343px;
   align-items: flex-start;
   gap: 10px;
   color: #5B4296;
   font-size: 14px;
   font-style: normal;
   font-weight: 600;
   line-height: 18px;
}

.warning-wrapper svg {
   width: 20px;
   height: 20px;
   flex-shrink: 0;
}

#downloadFilesInput {
   display: none !important;
}

/* hidden має гарантовано приховувати елементи */
[hidden] {
   display: none !important;
}

/* Приховуємо системний input файлу */
#downloadFilesInput {
   display: none !important;
   position: absolute !important;
   width: 0 !important;
   height: 0 !important;
   margin: 0 !important;
   padding: 0 !important;
   opacity: 0 !important;
   pointer-events: none !important;
}

.recovery-submit-error {
   width: 100%;
   margin: 0;
   color: #DF1125;
   font-size: 14px;
   line-height: 18px;
}