/*
 * Checkout (template/order-overview.php): the form on the left in three numbered steps (delivery, contact
 * details, payment), the order summary on the right, wide enough for a photo and the full product name, with
 * the Pay button under the total. Delivery options come in groups: store pickup, parcel machines, courier.
 * Plain CSS on top of styles.min.css, like payment-methods.css.
 */
.co .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  column-gap: 48px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 80px;
}

.co h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 8px;
  padding: 0 !important;
}

.co-section {
  padding: 28px 0;
  border-bottom: 1px solid #e8e8ed;
}

.co-section:last-child {
  border-bottom: 0;
}

.co-section > h2,
.co-summary h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}

.co-step {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

/* Option groups (delivery, payment) */
.co-group + .co-group {
  margin-top: 20px;
}

.co-group-title {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #6e6e73;
}

.co-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.co-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  border: 1.5px solid #d2d2d7;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.co-option:hover {
  border-color: #86868b;
}

.co-option:focus-visible {
  outline: 2px solid #1d1d1f;
  outline-offset: 2px;
}

.co-option.checked {
  border-color: #1d1d1f;
  box-shadow: 0 0 0 1px #1d1d1f;
}

.co-radio {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #a1a1a6;
  background: #fff;
  transition: border .15s ease;
}

.co-option.checked .co-radio {
  border: 6px solid #1d1d1f;
}

.co-option-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 20px;
}

.co-option-text strong {
  font-weight: 600;
}

.co-option-price {
  flex: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.co-option-price.free {
  color: #1d1d1f;
}

.co-option .payment-method-logo {
  flex: none;
  max-width: 96px;
  max-height: 24px;
}

.co-options.has-error,
#id_shipping_methods.has-error .co-option,
#id_payment_methods.has-error .co-option {
  border-color: #be505d;
}

.co-helper {
  margin-top: 10px;
}

.co-helper.form-control {
  margin-bottom: 0;
}

.co-hours {
  padding: 12px 16px;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 14px;
  line-height: 22px;
  color: #424245;
}

.co-hours p {
  margin: 0;
}

/* Contact details: two columns, name and company lines full width */
.co-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

.co-fields.hidden {
  display: none;
}

.co-wide {
  grid-column: 1 / -1;
}

.co-fields .form-control {
  margin-bottom: 14px;
}

.co .form-input input,
.co .form-input select {
  background-color: #fff;
  border-color: #d2d2d7;
  border-radius: 10px;
  height: 46px;
}

.co .form-input input:focus {
  border: 2px solid #1d1d1f !important;
}

.co .payment-methods-details {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 14px;
  line-height: 21px;
  color: #424245;
}

.co .payment-methods-details.hidden {
  display: none;
}

.co .alert-danger {
  margin: 8px 0 0;
}

/* Order summary */
.co-summary {
  position: sticky;
  top: 24px;
}

.co-summary-box {
  padding: 24px;
  border-radius: 18px;
  background: #f5f5f7;
}

.co-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.co-items li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e3e3e8;
}

.co-items li:first-child {
  padding-top: 0;
}

.co-item-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.co-item-thumb img {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}

.co-item-text a {
  display: block;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 19px;
  font-weight: 600;
}

.co-item-text a:hover {
  text-decoration: underline;
}

.co-item-text small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 16px;
  color: #6e6e73;
}

.co-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.co-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #fff;
}

.co-qty button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: #1d1d1f;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.co-qty button[disabled],
.co-item-remove[disabled] {
  opacity: .4;
  cursor: progress;
}

.co-qty span {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.co-item-remove {
  padding: 0;
  border: 0;
  background: none;
  color: #6e6e73;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.co-item-remove:hover {
  color: #1d1d1f;
}

.co-items li {
  align-items: start;
}

.co-item-price {
  padding-top: 2px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.co-totals {
  margin: 16px 0 0;
}

.co-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 20px;
  color: #424245;
}

.co-totals > div.hidden {
  display: none;
}

.co-totals dt,
.co-totals dd {
  margin: 0;
  font-weight: 400;
}

.co-totals .co-total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #d2d2d7;
  color: #1d1d1f;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.co-totals .co-total dd {
  font-size: 24px;
  font-weight: 700;
}

.co-vat {
  margin: 2px 0 0;
  text-align: right;
  font-size: 12px;
  line-height: 18px;
  color: #6e6e73;
}

.co .discount-form {
  margin-top: 14px;
  padding: 0;
  background: transparent;
}

.co-coupon-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: #1d1d1f;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.co-coupon-toggle.hidden,
.co .discount-form .form-control.hidden {
  display: none;
}

.co .discount-form .form-control {
  display: flex;
  gap: 8px;
  margin: 0;
}

.co .discount-form .form-input {
  flex: 1;
}

.co .discount-form .form-input input {
  height: 44px;
}

.co-pay {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 15px 20px;
  border: 0;
  border-radius: 12px;
  background: #1d1d1f;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease;
}

.co-pay:hover {
  background: #000;
}

.co-pay[disabled] {
  opacity: .6;
  cursor: progress;
}

.co-missing {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdecee;
  color: #8c1d2a;
  font-size: 14px;
  line-height: 20px;
}

.co-missing.hidden {
  display: none;
}

.co-secure,
.co-terms {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #6e6e73;
}

.co-terms a {
  color: inherit;
}

@media (max-width: 991.98px) {
  .co .container {
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 28px;
  }
}

@media (max-width: 767.98px) {
  .co .container {
    grid-template-columns: 1fr;
    padding: 20px 16px 40px !important;
  }

  .co h1 {
    font-size: 28px;
  }

  .co-section {
    padding: 22px 0;
  }

  .co-fields {
    grid-template-columns: 1fr;
  }

  .co-summary {
    position: static;
  }

  .co-summary-box {
    padding: 20px 16px;
    margin: 0 -16px;
    border-radius: 0;
  }

  .co-option {
    padding: 12px 14px;
  }

  .co-option .payment-method-logo {
    max-width: 72px;
  }
}
