/* YikyTrend CX — Gift Journey (Phase B) */

.yk-cx-gift {
  --yk-cx-ink: #111;
  --yk-cx-muted: #6d6d6d;
  --yk-cx-line: #e8e8e8;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--yk-cx-line);
  border-radius: 12px;
  background: #fff;
  font-family: "proxima-nova", "Proxima Nova", "Nunito Sans", sans-serif;
  color: var(--yk-cx-ink);
  box-sizing: border-box;
}

.yk-cx-gift *,
.yk-cx-gift *::before,
.yk-cx-gift *::after {
  box-sizing: border-box;
}

.yk-cx-gift__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.yk-cx-gift__toggle input {
  margin: 0;
}

.yk-cx-gift__hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--yk-cx-muted);
}

.yk-cx-gift__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.yk-cx-gift__fields[hidden],
.yk-cx-gift__summary[hidden] {
  display: none !important;
}

.yk-cx-gift__fields > label,
.yk-cx-gift__phone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 12px;
}

.yk-cx-gift__fields input[type="text"],
.yk-cx-gift__fields input[type="tel"],
.yk-cx-gift__fields select,
.yk-cx-gift__fields textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}

.yk-cx-gift__who {
  margin: 0;
  padding: 0;
  border: 0;
}

.yk-cx-gift__who legend {
  padding: 0;
  margin: 0 0 6px;
  font-size: 12px;
}

.yk-cx-gift__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yk-cx-gift__pill {
  margin: 0;
  cursor: pointer;
}

.yk-cx-gift__pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.yk-cx-gift__pill span {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
}

.yk-cx-gift__pill input:checked + span {
  border-color: #111;
  background: #111;
  color: #fff;
}

.yk-cx-gift__pill input:focus-visible + span {
  outline: 2px solid #7b5cff;
  outline-offset: 2px;
}

.yk-cx-gift__check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 12px;
}

.yk-cx-gift.is-saving .yk-cx-btn--primary,
.yk-cx-gift.is-saving .yk-cx-gift__save {
  opacity: 0.6;
  pointer-events: none;
}

.yk-cx-gift__status {
  margin: 0;
  font-size: 11px;
}

.yk-cx-gift__status.is-ok {
  color: #1a7f37;
}

.yk-cx-gift__status.is-err {
  color: #b42318;
}

.yk-cx-gift__summary {
  margin-top: 10px;
}

.yk-cx-gift__card {
  padding: 12px;
  border: 1px solid var(--yk-cx-line);
  border-radius: 10px;
  background: #fafafa;
}

.yk-cx-gift__card-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yk-cx-ink);
}

.yk-cx-gift__rows {
  margin: 0;
}

.yk-cx-gift__row {
  display: grid;
  grid-template-columns: minmax(72px, 30%) 1fr;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #ececec;
}

.yk-cx-gift__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.yk-cx-gift__row dt {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  color: var(--yk-cx-muted);
}

.yk-cx-gift__row dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--yk-cx-ink);
  overflow-wrap: anywhere;
}

.yk-cx-gift__flag {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--yk-cx-ink);
}

.yk-cx-gift__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.yk-cx-free-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  vertical-align: middle;
}

.yk-cx-qty-lock {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  font-weight: 650;
}

.yk-cx-gift-thanks {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--yk-cx-line);
  border-radius: 12px;
  background: #fafafa;
}

.yk-cx-gift-thanks h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.yk-cx-gift-thanks p {
  margin: 0;
  font-size: 13px;
  color: var(--yk-cx-muted);
}

.yk-cx-account__title {
  margin: 0 0 12px;
  font-size: 20px;
}

.yk-cx-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yk-cx-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--yk-cx-line);
  font-size: 13px;
}

.yk-cx-admin-gift {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  background: #fff;
}

.yk-scratch {
  margin: 16px 0;
}

.yk-scratch__card {
  max-width: 420px;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  color: #111;
}

