/*
 * Subscription configurator block (templates/studio/page-block-subscription.php),
 * on top of page-blocks.css: the size cards are .krokus-pb-plan cards.
 * Colours use the redesign's source values so Store Design keeps driving
 * them: '#475836' derives to Haki #475836. Cream #FAF6EE, ink #1E2934.
 */

.ks {
  --ks-ink: #1E2934;
  --ks-muted: #5b6470;
  --ks-cream: #FAF6EE;
  --ks-line: rgba(30, 41, 52, .14);
  --ks-accent: #475836;
  --ks-error: #b3261e;
  color: var(--ks-ink);
  scroll-margin-top: 90px;
}

/* the configurator shows the sizes itself: the static price cards step aside */
body:has(.krokus-pb-block--subscription) .krokus-pb-block--plans {
  display: none;
}

.ks-admin-note {
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 10px 16px;
  border: 1px dashed var(--ks-accent);
  color: var(--ks-accent);
  font-size: 14px;
  text-align: center;
}

.ks-notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--ks-error);
  background: #fdf1f0;
  color: var(--ks-error);
}

/* ── step 1: size cards (krokus-pb-plan, selectable) ────── */
/* inside the step card: compact, white on cream, always one row (stacks on phones) */
.ks-card--sizes .ks-plans {
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 680px) {
  .ks-card--sizes .krokus-pb-plans--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-card--sizes .krokus-pb-plans--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ks-card--sizes .krokus-pb-plans--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ks-card--sizes .ks-plan,
.krokus-pb-bg-white .ks-card--sizes .ks-plan:not(.is-featured) {
  padding: 30px 18px 18px;
  border: 1px solid var(--ks-line);
  background: #fff;
}
.ks-card--sizes .krokus-pb-plan__name {
  margin-bottom: 8px;
  font-size: 24px;
}
.ks-card--sizes .krokus-pb-plan__price {
  margin-bottom: 16px;
}
.ks-card--sizes .krokus-pb-plan__amount {
  font-size: 34px;
}
.ks-card--sizes .krokus-pb-plan__period {
  font-size: 14px;
}
.ks-card--sizes .krokus-pb-plan__list {
  margin-bottom: 18px;
  padding-top: 14px;
}
.ks-card--sizes .ks-plan__li {
  font-size: 14px;
}
.ks-card--sizes .krokus-pb-plan__badge {
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  font-size: 11px;
}
.ks-card--sizes .ks-plan__pick {
  padding: 10px 12px;
  font-size: 13px;
}
.ks-card--sizes .krokus-pb-note {
  max-width: none;
  margin: 18px 0 0;
  font-size: 14px;
  text-align: left;
}
.ks-plans {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ks-plan {
  margin: 0;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ks-plan__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ks-plan .krokus-pb-plan__name,
.ks-plan .krokus-pb-plan__price,
.ks-plan .krokus-pb-plan__list {
  display: block;
}
.ks-plan__li {
  position: relative;
  display: block;
  margin-bottom: 10px;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.5;
}
.ks-plan__li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 5px;
  width: 12px;
  height: 7px;
  border-left: 2px solid #475836;
  border-bottom: 2px solid #475836;
  transform: rotate(-45deg);
}
.ks-plan__pick {
  display: block;
  padding: 12px 16px;
  border: 1px solid #475836;
  color: #475836;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  transition: background-color .15s, color .15s;
}
.ks-plan__pick-on,
.ks-plan:has(.ks-plan__input:checked) .ks-plan__pick-off {
  display: none;
}
.ks-plan:has(.ks-plan__input:checked) .ks-plan__pick-on {
  display: inline;
}
.ks-plan:has(.ks-plan__input:checked) .ks-plan__pick-on::before {
  content: '✓ ';
}
.ks-plan:hover {
  transform: translateY(-2px);
}
.ks-plan:hover .ks-plan__pick {
  background: rgba(71, 88, 54, .06);
}
/* selected: the featured look moves to the chosen card */
.ks-plans .ks-plan.is-featured {
  border: 1px solid transparent;
  box-shadow: none;
}
.krokus-pb-bg-cream .ks-plans .ks-plan.is-featured,
.krokus-pb-bg-green .ks-plans .ks-plan.is-featured {
  border-color: var(--ks-line);
}
.ks-plans .ks-plan:has(.ks-plan__input:checked) {
  /* same 1px border as the others + an inset line: selecting never shifts the layout */
  border-color: #475836;
  background: #fff;
  box-shadow: inset 0 0 0 1px #475836, 0 16px 40px rgba(30, 41, 52, .10);
}
.ks-plan:has(.ks-plan__input:checked) .ks-plan__pick {
  background: #475836;
  color: #fff;
}
.ks-plan:has(.ks-plan__input:focus-visible) {
  outline: 2px solid #475836;
  outline-offset: 3px;
}
.ks-plan.is-disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

/* ── form + summary ─────────────────────────────────────── */
.ks__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin: 0;
  align-items: start;
}
.ks__main {
  display: grid;
  gap: 20px;
}

.ks-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ks-line);
  background: #fff;
}
.krokus-pb-bg-white .ks-card {
  border-color: transparent;
  background: var(--ks-cream);
}
.ks-card__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}
.ks-card__title span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 50%;
  background: #475836;
  color: #fff;
  font-size: 17px;
}

