/* Стили для Choices.js (минимальный набор) */
.choices {
  position: relative;
  margin-bottom: 0;
  font-size: 16px;
  cursor: pointer;
}

.choices:focus {
  outline: none;
}

.choices:last-child {
  margin-bottom: 0;
}

.choices__inner {
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  background-color: transparent;
  border: 0;
  font-size: 14px;
  min-height: 44px;
  overflow: hidden;
}

.is-focused .choices__inner,
.is-open .choices__inner {
  border-color: #b7b7b7;
}

.choices__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.choices__list--single {
  display: flex;
  padding: 6px;
  width: 100%;
  align-items: center;
  cursor: pointer;
}

.choices__item.is-selected {
  display: flex;
  align-items: center;
  gap: 6px;
}

.choices__list--single .choices__item {
  width: 100%;
}

.choices__list--dropdown {
  visibility: hidden;
  z-index: 100; /* Увеличиваем z-index, чтобы выпадающий список был поверх всех элементов */
  position: absolute;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #dddddd;
  top: 100%;
  margin-top: -1px;
  border-bottom-left-radius: 2.5px;
  border-bottom-right-radius: 2.5px;
  overflow: hidden;
  word-break: break-all;
  will-change: visibility;
}

.is-active.choices__list--dropdown {
  visibility: visible;
}

.choices__list--dropdown .choices__item--selectable {
  padding-right: 10px;
}

.choices__list--dropdown .choices__item {
  position: relative;
  padding: 10px;
}

.choices__item--selectable {
  cursor: pointer;
}

.choices__item--disabled {
  cursor: not-allowed;
  user-select: none;
  opacity: 0.5;
}

.choices__placeholder {
  opacity: 0.5;
}

/* Кастомные стили для виджета */
* {
  box-sizing: border-box;
}

.express-deal-widget {
    margin: auto;
      /*font-family: 'RoobertPro', Arial, sans-serif; -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,*/
      /*  Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;*/
    font-family: 'RoobertPro', Arial, sans-serif;
    background-color: #111;
    border: 1px solid #1A1A1A;
    border-radius: 16px;
    padding: 24px;
    max-width: 540px;
    color: #fff;
  
    @media screen and (max-width: 767px) {
        width: calc(100% - 144px + 26px);
        margin: 0;
    }
}

.express-deal-section {
  margin-bottom: 10px;
  padding: 20px;
  background: #0a0a0a;
  border: 1px solid #232323;
  border-radius: 12px;
  position: relative;
}

.express-deal-label {
  font-size: 14px;
  color: #a3a3a3;
  margin-bottom: 16px;
}

.express-deal-input-container {
  display: grid;
  grid-template-columns: 1fr 110px;
  align-items: center;
  overflow: visible;
  gap: 5px;
  @media screen and (max-width: 768px) {
    display: flex;
  }
}

.express-deal-input {
  flex: 1;
  background-color: transparent;
  border: none;
  color: #7a7a7a;
  font-size: 20px;
  font-weight: 600;
  outline: none;
  padding: 0;
  transition: all 0.3s ease;
  @media screen and (max-width: 768px) {
    max-width: calc(100% - 110px);
  }
}

.express-deal-section.has-error {
  border-color: #e53935;
}

.express-deal-input.has-error {
  color: #e53935;
}

.express-deal-currency-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.express-deal-currency-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.express-deal-currency-code {
  font-weight: 500;
  margin-right: 8px;
}

.express-deal-payment-method {
  margin-bottom: 18px;
}

.express-deal-rate-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.express-deal-rate-label {
  display: flex;
  align-items: center;
  color: #8e8e8e;
  font-size: 14px;
}

.express-deal-info-icon {
  margin-left: 6px;
  font-size: 14px;
  color: #666;
}

.express-deal-rate-value {
  display: flex;
  align-items: center;
}

.express-deal-rate-loading {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  position: relative;
}

/* SVG-круги для таймера */
.express-deal-rate-loading svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.express-deal-rate-loading svg.background-circle {
  z-index: 1;
}

.express-deal-rate-loading svg.progress-circle {
  z-index: 2;
  transform: rotate(-90deg);
}

.express-deal-rate-loading circle {
  fill: none;
  stroke-width: 2;
}

.express-deal-rate-loading .background-circle circle {
  stroke: #2d2d2d;
  stroke-width: 2.4px;
}

.express-deal-rate-loading .progress-circle circle {
  stroke: #8f42ff;
  stroke-width: 2.4px;
  stroke-dasharray: 42; /* Примерная длина окружности для круга радиусом 7px (2πr) */
  stroke-dashoffset: 42;
}

.express-deal-rate-loading .progress-circle.active circle {
  animation: circle-fill 30s linear infinite;
}

