/* Основные стили модального окна */


.modal {
    display: none;
    position: fixed;
    z-index: 9000;
    top: 50%;
    left: 50%;
    /* background: radial-gradient(circle, #ffffff, #f1e9fc, #fcf7f2); */
    background: #EAE9ED;
    /* box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1); */
    border: 1px solid #ffffff;
    border-radius: 30px;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 100%;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-header {
    position: relative;
    width: 100%;
    padding: 25px 20px 0;
    box-sizing: border-box;
    margin-bottom: 15px;
    margin-top: 10px;
    /* Оновлені стилі
    width: 100%;
    box-sizing: border-box;
    margin: 0 14px;
     */
}

.modal-header h1,
.modal-header h2,
.modal-header h3 {
    color: #291161;
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding-top: 30px; /* Фиксированный отступ от кнопки закрытия */
}

/* Стили для внутреннего контента */
.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}


/* Кнопки управления */
.modal-buttons {
    display: flex;
    gap: 5px;
    position: absolute;
    top: 10px;
    right: 20px;
    /* Оновлені стилі
    display: flex;
    justify-content: end;
     */
}

.modal-button {
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border: 1px solid #7B43F2;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    color: #7B43F2;
    margin: 0;
    padding: 0;
}


.cards-scroll-area {
    overflow-y: auto;
    flex-grow: 1;
    padding: 5px;
    max-height: 190px;
}

  /* Стилизация полосы прокрутки */
  .cards-scroll-area::-webkit-scrollbar {
    width: 10px;
  }

  .cards-scroll-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .cards-scroll-area::-webkit-scrollbar-thumb {
    background-color: #a383d2;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
  }

  .cards-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: #8259bb;
  }

  /* Отступ снизу для красоты */
  .cards-container {
    padding-bottom: 20px;
  }


.modal-button:hover {
    background-color: #fefefe;
}


/* Кнопка удаления в правом верхнем углу карточки */
.session-delete-button { /* переробити хрестик */
    position: absolute;
    right: 10px;
    z-index: 10;
    background-color: #fff;
    border-radius: 7px;
    font-size: 14px;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

  .session-text {
    flex: 1; /* занимает доступное пространство */
    padding-right: 30px;
}

  .session-delete-button:hover { /* переробити хрестик */
    background-color: #5e32c5;

  }
.recovery-btn {
    background-color: white;
    color: #7B43F2;
    border: 1px solid #7B43F2;
    border-radius: 12px;
    padding: 2px 5px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 11px;
    height: 55px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Необязательно: стиль при наведении */
.recovery-btn:hover {
    background-color: #f2eaff;
    color: #5e32c5;
    border-color: #5e32c5;
}

.recovery-btn:active {
    background-color: #e3d6ff;
    color: #4a299e;
    transform: scale(0.98); /* небольшой "нажимательный" эффект */
}
/* Стили для контейнера навигации */
.navigation-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 10px;
    align-items: center;
    height: 25px;
}

/* Стили для кнопок внутри контейнера */
.navigation-container .link-button {
    background: none;
    border: none;
    color: #7B43F2;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 5px 10px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

/* Стиль для кнопки "НАЗАД" - текст смещен влево */
.navigation-container .link-button[data-translate="back-link-text"] {
    justify-content: flex-start; /* Текст прижимается к левому краю */
    margin-right: auto; /* Дополнительно прижимает к левому краю */
}

/* Стиль для кнопки "ВПЕРЁД" - текст смещен вправо */
.navigation-container .link-button[data-translate="forward-link-text"] {
    justify-content: flex-end; /* Текст прижимается к правому краю */
    margin-left: auto; /* Дополнительно прижимает к правому краю */
}

/* Эффекты при наведении */
.navigation-container .link-button:hover {
    color: #5F41B2;
    text-decoration: underline;
}

/* Эффекты при нажатии */
.navigation-container .link-button:active {
    color: #4A2D8C;
}

#qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
}

#qrcode img {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
}

/* Новые стили для макета заголовка */
.header-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 0 10px;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 0px 0px 10px;
}