.ks-label {
  margin: 22px 0 10px;
  font-weight: 600;
}
.ks-card__title + .ks-label {
  margin-top: 0;
}

/* pills */
.ks-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ks-pill {
  position: relative;
  display: flex;
  margin: 0;
  cursor: pointer;
}
.ks-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ks-pill span {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 56px; /* room for a gift line: every pill the same height */
  padding: 8px 20px;
  border: 1px solid var(--ks-line);
  background: #fff;
  line-height: 1.2;
  transition: border-color .15s, background-color .15s;
}
.ks-pill:hover span {
  border-color: #475836;
}
.ks-pill em {
  margin-top: 2px;
  color: #475836;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}
.ks-pill input:checked + span {
  border-color: #475836;
  background: #475836;
  color: #fff;
}
.ks-pill input:checked + span em {
  color: #fff;
}
.ks-pill input:focus-visible + span {
  outline: 2px solid #475836;
  outline-offset: 2px;
}

/* fields */
.ks-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.ks-row--3 {
  grid-template-columns: repeat(3, 1fr);
}
.ks-field {
  margin-top: 18px;
}
.ks-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}
.ks-field abbr {
  color: var(--ks-error);
  text-decoration: none;
}
.ks-opt {
  color: var(--ks-muted);
  font-weight: 400;
}
.ks-field input,
.ks-field select,
.ks-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--ks-line);
  border-radius: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.ks-field textarea {
  min-height: 0;
  resize: vertical;
}
.ks-field input:focus,
.ks-field select:focus,
.ks-field textarea:focus {
  border-color: #475836;
  outline: none;
  box-shadow: 0 0 0 3px rgba(71, 88, 54, .15);
}
.ks-help {
  margin: 6px 0 0;
  color: var(--ks-muted);
  font-size: 14px;
  line-height: 1.5;
}
.ks-error {
  margin: 6px 0 0;
  color: var(--ks-error);
  font-size: 14px;
}
.ks-plans + .ks-error {
  text-align: center;
}

/* gift switch */
.ks-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
}
.ks-switch input {
  position: absolute;
  opacity: 0;
}
.ks-switch__track {
  position: relative;
  flex: 0 0 46px;
  height: 26px;
  background: #cfd3d8;
  transition: background-color .15s;
}
.ks-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transition: transform .15s;
}
.ks-switch input:checked + .ks-switch__track {
  background: #475836;
}
.ks-switch input:checked + .ks-switch__track::after {
  transform: translateX(20px);
}
.ks-switch input:focus-visible + .ks-switch__track {
  outline: 2px solid #475836;
  outline-offset: 2px;
}
.ks-gift {
  margin-top: 16px;
  padding: 4px 20px 20px;
  border-left: 3px solid #475836;
  background: #fff;
}
.ks-gift[hidden] {
  display: none;
}

