/* Стили для анкеты врача */

.worksheet {
  margin-top: 70px;
  padding: 40px 0 70px;
  background-color: var(--bg-light);
}

.worksheet-footer {
  margin-top: 0;
}

.worksheet__wrapper {
  display: grid;
  grid-template-columns: 260px auto;
  gap: 40px;
}

.worksheet__select.select {
  cursor: pointer;
  flex-grow: 1;
  line-height: 1;
  outline: none;
  text-transform: capitalize;
  translate: 0 1px;
  font-family: var(--font-family);
  font-weight: 350;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #063152;
  height: 30px;
}

.worksheet .worksheet__form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.worksheet__fieldset {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.worksheet__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-input__label,
.worksheet__label {
  max-width: 560px;
  font-size: var(--fs);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background-color: rgb(var(--light));
  color: var(--text-main);
}

.custom-input__input {
  display: inline-flex;
  justify-content: space-between;
  padding: 7px 19px 7px 9px;
  max-height: 30px;
  resize: none;
  font-size: 0.75em;
  letter-spacing: 0.02em;
  line-height: 1.167;
  align-items: center;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  cursor: pointer;
  transition-duration: var(--transition);
  width: 100%;
}

.custom-input__input--textarea {
  min-height: 60px;
  resize: none;
}

.worksheet__field .worksheet__field-label {
  max-width: 560px;
}

.worksheet__select {
  padding-right: 24px;
  width: 100%;
}

.worksheet__select .select__input {
  text-transform: none;
  font-weight: 300;
}

.worksheet__select::after {
  height: 5px;
  right: 20px;
  width: 10px;
  position: relative;
}

.worksheet__more {
  display: flex;
  align-items: center;
  gap: 20px;
}

.worksheet__more-btn,
.wpcf7-field-group-add {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
}

.worksheet__line {
  width: 100%;
  height: 1px;
  background-color: var(--broom);
}

.worksheet__submit {
  margin-top: 40px;
  border-bottom-left-radius: 27px;
  min-width: 260px;
  width: fit-content;
}

@media (max-width: 1024px) {
  .worksheet {
    margin-top: 45px;
    padding-bottom: 60px;
    border-radius: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
  }

  .worksheet__wrapper {
    display: flex;
    flex-direction: column;
  }

  .worksheet__fieldset {
    gap: 40px;
  }

  .worksheet__field,
  .custom-input {
    gap: 20px;
  }

  .worksheet__field--list .custom-input {
    gap: 10px;
  }

  .worksheet__field--list .worksheet__label {
    margin-bottom: 10px;
  }

  .worksheet__select,
  .custom-input__input {
    padding-right: 8px;
  }

  .custom-input__input {
    min-height: 60px;
  }

  .custom-input__input--sm {
    min-height: 30px;
  }

  .custom-input__input--textarea {
    min-height: 118px;
  }

  .worksheet__more {
    margin-top: 10px;
  }

  .worksheet__submit {
    margin-top: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 27px;
    max-width: 320px;
    width: 100%;
  }
}

.wpcf7-field-group .wpcf7-field-group-add {
  display: none;
}

.wpcf7-field-group:last-child .wpcf7-field-group-add {
  display: flex;
}

.wpcf7-field-group-remove {
  display: none !important;
}

.wpcf7-field-group .worksheet__more-text {
  display: none;
}
.wpcf7-field-group:last-child .worksheet__more-text {
  display: inline;
}

.worksheet .wpcf7-response-output[aria-hidden="false"] {
  display: block !important;
  border: 1px solid #c05a17;
}

/* Кастомный селект с чекбоксами */
.worksheet__custom-select {
  position: relative;
  width: 100%;
}

.worksheet__custom-select-head {
  padding: 9px 10px;
  border: 0.50px solid #c05a17;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s ease;
}

.worksheet__custom-select-head:hover {
  border-color: #c4a87f;
}

.worksheet__custom-select.active .worksheet__custom-select-head {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.worksheet__custom-select-text {
  font-family: var(--font-family);
  font-weight: 350;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #063152;
}

.worksheet__custom-select-arrow {
  color: #c15c28;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.worksheet__custom-select.active .worksheet__custom-select-arrow {
  transform: rotate(180deg);
}

.worksheet__custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 0.50px solid #c05a17;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  padding: 0;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  margin-top: 5px;
}

.worksheet__custom-select.active .worksheet__custom-select-dropdown {
  display: block;
}

.worksheet__custom-select-dropdown .wpcf7-list-item {
  margin-bottom: 8px;
}

/* Загрузка файлов */
.worksheet__file {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.worksheet__file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.worksheet__file-thumb {
  width: 110px;
  height: 82px;
  border: 1px solid #515151;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.worksheet__file-upload:hover .worksheet__file-thumb {
  border-color: #c4a87f;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.worksheet__file-icon {
  font-size: 57px;
  line-height: 1;
  color: #515151;
  margin-bottom: 0;
  font-weight: 300;
}

.worksheet__file-text {
  font-size: 12px;
  color: #7d7d7d;
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
}

.worksheet__file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.worksheet__file-preview-list {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 0;
}

.worksheet__file-preview-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.worksheet__file-preview-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 82px;
  border: 1px solid #515151;
  border-radius: 8px;
}

.worksheet__file-preview-item svg {
  width: 74px;
  height: 60px;
}

.worksheet__file-name {
  word-break: break-word;
  max-width: 200px;
  font-size: 12px;
  color: #333;
  text-align: center;
}

.worksheet__file-multiple {
  display: flex;
  flex-direction: row;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Чекбоксы */
.worksheet input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.worksheet .wpcf7-list-item {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
  margin-left: 10px;
}

.worksheet .wpcf7-list-item-label {
  position: relative;
  padding-left: 20px;
  display: inline-block;
  font-family: var(--font-family);
  font-weight: 350;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #063152;
}

.worksheet .wpcf7-list-item-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #c05a17;
  width: 10px;
  height: 10px;
}

.worksheet input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  background: #063152;
  width: 6px;
  height: 6px;
  border: none;
  padding: 0px;
}