.name-fields {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Настроим стили для групп полей */
.name-fields .form-group {
    margin-bottom: 0;
}

.name-fields .form-group input {
    width: 100%;
    min-width: 200px;
}

/* Настроим поле email на полную ширину */
.form-group {
    width: 100%; /* 100% ширины минус отступы слева и справа по 20px */
    padding: 0 20px; /* Отступы слева и справа */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="date"] {
  /*  width: 100%; */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Новый класс form-group-width на основе form-group */
.form-group-width {
    width: 460px; /* Новая ширина */
    padding: 0 20px; /* Сохраняем отступы как у form-group */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

#addPatientModal .form-group-width {
     width: 100%;
     padding: 8px 8px 8px 14px;
     box-sizing: border-box; /* Учитываем padding в ширине */
}

/* Стили для элементов внутри form-group-width */
.form-group-width input[type="email"],
.form-group-width input[type="range"],
.form-group-width input[type="text"],
.form-group-width input[type="tel"],
.form-group-width input[type="date"] {
    width: 100%;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.6);
    color: #291161;
    border: 1px solid #ffffff;
    outline: none;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Стиль для подсказки */
.form-group-width .hint {
    margin-top: 5px;
    padding-left: 0;
    color: #B1A1DA;
    font-size: 12px;
}

/* Стиль для label */
.form-group-width label {
    color: #B1A1DA;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    display: block;
    margin-bottom: 4px;
}

.date-selector {
    display: flex;
    gap: 10px;
    width: 100%;
}

.date-selector select {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #E0D6F5;
    border-radius: 12px;
    background: #FAF8FF url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B4296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center;
    background-size: 15px;
    color: #5B4296;
    font-size: 14px;
    appearance: none;
}

/* Для IE11 */
.date-selector select::-ms-expand {
    display: none;
}

.hint {
    margin-top: 5px;
    padding-left: 0; /* Убираем отступ слева у подсказки */
}

/* Стили для дополнительных полей */
.additional-fields {
    display: flex;
 /*   margin: 5px 0; */
    max-width: 420px;
    padding-left: 20px;
    gap: 20px;
    justify-content: space-between;
    /* Оновлені стилі
    display: flex;
    width: 100%;
    gap: 20px;
    justify-content: space-between;
     */
}

.additional-fields .input-wrapper {
    position: relative;
    max-width: 200px;
    /* Оновлені стилі
    position: relative;
    width: 50%;
     */
}

.additional-fields input {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #fff;
    border-radius: 12px;
    padding-left: 10px;
    width: 200px;
    box-sizing: border-box;
    color: #5B4296;
    margin-bottom: 1px;
}

/* Стили для прогресс бара */
.progress-container {
    position: absolute;      /* фиксируем относительно .modal */
    bottom: 20px;            /* отступ от нижнего края модального окна */
    left: 50%;
    transform: translateX(-50%);
    width: 410px;
    padding: 4px;
    border-radius: 6px;
    background-color: white;
    border-top: 1px solid #f0f0f0;
    z-index: 10;             /* чтобы не перекрывался другим контентом */
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 4px;
    background-color: #D2CAE8;
    border-radius: 2px;
    margin: 0 auto;
}
.progress-step {
    width: 25%;
    height: 100%;
    background-color: #D2CAE8;
    position: relative;
}

.progress-step.active {
    background-color: #7B43F2;
}

.progress-step::after {
    content: none;
    width: 0;
    height: 0;
    border: none;
    background: none;
}

.progress-step.active::after {
    display: none;
}



.file-upload-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: white;
    border-radius: 12px;
    height: 80px;
    gap: 5px;
    width: 100%;
}

.file-upload-button {
    padding: 10px 15px;
    margin-top: 10px;
    background-color: #ffffff;
    border: 1px solid #5b4296;
    border-radius: 12px;
    color: #5B4296;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 360px;
}

.file-upload-button:hover {
    background-color: #F0E8FF;
    border-color: #D0C0F0;
}

.file-name {
    color: #888;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

/* Для отображения имени выбранного файла */
.file-name.has-file {
    color: #5B4296;
}

/* Стили для кнопки отправки формы */
.submit-button {
    max-width: 420px;
    padding: 12px;
    background-color: #7B43F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Скрытие нативного инпута */
.storage-option input[type="radio"],
.storage-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Общий контейнер */
.storage-option {
    width: 200px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    /* Оновлені стилі
    padding: 16px;
    width: 50%;
    height: 56px;
    border: 1px solid #fff;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
     */
}

/* Общая иконка */
.storage-option .custom-radio {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Радио-кнопка — круглая */
.storage-option input[type="radio"] ~ .custom-radio {
    border: 2px solid #5B4296;
    border-radius: 50%;
}

/* Чекбокс — квадратный */
.storage-option input[type="checkbox"] ~ .custom-radio {
    border: 2px solid #5B4296;
    border-radius: 4px;
}

/* Галочка */
.storage-option input[type="radio"]:checked ~ .custom-radio::after,
.storage-option input[type="checkbox"]:checked ~ .custom-radio::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5B4296;
    font-size: 12px;
}

/* Текст рядом с кнопкой */
.storage-option span:last-child {
    color: #291161;
    font-size: 18px;
    line-height: 24px;
    font-weight: 400;
}

/* Стиль для выбранного текста */
.storage-option input:checked ~ span:last-child {
    color: #5B4296;
    font-weight: 600;
}

/* Контейнер опций */
.storage-options {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.settings-panel {
    width: 320px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #ccc;
    border-radius: 10px;
    font-family: sans-serif;
    background-color: #f9f9f9;
  }

  .setting {
    justify-content: space-between;
    align-items: center;
  }

  .switch-label {
    display: flex;
    justify-content: space-between;
    color: #5B4296;
    font-size: 13px;
    width: 190px;
    align-items: center;
  }

  /* Стилизация тумблера */
  .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.4s;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
  }

  .switch input:checked + .slider {
    background-color: #4CAF50;
  }

  .switch input:checked + .slider:before {
    transform: translateX(26px);
  }

  .setting input[type="range"] {
    width: 390px;
    height: 6px;
    background: #D2CAE8;
    border-radius: 12px;
    outline: none;
    margin-left: 15px;
}

/* Контейнер для слайдера и значения */
.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: white;
    border-radius: 12px;
    width: 420px;
    padding: 10px;
    box-sizing: border-box;
    margin-left: 20px;
    margin-bottom: 10px;
}

/* Слайдер растягивается */
.range-container input[type="range"] {
    flex-grow: 1;
    height: 6px;
    accent-color: #7B43F2;
}

/* Отображение значения */
.range-value {
    color: #5B4296;
    font-size: 13px;
    min-width: 25px;
    text-align: center;
}

.recovery-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 15px;
}

  #recoveryCode {
   width: 400px;
   padding: 5px;
   margin-top: 5px;
   display: none;
   align-items: center;
   justify-content: center;
  }


  #recoveryQRImage {
    max-width: 100px;
    margin-top: 10px;
    display: block; /* Убедитесь, что изображение ведет себя как блочный элемент */
    margin-left: auto; /* Центрирование изображения */
    margin-right: auto; /* Центрирование изображения */
  }

  #recoveryCodeDisplay {
   display: none;
  }


  .recovery-options {
    display: flex;
    justify-content: space-between; /* Равномерное распределение кнопок */
     margin-top: 10px;
   }

   .tab-buttons {
    display: flex;
    justify-content: center;
    margin: 00px 20px;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #fff;
    border-radius: 12px;
    height: 48px;
    width: 100%;
    padding: 0px;
    overflow: hidden;
    align-items: center;
  }

  .tab-button {
    /* flex: 1; */
    border: none;
    background: transparent;
    color: #b3a3d1;
    font-size: 18px;
    line-height: 24px;
    font-weight: 400;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, font-weight 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    padding: 12px 16px;
  }

  .tab-button.active {
    background-color: #fff;
    color: #291161;
    font-weight: 600;
    transition: auto;
  }

  .tab-content {
    display: none;
    margin-top: 20px;
    width: 100%;
  }

  .tab-content.active {
    display: block;
  }