.ks-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.45;
}
.ks-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #475836;
}

/* summary */
.ks__side {
  position: sticky;
  top: 100px;
}
.ks-summary {
  padding: 28px;
  border: 2px solid #475836;
  background: #fff;
  box-shadow: 0 16px 40px rgba(30, 41, 52, .10);
}
.ks-summary__title {
  margin: 0 0 12px;
  font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}
.ks-summary__list {
  margin: 0;
}
.ks-summary__list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ks-line);
  font-size: 15px;
}
.ks-summary__list div[hidden] {
  display: none;
}
.ks-summary__list dt {
  color: var(--ks-muted);
  font-weight: 400;
}
.ks-summary__list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.ks-summary__gift dd {
  color: #475836;
}
.ks-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 4px;
  font-size: 18px;
}
.ks-summary__total strong {
  font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}
.ks-summary__note {
  margin: 0;
  color: var(--ks-muted);
  font-size: 14px;
}
.ks-summary__btn {
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
}

@media (max-width: 1099px) {
  .ks__grid {
    grid-template-columns: 1fr;
  }
  .ks__side {
    position: static;
  }
}
@media (max-width: 600px) {
  .ks-row,
  .ks-row--3 {
    grid-template-columns: 1fr;
  }
  .ks-summary {
    padding: 22px;
  }
}

/* ── missing / invalid fields ───────────────────────────── */
.ks-field.is-invalid input,
.ks-field.is-invalid select,
.ks-field.is-invalid textarea {
  border-color: var(--ks-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}
.ks-field.is-invalid > label {
  color: var(--ks-error);
}
.ks-plans.is-invalid,
.ks-pills.is-invalid {
  outline: 1px solid var(--ks-error);
  outline-offset: 6px;
}
.ks-check.is-invalid {
  color: var(--ks-error);
}
.ks-check.is-invalid input {
  outline: 2px solid var(--ks-error);
  outline-offset: 1px;
}

/* ── optional wishes: closed until opened ───────────────── */
.ks-more {
  margin-top: 18px;
  border-top: 1px solid var(--ks-line);
}
.ks-more + .ks-more {
  margin-top: 0;
}
.ks-more:last-child {
  border-bottom: 1px solid var(--ks-line);
}
.ks-more > summary {
  position: relative;
  padding: 16px 32px 16px 0;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.ks-more > summary::-webkit-details-marker {
  display: none;
}
.ks-more > summary::before,
.ks-more > summary::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #475836;
  transition: transform .2s;
}
.ks-more > summary::after {
  transform: rotate(90deg);
}
.ks-more[open] > summary::after {
  transform: rotate(0deg);
}
.ks-more > summary:hover {
  color: #475836;
}
.ks-more > summary:focus-visible {
  outline: 2px solid #475836;
  outline-offset: 2px;
}
.ks-more .ks-field {
  margin: 0 0 18px;
}

/* ── phone / tablet bar: term + total while the summary is off screen ── */
.ks-bar {
  display: none;
}
@media (max-width: 1099px) {
  .ks-bar {
    position: fixed;
    z-index: 990;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ks-line);
    background: #fff;
    box-shadow: 0 -8px 24px rgba(30, 41, 52, .12);
    transform: translateY(110%);
    transition: transform .25s ease;
  }
  .ks-bar.is-on {
    transform: none;
  }
  .ks-bar__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .ks-bar__term {
    overflow: hidden;
    color: var(--ks-muted);
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ks-bar__total {
    font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
  }
  .ks-bar__btn {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 20px;
  }
}

/* ── address suggestions + zone (checkout's HERE lookup) ── */
.ks-address {
  position: relative;
}
.ks-suggest {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--ks-line);
  border-top: 0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 41, 52, .14);
}
.ks-suggest[hidden] {
  display: none;
}
.ks-suggest__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--ks-line);
  border-radius: 0;
  background: #fff;
  color: var(--ks-ink);
  text-align: left;
  cursor: pointer;
}
.ks-suggest__item:last-child {
  border-bottom: 0;
}
.ks-suggest__item.is-active,
.ks-suggest__item:hover {
  background: var(--ks-cream);
}
.ks-suggest__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.ks-suggest__sub {
  display: block;
  color: var(--ks-muted);
  font-size: 13px;
}
.ks-suggest__empty {
  padding: 12px 14px;
  color: var(--ks-muted);
  font-size: 14px;
}
.ks-zone {
  margin: 8px 0 0;
  color: #475836;
  font-size: 14px;
  font-weight: 600;
}
.ks-zone.is-error {
  color: var(--ks-error);
}

