/* Yandex checkout button: brand yellow #FFCC00 with brand red #FC3F1D accents.
   theme.css paints every `button` red and every `button *` white, so the brand
   palette is restated with `!important` below; otherwise the label renders
   white on yellow. */

.fs-ycp-buy {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}

.fs-ycp-buy[hidden] {
  display: none !important;
}

#yastore-checkout-button.fs-ycp-buy__button {
  align-items: center;
  background: linear-gradient(180deg, #ffd64d 0%, #ffcc00 100%);
  border: 2px solid #fc3f1d;
  border-radius: var(--controls-btn-border-radius, 6px);
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 600;
  gap: 10px;
  justify-content: center;
  min-height: var(--controls-height-m, 44px);
  padding: 10px 16px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease,
    opacity .15s ease, transform .12s ease;
  width: 100%;
}

#yastore-checkout-button.fs-ycp-buy__button,
#yastore-checkout-button.fs-ycp-buy__button .fs-ycp-buy__label {
  background-color: #ffcc00 !important;
  border-color: #fc3f1d !important;
  color: #1a1a1a !important;
}

#yastore-checkout-button.fs-ycp-buy__button .fs-ycp-buy__label {
  background-color: transparent !important;
}

#yastore-checkout-button.fs-ycp-buy__button .fs-ycp-buy__logo {
  background-color: #fc3f1d !important;
  color: #ffffff !important;
}

#yastore-checkout-button.fs-ycp-buy__button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffde6b 0%, #ffd426 100%);
  border-color: #e12e0c;
  box-shadow: 0 2px 10px rgba(252, 63, 29, .28);
}

#yastore-checkout-button.fs-ycp-buy__button:active:not(:disabled) {
  transform: scale(.985);
}

#yastore-checkout-button.fs-ycp-buy__button:focus-visible {
  outline: 2px solid #fc3f1d;
  outline-offset: 2px;
}

#yastore-checkout-button.fs-ycp-buy__button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.fs-ycp-buy__logo {
  align-items: center;
  background: #fc3f1d;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 15px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 24px;
}

/* Hover hint. Hidden for touch input, where :hover never resolves cleanly. */
.fs-ycp-buy__tooltip {
  background: #1a1a1a;
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  left: 50%;
  line-height: 1.35;
  max-width: 260px;
  opacity: 0;
  padding: 7px 10px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  visibility: hidden;
  white-space: normal;
  width: max-content;
  z-index: 5;
}

.fs-ycp-buy__tooltip::after {
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
  content: '';
  left: 50%;
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
}

@media (hover: hover) and (pointer: fine) {
  .fs-ycp-buy.is-hint-visible .fs-ycp-buy__tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
  }
}

.fs-ycp-buy__note {
  color: var(--color-text-half-shade, #686868);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.fs-ycp-buy__note[hidden] {
  display: none !important;
}

.fs-ycp-buy.is-blocked .fs-ycp-buy__note {
  color: var(--color-text-major-shade, #555);
}

@media (max-width: 767px) {
  .fs-ycp-buy {
    margin-top: 5px;
  }

  .fs-ycp-buy__note {
    font-size: 11px;
  }
}
