.tbg-journey-bar {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #173f2e;
  color: #fff;
}

.tbg-journey-bar__inner {
  width: min(calc(100% - 2rem), 1320px);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
}

.tbg-journey-bar__inner > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.tbg-journey-bar span {
  flex: 0 0 auto;
  color: #cfe3d6;
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tbg-journey-bar strong {
  overflow: hidden;
  font-size: 0.77rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbg-journey-bar :where(button, .tbg-journey-bar__change) {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 999px !important;
  margin-block: 0.32rem;
  padding: 0.18rem 0.6rem;
  background: transparent;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.tbg-journey-bar :where(button, .tbg-journey-bar__change):hover,
.tbg-journey-bar :where(button, .tbg-journey-bar__change):focus-visible {
  border-color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.tbg-journey-is-open {
  overflow: hidden;
}

.tbg-journey-dialog {
  position: fixed;
  z-index: 100006;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.tbg-journey-dialog[hidden] {
  display: none;
}

.tbg-journey-dialog__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(8, 28, 19, 0.64);
}

.tbg-journey-dialog__panel {
  position: relative;
  width: min(100%, 540px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 28, 19, 0.3);
}

.tbg-journey-dialog__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 42px;
  min-height: 42px;
  border: 1px solid #ccd8d1 !important;
  border-radius: 999px !important;
  background: #fff;
  color: #173f2e;
  font-size: 1.35rem;
  cursor: pointer;
}

.tbg-journey-dialog__step {
  margin: 0;
  color: #5b6c63;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tbg-journey-dialog h2 {
  margin: 0.3rem 2.5rem 0.55rem 0;
  color: #173f2e;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  line-height: 1.05;
}

.tbg-journey-dialog__panel > p:not(.tbg-journey-dialog__step) {
  color: #5b6c63;
}

.tbg-journey-dialog fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
  border: 0;
  padding: 0;
}

.tbg-journey-dialog fieldset label {
  position: relative;
}

.tbg-journey-dialog fieldset input {
  position: absolute;
  opacity: 0;
}

.tbg-journey-dialog fieldset label > span {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 0.25rem;
  border: 2px solid #ccd8d1;
  border-radius: 13px;
  padding: 0.8rem;
  cursor: pointer;
}

.tbg-journey-dialog fieldset input:checked + span {
  border-color: #2f6b48;
  background: #eef5f0;
  box-shadow: 0 0 0 3px rgba(47, 107, 72, 0.12);
}

.tbg-journey-dialog fieldset input:focus-visible + span {
  outline: 3px solid rgba(47, 107, 72, 0.25);
  outline-offset: 2px;
}

.tbg-journey-dialog fieldset small {
  color: #5b6c63;
  font-size: 0.72rem;
}

.tbg-journey-postcode {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #173f2e;
}

.tbg-journey-postcode[hidden] {
  display: none;
}

.tbg-journey-postcode__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.tbg-journey-postcode__heading label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
}

.tbg-journey-postcode__heading small {
  color: #5b6c63;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
}

.tbg-journey-postcode__controls {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tbg-journey-postcode__controls input {
  width: 6.25rem;
  max-width: 6.25rem;
  min-height: 46px;
  border: 1px solid #aebeb5;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.tbg-journey-postcode__controls .button {
  min-height: 46px;
  border: 1px solid #173f2e !important;
  border-radius: 10px !important;
  padding-inline: 0.9rem;
  font-weight: 700;
}

.tbg-journey-postcode__controls .button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tbg-journey-dialog__status {
  min-height: 1.25rem;
  margin: 0.35rem 0;
  color: #5b6c63;
  font-size: 0.76rem;
}

.tbg-journey-dialog__status.is-error {
  color: #a62d2d;
  font-weight: 650;
}

.tbg-journey-dialog__status.is-success {
  color: #23633f;
  font-weight: 700;
}

.tbg-journey-dialog__actions {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1.25fr);
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.tbg-journey-dialog__actions .button {
  min-height: 46px;
  border: 1px solid #173f2e !important;
  border-radius: 10px !important;
  font-weight: 700;
}

.tbg-journey-dialog__check {
  background: #173f2e !important;
  color: #fff !important;
}

.tbg-journey-dialog__result-close {
  background: #fff !important;
  color: #173f2e !important;
}

.tbg-journey-dialog__result-close[hidden] {
  display: none !important;
}

.tbg-journey-dialog__save {
  background: #173f2e !important;
  color: #fff !important;
}

.tbg-journey-dialog__actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tbg-journey-dialog.is-postcode-check [data-tbg-journey-choice-only] {
  display: none !important;
}

.tbg-cart-journey {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  border: 1px solid #ccd8d1;
  border-radius: 11px;
  padding: 0.7rem;
  background: #f5f8f6;
}

.tbg-cart-drawer__footer .tbg-cart-journey {
  margin-top: 0;
  padding: 0.55rem 0.65rem;
}

.tbg-cart-journey > div {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.tbg-cart-journey span {
  color: #5b6c63;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tbg-cart-journey strong {
  color: #173f2e;
  font-size: 0.76rem;
  line-height: 1.3;
}

.tbg-cart-journey button {
  flex: 0 0 auto;
  border: 0;
  padding: 0.4rem;
  background: transparent;
  color: #2f6b48;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.tbg-delivery-progress {
  margin-block: 0.7rem;
}

.tbg-cart-drawer__footer .tbg-delivery-progress {
  margin-block: 0.5rem;
}

.tbg-delivery-progress > div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0e9e3;
}

.tbg-delivery-progress > div span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #72a67f, #2f6b48);
}

.tbg-delivery-progress p {
  margin: 0.35rem 0 0;
  color: #405a4d;
  font-size: 0.72rem;
  font-weight: 650;
}

.tbg-checkout-delivery-progress > td {
  padding: 0.35rem 0 0.85rem;
  border-top: 0;
}

.tbg-checkout-delivery-progress .tbg-delivery-progress {
  margin: 0;
}

.tbg-checkout-delivery-progress .tbg-delivery-progress p {
  font-size: 0.78rem;
  line-height: 1.4;
}

.tbg-full-cart-guidance {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tbg-reorder-panel {
  margin-block: 1.5rem;
  border: 1px solid #ccd8d1;
  border-radius: 13px;
  padding: 1rem;
  background: #f5f8f6;
}

.tbg-reorder-panel :where(h2, p) {
  margin-top: 0;
}

@media (max-width: 600px) {
  .tbg-journey-bar__inner {
    width: calc(100% - 1rem);
    min-height: 48px;
  }

  .tbg-journey-bar__inner > div {
    display: grid;
    gap: 0.05rem;
  }

  .tbg-journey-bar span {
    display: none;
  }

  .tbg-journey-bar strong {
    max-width: 66vw;
    font-size: 0.7rem;
  }

  .tbg-journey-bar :where(button, .tbg-journey-bar__change) {
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tbg-journey-postcode__heading {
    display: grid;
    gap: 0.2rem;
  }

  .tbg-journey-postcode__heading small {
    text-align: left;
  }

  .tbg-journey-dialog {
    align-items: end;
    padding: 0;
  }

  .tbg-journey-dialog__panel {
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
}

/* Phase 10.8 keeps the receiving action clear of the header basket control. */
.tbg-journey-bar__inner > :where(button, .tbg-journey-bar__change):first-child {
  order: 1;
}

.tbg-journey-bar__inner > div {
  order: 2;
}