/* phone widget fills the field like the other inputs */
.ks-field .iti {
  display: block;
  width: 100%;
}
.ks-field.is-invalid .iti input {
  border-color: var(--ks-error);
}

.ks-switch--gift {
  margin-top: 22px;
}
.ks-gift .ks-label:first-child {
  margin-top: 18px;
}

/* ── phones: even pill grid, bar text may wrap ─────────── */
@media (max-width: 600px) {
  .ks-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ks-pill:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ks-pill span {
    padding: 8px 12px;
  }
  .ks-bar {
    gap: 12px;
  }
  .ks-bar__term {
    white-space: normal;
    line-height: 1.3;
  }
  .ks-bar__total {
    font-size: 24px;
  }
  .ks-bar__btn {
    padding: 0 16px;
  }
}

/* ── custom dropdowns (the native select stays hidden for submit) ── */
.ks-select {
  position: relative;
}
.ks-select[hidden] {
  display: none;
}
.ks-field .ks-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.ks-select__btn {
  position: relative;
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 42px 10px 14px;
  border: 1px solid var(--ks-line);
  border-radius: 0;
  background: #fff;
  color: var(--ks-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}
.ks-select__btn::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #475836;
  border-bottom: 2px solid #475836;
  transform: rotate(45deg);
  transition: transform .15s, margin-top .15s;
}
.ks-select.is-open .ks-select__btn::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.ks-select__btn:hover,
.ks-select.is-open .ks-select__btn,
.ks-select__btn:focus-visible {
  border-color: #475836;
  outline: none;
}
.ks-select__btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(71, 88, 54, .15);
}
.ks-field.is-invalid .ks-select__btn {
  border-color: var(--ks-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}
.ks-select__list {
  position: absolute;
  z-index: 60;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid #475836;
  border-top: 0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 41, 52, .14);
  list-style: none;
}
.ks-select__list[hidden] {
  display: none;
}
.ks-select__list li {
  position: relative;
  padding: 10px 36px 10px 14px;
  border-bottom: 1px solid var(--ks-line);
  font-size: 15px;
  cursor: pointer;
}
.ks-select__list li:last-child {
  border-bottom: 0;
}
.ks-select__list li.is-active {
  background: var(--ks-cream);
}
.ks-select__list li[aria-selected="true"] {
  font-weight: 600;
}
.ks-select__list li[aria-selected="true"]::after {
  content: '✓';
  position: absolute;
  right: 14px;
  color: #475836;
}

