/*
 * Simple Points and Rewards 1.6.x: compact cart/checkout redemption layout.
 * Keep plugin markup, events, point limits, and monetary calculations intact.
 * Its 185px input/button minimums can squeeze Japanese text in a totals sidebar,
 * even on desktop, so the actions use the available container width at all sizes.
 */
.kiratt-fc-order-theme .spar-redeem-compact--totals {
  width: 100%;
  min-width: 0;
  margin: 16px 0;
  color: var(--kf-ink, #243b42);
  text-align: left;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 0;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-compact-left {
  flex: 1 1 180px;
  min-width: 0;
  line-height: 1.8;
  font-size: 13px;
  overflow-wrap: break-word;
  word-break: normal;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .button.spar-compact-toggle-btn {
  flex: 0 0 auto;
  max-width: 100%;
  min-height: 40px;
  padding: 9px 13px;
  white-space: nowrap;
  line-height: 1.5;
  font-size: 13px;
  color: var(--kf-deep, #126d7a);
  border-color: var(--kf-blue, #1495ae);
  background: #fff;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--kf-line, #dce6e8);
  border-radius: 6px;
  background: #fff;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-panel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 12px;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-slider {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--kf-blue, #1495ae);
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-panel-right {
  display: block;
  min-width: 0;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 9px 8px;
  border: 1px solid var(--kf-line, #dce6e8);
  border-radius: 4px;
  color: var(--kf-ink, #243b42);
  background: #fff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: center;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-discount-box {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--kf-line, #dce6e8);
  border-radius: 4px;
  color: var(--kf-deep, #126d7a);
  background: var(--kf-pale, #eaf6f6);
  text-align: left;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-value-label {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: normal;
  font-size: 13px;
  line-height: 1.6;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-value {
  white-space: nowrap;
  word-break: normal;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .button.spar-redeem-apply-btn {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--kf-blue, #1495ae);
  border-radius: 4px;
  color: #fff;
  background: var(--kf-blue, #1495ae);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-apply-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-applied-status {
  flex-wrap: wrap;
  line-height: 1.7;
}

.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-input:focus-visible,
.kiratt-fc-order-theme .spar-redeem-compact--totals .spar-redeem-slider:focus-visible,
.kiratt-fc-order-theme .spar-redeem-compact--totals button:focus-visible {
  outline: 2px solid var(--kf-blue, #1495ae);
  outline-offset: 3px;
}