.yk-scratch__brand {
  background: #000;
  padding: 16px 18px;
}

.yk-scratch__brand img {
  display: block;
  width: auto;
  max-width: 160px;
  height: 36px;
  object-fit: contain;
}

.yk-scratch__body {
  padding: 14px 16px 16px;
}

.yk-scratch__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.yk-scratch__stage {
  position: relative;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f4f4;
}

.yk-scratch__prize {
  padding: 16px;
}

.yk-scratch__prize[hidden] {
  display: none !important;
}

.yk-scratch__code {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.yk-scratch__terms,
.yk-scratch__status {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #555;
}

.yk-scratch__foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.yk-scratch__reveal {
  appearance: none;
  margin-top: 10px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

/* Fly cart: sit in the item list, not on top of Checkout / View Cart. */
#popup-fly-cart .fly-cart-body .yk-cx-gift--fly,
#popup-fly-cart .yk-cx-gift--fly {
  margin: 8px 0 12px;
  padding: 10px;
}

#popup-fly-cart .yk-cx-gift--fly .yk-cx-gift__fields {
  max-height: min(42vh, 320px);
  overflow: auto;
}

body.woocommerce-checkout .yk-cx-gift--checkout {
  margin: 0 0 16px;
}

@media screen and (max-width: 480px) {
  .yk-cx-gift__pill span {
    min-width: 48px;
    padding: 7px 10px;
  }
}

.yk-cx-box {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  font-family: "proxima-nova", "Proxima Nova", "Nunito Sans", sans-serif;
}

.yk-cx-box__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.yk-cx-box .description,
.yk-cx-box p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #555;
}

.yk-cx-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 8px;
  font-size: 12px;
}

.yk-cx-box input[type="text"],
.yk-cx-box input[type="email"],
.yk-cx-box input[type="number"],
.yk-cx-box input[type="url"],
.yk-cx-box textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}

.yk-cx-btn,
.woocommerce button.yk-cx-btn,
.woocommerce-page button.yk-cx-btn,
body.woocommerce-checkout .yk-cx-gift .yk-cx-btn,
body.woocommerce-checkout .yk-cx-box .yk-cx-btn,
.yk-cx-gift__save,
.yk-cx-gift__edit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100% !important;
  max-width: 100%;
  min-height: 44px !important;
  margin: 0;
  padding: 10px 16px;
  border-radius: 10px !important;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap !important;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

.yk-cx-btn--ghost,
.woocommerce button.yk-cx-btn--ghost,
.yk-cx-gift__edit {
  background: #fff;
  color: #111;
}

.yk-cx-btn__short {
  display: none;
}

.yk-cx-apply {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yk-cx-apply__field,
.yk-cx-box .yk-cx-apply__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
}

@media screen and (max-width: 480px) {
  .yk-cx-btn__long {
    display: none;
  }

  .yk-cx-btn__short {
    display: inline;
  }

  .yk-cx-gift__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media screen and (min-width: 640px) {
  .yk-cx-gift__actions {
    flex-direction: row;
  }

  .yk-cx-gift__actions .yk-cx-btn {
    width: auto !important;
    flex: 1;
  }

  .yk-cx-apply {
    flex-direction: row;
    align-items: flex-end;
  }

  .yk-cx-apply .yk-cx-btn {
    width: auto !important;
    min-width: 112px;
    flex: 0 0 auto;
  }
}

.yk-cx-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  font-size: 13px;
}

.yk-cx-form input,
.yk-cx-form textarea {
  width: 100%;
  max-width: 420px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.yk-cx-copy {
  width: min(100%, 420px);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.yk-cx-list__sub {
  padding-left: 12px;
  color: #6d6d6d;
  font-size: 12px;
}

.yk-cx-account {
  font-family: "proxima-nova", "Proxima Nova", "Nunito Sans", sans-serif;
}