/* ── phones: sizes as stacked lines (name · price, description below) ── */
@media (max-width: 679px) {
  .ks-card--sizes .ks-plans {
    gap: 8px;
  }
  .ks-card--sizes .ks-plan,
  .krokus-pb-bg-white .ks-card--sizes .ks-plan:not(.is-featured) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name price" "list list";
    align-items: baseline;
    column-gap: 12px;
    padding: 14px 14px 14px 50px;
    text-align: left;
    transform: none;
  }
  .ks-card--sizes .krokus-pb-plan__name {
    grid-area: name;
    margin: 0;
    font-size: 22px;
  }
  .ks-card--sizes .krokus-pb-plan__price {
    grid-area: price;
    margin: 0;
    white-space: nowrap;
  }
  .ks-card--sizes .krokus-pb-plan__amount {
    font-size: 24px;
  }
  .ks-card--sizes .krokus-pb-plan__period {
    font-size: 13px;
  }
  .ks-card--sizes .krokus-pb-plan__list {
    grid-area: list;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
  }
  .ks-card--sizes .ks-plan__li {
    margin: 0;
    padding: 0;
    color: var(--ks-muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .ks-card--sizes .ks-plan__li::before {
    display: none;
  }
  .ks-card--sizes .krokus-pb-plan__badge {
    top: -9px;
    left: 50px;
    right: auto;
  }
  /* the pick button becomes a square tick box on the left */
  .ks-card--sizes .ks-plan__pick {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    padding: 0;
    border: 1.5px solid #475836;
    background: #fff;
    font-size: 0;
  }
  .ks-card--sizes .ks-plan:has(.ks-plan__input:checked) .ks-plan__pick {
    background: #475836;
  }
  .ks-card--sizes .ks-plan:has(.ks-plan__input:checked) .ks-plan__pick::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 7px;
    height: 12px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
  }
  .ks-card--sizes .ks-plans .ks-plan:has(.ks-plan__input:checked) {
    box-shadow: inset 0 0 0 1px #475836;
  }
}

