/* ============================================================
   PATHREST BOOKING BASIC LANGUAGE ADDON — V1
   ------------------------------------------------------------
   - Добавляет язык проведения тура под датой в basic_information.
   - Если tour_language = individual: клиент выбирает язык из API.
   - Если язык фиксирован партнёром: показывается информационная карточка.
   - Значение добавляется в:
     basic_information,
     basic_information_json,
     basic_information_for_telegram,
     booking_tour_language_key,
     booking_tour_language_title,
     booking_tour_language_mode.
   ============================================================ */

#allrecords .pathrest-booking-basic-language-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(42, 101, 131, 0.10);
  color: #006c83;
  font-family: "Arian AMU Serif", "ArianAMUSerif", "Times New Roman", serif;
}

#allrecords .pathrest-booking-basic-language-section,
#allrecords .pathrest-booking-basic-language-section * {
  box-sizing: border-box;
}

#allrecords .pathrest-booking-basic-language-section__title {
  margin: 0 0 9px;
  padding: 0 2px;
  color: #006c83;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

#allrecords .pathrest-booking-basic-language-section__hint {
  margin: 8px 2px 0;
  color: rgba(0, 108, 131, 0.64);
  font-size: 12.5px;
  line-height: 1.35;
}

#allrecords .pathrest-booking-basic-language-section__loading,
#allrecords .pathrest-booking-basic-language-section__error {
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid rgba(0, 108, 131, 0.15);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 108, 131, 0.72);
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.35;
}

#allrecords .pathrest-booking-basic-language-section__error {
  border-color: rgba(176, 0, 32, 0.34);
  background: rgba(176, 0, 32, 0.06);
  color: #b00020;
}

#allrecords .pathrest-booking-basic-language-fixed {
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 108, 131, 0.15);
  border-radius: 26px;
  background: #ffffff;
  color: #006c83;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

#allrecords .pathrest-booking-basic-language-fixed__icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 139, 33, 0.26);
  border-radius: 50%;
  background: rgba(255, 139, 33, 0.11);
  color: #ff8b21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(255, 139, 33, 0.08);
}

#allrecords .pathrest-booking-basic-language-fixed__body {
  min-width: 0;
}

#allrecords .pathrest-booking-basic-language-fixed__label {
  margin: 0 0 3px;
  color: rgba(0, 108, 131, 0.68);
  font-size: 12.5px;
  line-height: 1.25;
}

#allrecords .pathrest-booking-basic-language-fixed__value {
  color: #006c83;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  word-break: break-word;
}

#allrecords .pathrest-booking-basic-language {
  position: relative;
  width: 100%;
}

#allrecords .pathrest-booking-basic-language__button {
  width: 100%;
  min-height: 50px;
  padding: 12px 48px 12px 16px;
  border: 1px solid rgba(0, 108, 131, 0.15);
  border-radius: 999px;
  background: #ffffff;
  color: #006c83;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  font-family: "Arian AMU Serif", "ArianAMUSerif", "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  position: relative;
  outline: none;
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#allrecords .pathrest-booking-basic-language__button:hover,
#allrecords .pathrest-booking-basic-language.is-open .pathrest-booking-basic-language__button,
#allrecords .pathrest-booking-basic-language__button:focus {
  border-color: rgba(255, 139, 33, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 139, 33, 0.10);
}

#allrecords .pathrest-booking-basic-language__button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 139, 33, 0.26);
  border-radius: 50%;
  background: rgba(255, 139, 33, 0.11);
  box-shadow: 0 5px 12px rgba(255, 139, 33, 0.08);
  transform: translateY(-50%);
}

#allrecords .pathrest-booking-basic-language__button::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 26px;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-right: 1.7px solid #ff8b21;
  border-bottom: 1.7px solid #ff8b21;
  transform: translateY(-58%) rotate(45deg);
  transition: transform 0.18s ease;
}

#allrecords .pathrest-booking-basic-language.is-open .pathrest-booking-basic-language__button::before {
  transform: translateY(-30%) rotate(-135deg);
}

#allrecords .pathrest-booking-basic-language__button-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#allrecords .pathrest-booking-basic-language__button-text.is-placeholder {
  color: rgba(0, 108, 131, 0.56);
  font-weight: 400;
}