#SaveSettingsButton {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #7B43F2;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
  }
#SaveSettingsButton:hover  {
    background-color: #5e32c5;
  }

#SaveSettingsButton:active  {
    background-color: #5F41B2;
    transform: translateX(-50%) translateY(2px);
  }


  #deleteAccountButton {
    margin: 10px auto 0 auto;
 }


 /* Стили для прогресс-бара пароля */
 .password-strength-container {
    width: 200px;
    /* padding: 0 00px; */
    /* margin: 5px 0 15px 0; */
    box-sizing: border-box;
}

.password-strength-bar {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.password-strength-text {
    font-size: 12px;
    color: #7f69bd;
    margin-top: 3px;
    text-align: right;
}

/* Цвета для разных уровней сложности */
.password-strength-weak {
    background-color: #ff4d4d;
}

.password-strength-medium {
    background-color: #ffa500;
}

.password-strength-good {
    background-color: #4CAF50;
}

.password-strength-strong {
    background-color: #007bff;
}


/* Стили для кнопок в разделе восстановления */
.recovery-actions {
    position: absolute;
    bottom: 20px; /* Фиксированный отступ от нижнего края */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

#encryptAndSaveRecords,
#decryptRecordsBtn {
    width: 100%;
    max-width: 420px;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#encryptAndSaveRecords {
    background-color: #7B43F2;
    color: white;
    border: none;
}

#decryptRecordsBtn {
    background-color: white;
    color: #7B43F2;
    border: 1px solid #7B43F2;
}

#encryptAndSaveRecords:hover {
    background-color: #5e32c5;
}

#decryptRecordsBtn:hover {
    background-color: #f2eaff;
}

.custom-scroll {
    overflow: auto;
    width: 100%;
}
/* Кастомний скрол під дизайн, скопіювати і підставити 
потрібний клас контейнера, де треба скрол */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    border-radius: 3px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #B1A1DA;
    border-radius: 3px;
}