/* ── phones: step cards and summary run to the screen edges ── */
@media (max-width: 599px) {
  .ks-card,
  .ks-summary {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .ks-summary {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .ks__main {
    gap: 12px;
  }
}

/* ── term tiles: calendar icon with the number inside, word below ── */
.ks-terms.ks-pills {
  display: grid;
  grid-template-columns: repeat(var(--ks-n, 5), minmax(0, 112px));
  gap: 8px;
}
.ks-term > span {
  position: relative;
  align-items: center;
  gap: 2px;
  min-height: 0;
  padding: 12px 4px 10px;
  text-align: center;
}
/* the base pill rule styles every nested span: tile parts keep their own size */
.ks-term > span > span {
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.ks-term .ks-term__cal {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  color: #475836;
  line-height: 0;
}
.ks-term .ks-term__cal svg {
  display: block;
  width: 44px;
  height: 44px;
}
/* sits in the calendar's body (below its header line) */
.ks-term .ks-term__num {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  display: block;
  font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 21px;
  color: var(--ks-ink);
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}
.ks-term .ks-term__word {
  margin-top: 4px;
}
.ks-term .ks-term__word {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ks-ink);
}
.ks-term .ks-term__gift {
  position: absolute;
  top: 6px;
  right: 6px;
  display: block;
  color: #475836;
  line-height: 0;
}
.ks-term input:checked + span .ks-term__cal,
.ks-term input:checked + span .ks-term__cal .ks-term__num,
.ks-term input:checked + span .ks-term__word,
.ks-term input:checked + span .ks-term__gift {
  color: #fff;
}
.ks-term .screen-reader-text {
  position: absolute !important;
}
.ks-term-gift {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: #475836;
  font-size: 15px;
  font-weight: 600;
}
.ks-term-gift[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .ks-terms.ks-pills {
    grid-template-columns: repeat(var(--ks-n, 5), minmax(0, 1fr));
    gap: 6px;
  }
  .ks-pills .ks-pill.ks-term:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .ks-term > span {
    padding: 10px 2px 8px;
  }
  .ks-term .ks-term__word {
    font-size: 13px;
  }
  .ks-term .ks-term__gift {
    top: 3px;
    right: 3px;
  }
  .ks-term .ks-term__gift svg {
    width: 12px;
    height: 12px;
  }
}

/* ── colour palettes: swatch tiles ───────────────────────── */
.ks-swatches.ks-pills {
  display: grid;
  grid-template-columns: repeat(var(--ks-n, 3), minmax(0, 180px));
  gap: 8px;
}
.ks-swatch > span {
  align-items: stretch;
  gap: 8px;
  min-height: 0;
  padding: 8px 8px 10px;
}
.ks-swatch > span > span {
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.ks-swatch .ks-swatch__chip {
  display: block;
  height: 30px;
  border: 1px solid rgba(30, 41, 52, .08);
  background: repeating-linear-gradient(45deg, #ece5d6 0 6px, #f7f3ea 6px 12px);
}
.ks-swatch .ks-swatch__chip--maiga {
  background: linear-gradient(90deg, #f3cfd8, #f6e4cf, #e2ebd8, #dfe2f1);
}
.ks-swatch .ks-swatch__chip--kosa {
  background: linear-gradient(90deg, #d81b55, #f07b16, #f6c419, #7d2a8c);
}
.ks-swatch .ks-swatch__chip--pec-florista-ieskatiem {
  background: linear-gradient(90deg, #f3cfd8 0 25%, #d81b55 25% 50%, #e2ebd8 50% 75%, #f6c419 75%);
}
.ks-swatch .ks-swatch__name {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}
.ks-swatch input:checked + span .ks-swatch__chip {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
}

/* ── example chips for "Vēlamie ziedi" ───────────────────── */
.ks-help--lead {
  margin: 0 0 10px;
}
.ks-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.ks-chip {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #475836;
  border-radius: 0;
  background: #fff;
  color: var(--ks-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.ks-chip::before {
  content: '+ ';
  color: #475836;
  font-weight: 600;
}
.ks-chip[aria-pressed="true"] {
  background: #475836;
  color: #fff;
}
.ks-chip[aria-pressed="true"]::before {
  content: '✓ ';
  color: #fff;
}
.ks-chip:focus-visible {
  outline: 2px solid #475836;
  outline-offset: 2px;
}
.ks-field textarea[data-ks-grow] {
  overflow: hidden;
  resize: none;
}

@media (max-width: 600px) {
  .ks-swatches.ks-pills {
    grid-template-columns: repeat(var(--ks-n, 3), minmax(0, 1fr));
    gap: 6px;
  }
  .ks-pills .ks-pill.ks-swatch:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .ks-swatch > span {
    padding: 6px 6px 8px;
  }
  .ks-swatch .ks-swatch__name {
    font-size: 13px;
  }
  /* chips: one swipeable row, edge to edge */
  .ks-chips {
    flex-wrap: nowrap;
    margin: 0 -16px 10px;
    padding: 2px 16px 4px;
    overflow-x: auto;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }
  .ks-chips::-webkit-scrollbar {
    display: none;
  }
  .ks-chip {
    flex: none;
  }
}
/* grid columns may shrink below their content (the swipeable chip row is wider than a phone) */
.ks__main {
  grid-template-columns: minmax(0, 1fr);
}
.ks__main > *,
.ks-field {
  min-width: 0;
}

/* ── first delivery date: checkout's flatpickr look ───────── */
.ks-field #ks_first_date_view {
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475836' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='16'/%3E%3Cpath d='M3 10h18M8 2.5v5M16 2.5v5'/%3E%3C/svg%3E") no-repeat right 14px center / 20px 20px;
  cursor: pointer;
}
/* same as checkout.css: today outlined, chosen day filled (#475836 derives to the store primary) */
body .flatpickr-calendar .flatpickr-innerContainer .flatpickr-rContainer .flatpickr-days .dayContainer .flatpickr-day.today:not(.selected) {
  border: 1px solid #475836;
  background: transparent;
  color: #475836;
}
body .flatpickr-calendar .flatpickr-innerContainer .flatpickr-rContainer .flatpickr-days .dayContainer .flatpickr-day.selected,
body .flatpickr-calendar .flatpickr-innerContainer .flatpickr-rContainer .flatpickr-days .dayContainer .flatpickr-day.selected:hover,
body .flatpickr-calendar .flatpickr-innerContainer .flatpickr-rContainer .flatpickr-days .dayContainer .flatpickr-day.selected:focus {
  border: 0;
  background: #475836;
  color: #fff;
}

/* ── phones: the summary is a plain cream card, no green frame ── */
@media (max-width: 599px) {
  .ks-summary {
    border: 0;
    background: var(--ks-cream);
  }
}

/* ── CTA buttons, reversed from the theme: dark green, light sage on hover/press ──
   Source colours derive through Store Design: #475836 → Haki, #939c81 → sage.
   On sage the label turns ink: white on sage is below 4.5:1. */
body .ks .btn.btn-primary {
  background: #475836;
  border-color: #475836;
  color: #fff;
}
/* the theme's own :hover/:focus rules turn it dark: keep it dark there too */
body .ks .btn.btn-primary:hover,
body .ks .btn.btn-primary:focus {
  background: #475836;
  border-color: #475836;
  color: #fff;
}
/* light only while pressed, on keyboard focus, or on real hover —
   touch screens keep :hover after a tap, so phones don't get it */
body .ks .btn.btn-primary:focus-visible,
body .ks .btn.btn-primary:active,
body .ks .btn.btn-primary:not(:disabled):not(.disabled):active {
  background: #939c81;
  border-color: #939c81;
  color: var(--ks-ink);
}
@media (hover: hover) and (pointer: fine) {
  body .ks .btn.btn-primary:hover {
    background: #939c81;
    border-color: #939c81;
    color: var(--ks-ink);
  }
}
body .ks .btn.btn-primary:focus-visible {
  outline: 2px solid #475836;
  outline-offset: 2px;
}

/* ── summary typography = checkout's "Jūsu pasūtījums" (style.css order review) ── */
.ks-summary .ks-summary__title {
  margin: 0 0 20px;
  font-family:"Jost", "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 32px;
}
.ks-summary .ks-summary__list {
  padding: 12px 0;
  border-top: 1px solid var(--ks-line);
  border-bottom: 1px solid var(--ks-line);
}
.ks-summary .ks-summary__list div {
  padding: 6px 0;
  border-bottom: 0;
  font-size: 16px;
  line-height: 20px;
}
.ks-summary .ks-summary__list dt {
  color: var(--ks-ink);
  font-weight: 400;
}
.ks-summary .ks-summary__list dd {
  font-weight: 400;
}
.ks-summary .ks-summary__total {
  margin: 0;
  padding: 12px 0 2px;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}
.ks-summary .ks-summary__total strong {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}
.ks-summary .ks-summary__note {
  font-size: 12px;
  line-height: 18px;
}
.ks-summary .ks-check--terms {
  font-size: 16px;
  line-height: 24px;
}
.ks-summary .ks-summary__btn {
  min-height: 52px;
  margin-top: 15px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── phones: palettes stacked, strip on the left, name beside it ── */
@media (max-width: 600px) {
  .ks-swatches.ks-pills {
    grid-template-columns: minmax(0, 1fr);
  }
  .ks-swatch > span {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 10px 12px;
  }
  .ks-swatch .ks-swatch__chip {
    flex: 0 0 76px;
    width: 76px;
    height: 28px;
  }
  .ks-swatch .ks-swatch__name {
    font-size: 15px;
    text-align: left;
  }
}

/* ── VAT number check result ─────────────────────────────── */
.ks-vat-status {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
}
.ks-vat-status[hidden] {
  display: none;
}
.ks-vat-status.is-ok {
  color: #475836;
  font-weight: 600;
}
.ks-vat-status.is-info {
  color: var(--ks-muted);
}