.pathrest-booking-basic-language__menu {
  position: fixed !important;
  left: 12px;
  top: 12px;
  z-index: 2147483647 !important;
  display: none;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 300px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box !important;
  gap: 4px !important;
  padding: 6px !important;
  border: 1px solid rgba(42, 101, 131, 0.22);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(42, 101, 131, 0.14);
  font-family: "Arian AMU Serif", "ArianAMUSerif", "Times New Roman", serif;
}

.pathrest-booking-basic-language__menu.is-open {
  display: grid !important;
}

.pathrest-booking-basic-language__option {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  border: 1px solid transparent;
  border-radius: 13px !important;
  background: transparent;
  color: #2a6583;
  font-family: "Arian AMU Serif", "ArianAMUSerif", "Times New Roman", serif;
  font-size: 13px !important;
  line-height: 1.18 !important;
  text-align: left;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.pathrest-booking-basic-language__option:hover {
  border-color: rgba(255, 139, 33, 0.38);
  background: #fff8f1;
}

.pathrest-booking-basic-language__option.is-active {
  border-color: #ff8b21;
  background: #fff8f1;
  font-weight: 700;
}

.pathrest-booking-basic-language__option.is-active::after {
  content: "✓";
  grid-column: 2 !important;
  align-self: start !important;
  color: #ff8b21;
  font-weight: 700;
}

.pathrest-booking-basic-language__option-text {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

#allrecords .pathrest-booking-basic-language-section__field-error {
  display: none;
  margin: 8px 2px 0;
  padding: 9px 11px;
  border: 1px solid rgba(176, 0, 32, 0.34);
  border-radius: 18px;
  background: rgba(176, 0, 32, 0.06);
  color: #b00020;
  font-size: 12.5px;
  line-height: 1.32;
}

#allrecords .pathrest-booking-basic-language-section.is-language-error .pathrest-booking-basic-language-section__field-error {
  display: block;
}

#allrecords .pathrest-booking-basic-language-section.is-language-error .pathrest-booking-basic-language__button {
  border-color: rgba(176, 0, 32, 0.62);
  box-shadow: 0 0 0 4px rgba(176, 0, 32, 0.08);
}

@media (max-width: 767px) {
  #allrecords .pathrest-booking-basic-language-section {
    margin-top: 12px;
    padding-top: 11px;
  }

  #allrecords .pathrest-booking-basic-language-section__title {
    margin-bottom: 8px !important;
    font-size: 12.8px !important;
    line-height: 1.24 !important;
  }

  #allrecords .pathrest-booking-basic-language-section__hint,
  #allrecords .pathrest-booking-basic-language-section__field-error {
    font-size: 11.8px !important;
    line-height: 1.32 !important;
  }

  #allrecords .pathrest-booking-basic-language-section__loading,
  #allrecords .pathrest-booking-basic-language-section__error {
    min-height: 46px;
    padding: 12px 13px;
    border-radius: 24px;
    font-size: 12.8px;
  }

  #allrecords .pathrest-booking-basic-language-fixed {
    min-height: 48px;
    padding: 10px 11px;
    border-radius: 22px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
  }

  #allrecords .pathrest-booking-basic-language-fixed__icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  #allrecords .pathrest-booking-basic-language-fixed__label {
    font-size: 11.6px;
  }

  #allrecords .pathrest-booking-basic-language-fixed__value {
    font-size: 12.8px;
  }

  #allrecords .pathrest-booking-basic-language__button {
    min-height: 46px;
    padding: 12px 44px 12px 13px;
    font-size: 12.8px;
  }

  #allrecords .pathrest-booking-basic-language__button::after {
    right: 10px;
    width: 26px;
    height: 26px;
  }

  #allrecords .pathrest-booking-basic-language__button::before {
    right: 20px;
  }

  .pathrest-booking-basic-language__menu {
    max-width: calc(100vw - 24px) !important;
    max-height: min(320px, calc(100vh - 160px)) !important;
    border-radius: 18px !important;
    padding: 6px !important;
  }

  .pathrest-booking-basic-language__option {
    min-height: 34px !important;
    padding: 7px 9px !important;
    font-size: 12.5px !important;
    line-height: 1.16 !important;
  }
}
