/* UDS checkout — компактно, в стиле «Есть промокод?» */

.uds-checkout {
  margin: 16px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

/* В ряд с промокодом (тема собирает .s-loyalty-links) */
.s-loyalty-links > .uds-checkout {
  margin: 0;
}

.uds-checkout__summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--g-gold, #C6A15B);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(198, 161, 91, 0.55);
  user-select: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.uds-checkout__summary::-webkit-details-marker {
  display: none;
}

.uds-checkout__summary:hover {
  color: var(--g-emerald-soft, var(--g-emerald, #2E8B76));
  text-decoration-color: var(--g-emerald-soft, var(--g-emerald, #2E8B76));
}

.uds-checkout[open] > .uds-checkout__summary,
.uds-checkout.is-open > .uds-checkout__summary {
  margin-bottom: 10px;
  text-decoration: none;
}

.uds-checkout__body {
  padding: 12px 14px;
  border: 1px solid rgba(198, 161, 91, 0.22);
  border-radius: 12px;
  background: rgba(15, 90, 74, 0.08);
}

/* Чипы + поле + кнопка в одном ряду */
.uds-checkout__toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.uds-checkout__toolbar--result {
  margin-top: 4px;
}

.uds-checkout__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 10px;
  height: 44px;
  box-sizing: border-box;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--g-gold, #C6A15B);
  background: rgba(198, 161, 91, 0.12);
  border: 1px solid rgba(198, 161, 91, 0.28);
}

.uds-checkout__chip--ok {
  color: #d8f3e8;
  background: rgba(46, 139, 118, 0.28);
  border-color: rgba(46, 139, 118, 0.45);
}

.uds-checkout__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0 12px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
  box-sizing: border-box;
}

.uds-checkout__input::placeholder {
  opacity: 0.55;
}

.uds-checkout__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 18px !important;
  height: 44px !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--g-emerald, #0F5A4A) !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  text-align: center !important;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.uds-checkout__btn:hover {
  background: var(--g-emerald-hover, #0A4438);
}

.uds-checkout__btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.uds-checkout__btn--ghost {
  background: transparent;
  color: var(--g-gold, #C6A15B);
  border: 1px solid rgba(198, 161, 91, 0.4);
}

.uds-checkout__btn--ghost:hover {
  background: rgba(198, 161, 91, 0.1);
}

.uds-checkout__howto {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.uds-checkout__howto a {
  color: var(--g-gold, #C6A15B);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(198, 161, 91, 0.45);
}

.uds-checkout__howto a:hover {
  color: var(--g-emerald-soft, var(--g-emerald, #2E8B76));
  text-decoration-color: currentColor;
}

.uds-checkout__error {
  margin: 8px 0 0;
  color: #e8a0a0;
  font-size: 0.85rem;
}

.uds-checkout__balance {
  margin: 12px 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--g-gold, #C6A15B);
}

.uds-checkout__warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #f0e0b8;
  background: rgba(198, 161, 91, 0.14);
  border: 1px solid rgba(198, 161, 91, 0.28);
}

.uds-checkout__result {
  margin-top: 4px;
}

/* Узкий экран: чипы сверху, поле+кнопка в ряд; очень узкий — столбик */
@media (max-width: 720px) {
  .uds-checkout__toolbar {
    flex-wrap: wrap;
  }

  .uds-checkout__toolbar .uds-checkout__input {
    flex: 1 1 140px;
  }
}

@media (max-width: 480px) {
  .uds-checkout__chip {
    height: auto;
    min-height: 32px;
    padding: 6px 10px;
  }

  .uds-checkout__toolbar .uds-checkout__input,
  .uds-checkout__toolbar .uds-checkout__btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* legacy account block (ЛК) — без изменений поведения */
.uds-my-loyalty.account-loyalty {
  margin-bottom: 1.25rem;
  scroll-margin-top: 90px;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.uds-my-loyalty.is-flash {
  border-color: rgba(15, 90, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 90, 74, 0.18);
}
.uds-my-loyalty__points {
  margin-top: 4px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.uds-my-loyalty__tier {
  margin-top: 2px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.uds-my-loyalty__phone {
  opacity: 0.65;
  margin-top: 0.35rem;
}
.uds-my-nav a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.25;
}
.uds-my-nav__label {
  font-weight: 600;
}
.uds-my-nav__meta {
  font-size: 0.82rem;
  font-weight: 400;
  opacity: 0.75;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uds-my-loyalty__progress {
  margin-top: 10px;
}
.uds-my-loyalty__progress-hint {
  margin-bottom: 6px;
}
.uds-my-loyalty__progress-meta {
  margin-top: 6px;
  opacity: 0.7;
}
.uds-my-loyalty .account-loyalty__bar {
  margin-top: 0;
}