.photo_group .worksheet__more {
  display: none;
}

div#photo-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

div#photo-group .wpcf7-field-group {
  width: 100%;
}

#photo-group .worksheet__more {
  display: none;
}

label.worksheet__label.custom-input__label {
  font-family: var(--font-family);
  font-weight: 350;
  font-size: 16px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #063152;
}

span.worksheet__file-name {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 120%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #063152;
}

span.worksheet__custom-select-arrow {
  background: url(../img/icons/chevron.svg) no-repeat;
  width: 10px;
  height: 6px;
  right: 10px;
  position: relative;
}

.custom-input__input, 
.custom-input__input::placeholder {
  font-family: var(--font-family);
  font-weight: 350;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #063152 !important;
  opacity: 1;
}

span.wpcf7-list-item.first {
  margin-top: 10px;
}

span.wpcf7-list-item input[type="checkbox"] {
  top: 4px;
}

/* Стили для стандартного select с кастомной стрелкой */
.worksheet__select,
.worksheet__select .select__input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  padding-right: 40px;
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) center;
  background-size: 12px 8px;
  cursor: pointer;
  background: url(../img/down-worksheet.svg) no-repeat white;
  background-size: 10px 6px;
  background-position: calc(100% - 20px) center;
}

select.wpcf7-form-control.wpcf7-select.wpcf7-validates-as-required.worksheet__select.select._select._select-input._active {
  background: url(../img/up-worksheet.svg) no-repeat white;
  position: relative;
  background-size: 10px 6px;
  background-position: calc(100% - 20px) center;
}

.worksheet__submit {
  margin-top: 0;
}

/* Попап успешной отправки */
.worksheet__success-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 25%);
  z-index: 999998;
}

.worksheet__success-overlay.active {
  display: block;
}

body.worksheet-no-scroll {
  overflow: hidden;
}

.worksheet__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 70px 20px;
  text-align: center;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: rgba(6, 49, 82, 1);
  z-index: 999999;
}

.worksheet__success-close {
  position: absolute;
  top: 70px;
  left: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.worksheet__success-close:hover {
  opacity: 0.7;
}

.worksheet__success-close svg {
  width: 30px;
  height: 30px;
}

.worksheet__success-icon svg {
  width: 80px;
  height: 80px;
}

.worksheet__success-title {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

h2.worksheet__success-title {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 32px;
  line-height: 120%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  margin-left: 50%;
  width: 50%;
}

@media (max-width: 1023.95px) {
  div#photo-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  div#worksheet-success {
    padding: 40px 10px;
    align-items: flex-start;
  }

  h2.worksheet__success-title {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 120%;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    width: 231px;
    margin-left: 0px;
  }

  button#worksheet-success-close {
    top: 40px;
    width: 30px;
    right: 10px;
    left: initial;
  }
}

@media (max-width: 767px) {
  .worksheet__success-title {
    font-size: 24px;
  }
}