@keyframes circle-fill {
  from {
    stroke-dashoffset: 42; /* Начальное смещение = длина окружности */
  }
  to {
    stroke-dashoffset: 0; /* Конечное смещение = 0 (полный круг) */
  }
}

.express-deal-rate-amount {
  font-weight: 600;
  margin-right: 4px;
}

.express-deal-rate-currency {
  color: #8e8e8e;
}

.express-deal-input-error {
  color: #e53935;
  font-size: 12px;
  transition: all 0.3s ease;
  position: absolute;
  left: 20px;
  bottom: 10px;
}

.express-deal-buy-button {
  width: 100%;
  height: 56px;
  background-color: #8f42ff;
  color: white;
  border: none;
  border-radius: 12px;
  margin-top: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.express-deal-buy-button:hover {
  background-color: #7b38e0;
}

.express-deal-buy-button:disabled {
  background-color: #1a1a1a !important;
  color: #4d4d4d !important;
  cursor: not-allowed;
}

.express-deal-choices {
  background: transparent;
  border: none;
}

.express-deal-choices .choices__inner {
  background-color: transparent;
  border: none;
  min-height: unset;
  border-radius: 0;
  background-color: #1a1a1a;
  border-radius: 10px;
}

.choices__list--dropdown {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.choices__list--dropdown .choices__item {
  color: #fff;
  padding: 7px;
}

.choices__list--dropdown .choices__item--selectable {
  padding-right: 10px;
}

.choices__list--dropdown .choices__item--selectable:after {
  display: none;
}

.choices__list--dropdown .choices__item:hover {
  background-color: #333;
}

.choices__list--dropdown .choices__list {
  max-height: 300px;
}

/* Стили для иконок в селекторах */
.choices__list--single .express-deal-currency-icon-wrapper,
.choices__list--dropdown .express-deal-currency-icon-wrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.choices__list--dropdown .express-deal-currency-icon-wrapper {
  margin-right: 6px;
}

/* Оформление плейсхолдера для изменения цвета */
.choices__placeholder {
  opacity: 0.5;
  color: ##a3a3a3;
}

/* Стили для специфичных селекторов */
.choices__item--choice.is-selected {
  background-color: #111;
}

.choices__list--dropdown .choices__item--selectable {
  position: relative;
  padding-right: 12px;
}

/* Специфичные стили для селекторов в контейнере ввода */
.express-deal-input-container .choices {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  flex: 0 0 110px;
}

/* Стили для фиатного селектора */
.fiat-choices .choices__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* Стили для криптовалютного селектора */
.crypto-choices .choices__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* Ограничение высоты выпадающих списков под 5-6 элементов */
.fiat-choices .choices__list--dropdown .choices__list,
.crypto-choices .choices__list--dropdown .choices__list,
.payment-method-choices .choices__list--dropdown .choices__list {
  max-height: calc(
    42px * 5
  ); /* Высота 5 элементов (примерно 42px на элемент) */
  overflow-y: auto;
  /* Стилизация скроллбара для современных браузеров */
  scrollbar-width: thin;
  scrollbar-color: #444 #222;
}

/* Стилизация скроллбара для WebKit браузеров (Chrome, Safari) */
.fiat-choices .choices__list--dropdown .choices__list::-webkit-scrollbar,
.crypto-choices .choices__list--dropdown .choices__list::-webkit-scrollbar,
.payment-method-choices
  .choices__list--dropdown
  .choices__list::-webkit-scrollbar {
  width: 6px;
}

.fiat-choices .choices__list--dropdown .choices__list::-webkit-scrollbar-track,
.crypto-choices
  .choices__list--dropdown
  .choices__list::-webkit-scrollbar-track,
.payment-method-choices
  .choices__list--dropdown
  .choices__list::-webkit-scrollbar-track {
  background: #222;
}

.fiat-choices .choices__list--dropdown .choices__list::-webkit-scrollbar-thumb,
.crypto-choices
  .choices__list--dropdown
  .choices__list::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 6px;
}

/* Стили для иконки стрелки */
.express-deal-choices .choices__inner {
  position: relative;
  padding-right: 26px; /* Место для иконки стрелки */
  display: flex;
  align-items: center;
}

/* Стили для inline SVG стрелки */
.express-deal-choices .choices__inner .arrow-icon {
  position: absolute;
  right: 16px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-method-choices .choices__inner {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  width: 100%;
}

.payment-method-choices .choices__inner {
  background-color: #0a0a0a;
  border: 1px solid rgba(208, 208, 208, 0.07);
  border-radius: 12px;
}

/* Уменьшаем высоту элементов в выпадающем списке */
.payment-method-choices .choices__list--dropdown .choices__item {
  padding: 8px 12px;
  font-size: 14px;
  min-height: unset;
}

/* Уменьшаем размер выпадающего списка */
.payment-method-choices .choices__list--dropdown {
  margin-top: 8px;
}
