/**
 * Express checkout layout for /checkout-2/
 * Visual only — WooCommerce checkout behaviour is unchanged.
 */

body.woocommerce-checkout.safehome-express-checkout .page-header,
body.woocommerce-checkout.safehome-express-checkout .entry-header,
body.woocommerce-checkout.safehome-express-checkout #right-sidebar,
body.woocommerce-checkout.safehome-express-checkout #left-sidebar,
body.woocommerce-checkout.safehome-express-checkout .oceanwp-woocommerce-checkout-notices {
  display: none !important;
}

body.woocommerce-checkout.safehome-express-checkout #content-wrap,
body.woocommerce-checkout.safehome-express-checkout #content-wrap .container,
body.woocommerce-checkout.safehome-express-checkout .content-area,
body.woocommerce-checkout.safehome-express-checkout #primary,
body.woocommerce-checkout.safehome-express-checkout .entry-content,
body.woocommerce-checkout.safehome-express-checkout .woocommerce {
  width: 100% !important;
  max-width: 1240px !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.woocommerce-checkout.safehome-express-checkout #content-wrap {
  display: block !important;
}

body.woocommerce-checkout.safehome-express-checkout .content-area {
  flex: 1 1 100% !important;
}

.safehome-checkout__form.checkout.woocommerce-checkout {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
}

.safehome-checkout__grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  width: 100% !important;
}

.safehome-checkout__grid > .safehome-checkout__col,
.safehome-checkout__grid > #customer_details,
.safehome-checkout__grid > #order_review {
  flex: 1 1 0% !important;
  width: 33.333% !important;
  max-width: 33.333% !important;
  min-width: 0 !important;
  float: none !important;
  clear: none !important;
  display: block !important;
  box-sizing: border-box !important;
}

.safehome-checkout__col {
  padding: 0 1.35rem;
}

.safehome-checkout__col--billing {
  padding-left: 0 !important;
  border-right: 1px dashed #d9d9d9;
}

.safehome-checkout__col--mid {
  border-right: 1px dashed #d9d9d9;
}

.safehome-checkout__col--review {
  padding-right: 0 !important;
}

body.woocommerce-checkout.safehome-express-checkout #content {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
  background: #ffffff;
}

.safehome-checkout {
  font-family: var(--font-body, "Inter", sans-serif);
  color: #222222;
}

.safehome-checkout__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.35rem;
}

.safehome-checkout__continue {
  display: inline-flex;
  align-items: center;
  background: #8a8a8a;
  color: #ffffff !important;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.55rem 1.4rem 0.55rem 0.9rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.safehome-checkout__continue:hover,
.safehome-checkout__continue:focus {
  background: #6f6f6f;
  color: #ffffff !important;
}

.safehome-checkout__kicker {
  margin: 0;
  flex: 1 1 auto;
  text-align: center;
  color: #b0b0b0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.safehome-checkout__trust {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safehome-checkout__trust li {
  position: relative;
  padding-left: 1.35rem;
  color: #777777;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.safehome-checkout__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 12px;
  height: 12px;
  border: 1.5px solid #999999;
  border-radius: 50%;
  background: #ffffff;
  box-sizing: border-box;
}

.safehome-checkout__trust li.is-complete {
  color: #1b5e20;
}

.safehome-checkout__trust li.is-complete::before {
  border-color: #1b5e20;
  background: #1b5e20;
}

.safehome-checkout__trust li.is-complete::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 6px;
  height: 3px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}

.safehome-checkout__intro {
  margin: 0 0 1.25rem;
  text-align: center;
  color: #888888;
  font-size: 13px;
  font-style: italic;
}

.safehome-checkout-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  color: #111111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.safehome-checkout-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand-primary, #e30613);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.safehome-checkout #customer_details .woocommerce-billing-fields > h3,
.safehome-checkout #customer_details .woocommerce-shipping-fields > h3,
.safehome-checkout #customer_details .woocommerce-additional-fields > h3,
.safehome-checkout #order_review_heading {
  display: none !important;
}

.safehome-checkout #customer_details .col-1,
.safehome-checkout #customer_details .col-2,
.safehome-checkout .col2-set,
.safehome-checkout .col2-set .col-1,
.safehome-checkout .col2-set .col-2 {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.safehome-checkout #customer_details .form-row {
  width: 100% !important;
  float: none !important;
  margin: 0 0 0.85rem !important;
  padding: 0 !important;
}

.safehome-checkout #customer_details .form-row label {
  display: block;
  margin: 0 0 0.28rem;
  color: #222222;
  font-size: 12px;
  font-weight: 600;
}

.safehome-checkout #customer_details .form-row .input-text,
.safehome-checkout #customer_details .form-row select,
.safehome-checkout #customer_details .form-row textarea,
.safehome-checkout #customer_details .select2-container .select2-selection--single {
  width: 100% !important;
  min-height: 40px;
  padding: 0.45rem 0.7rem !important;
  border: 1px solid #d8d8d8 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

.safehome-checkout #customer_details .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
}

.safehome-checkout #ship-to-different-address {
  margin: 0.4rem 0 0.8rem;
  font-size: 13px;
}

.safehome-checkout-shipping {
  margin: 0 0 1.75rem;
}

.safehome-shipping-methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.safehome-shipping-methods li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.safehome-shipping-methods li:last-child {
  border-bottom: 0;
}

.safehome-shipping-methods label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #333333;
  cursor: pointer;
}

.safehome-shipping-methods__cost {
  margin-left: auto;
  color: #111111;
  font-weight: 700;
  white-space: nowrap;
}

.safehome-checkout-shipping__note {
  margin: 0.35rem 0 0;
  color: var(--brand-primary, #e30613);
  font-size: 12px;
  font-weight: 500;
}

.safehome-checkout #payment {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.safehome-checkout #payment ul.payment_methods {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.safehome-checkout #payment ul.payment_methods > li {
  margin: 0 !important;
  padding: 0.55rem 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
  background: transparent !important;
  list-style: none !important;
}

.safehome-checkout #payment ul.payment_methods > li > label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 !important;
  padding-left: 0.15rem;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  color: #222222 !important;
}

.safehome-checkout #payment ul.payment_methods > li > input.input-radio {
  margin-right: 0.45rem;
}

.safehome-checkout #payment .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_cod .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_safehome_lmb .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_mtn_momo .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_safehome_card .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_pesapal .payment_box {
  display: none !important;
  padding: 0.55rem 0 0.2rem 1.55rem !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.safehome-checkout #payment ul.payment_methods > li > input[type="radio"]:checked ~ .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_cod > input:checked ~ .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_safehome_lmb > input:checked ~ .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_mtn_momo > input:checked ~ .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_safehome_card > input:checked ~ .payment_box,
.safehome-checkout #payment .payment_methods li.payment_method_pesapal > input:checked ~ .payment_box {
  display: block !important;
}

.safehome-checkout .safehome-checkout-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.35rem 0 0.85rem;
}

.safehome-checkout .safehome-checkout-item__thumb img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #eeeeee;
  border-radius: 2px;
}

.safehome-checkout .safehome-checkout-item__name {
  display: block;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.safehome-checkout .safehome-checkout-item__qty,
.safehome-checkout .safehome-checkout-item__meta .variation {
  display: block;
  color: #777777;
  font-size: 12px;
}

.safehome-checkout .safehome-checkout-item__price {
  color: #111111;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.safehome-checkout .safehome-checkout-review-table {
  width: 100%;
  margin: 0 0 0.85rem;
  border: 0 !important;
}

.safehome-checkout .safehome-checkout-review-table td,
.safehome-checkout .safehome-checkout-review-table th {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.safehome-checkout .safehome-checkout-totals {
  display: block;
  background: #f3f3f3;
  padding: 0.85rem 1rem;
}

.safehome-checkout .safehome-checkout-totals tr {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.safehome-checkout .safehome-checkout-totals th,
.safehome-checkout .safehome-checkout-totals td {
  width: auto !important;
  text-align: left !important;
  font-size: 13px;
  font-weight: 500;
  color: #333333;
}

.safehome-checkout .safehome-checkout-totals td {
  text-align: right !important;
}

.safehome-checkout .safehome-checkout-totals td .woocommerce-Price-amount,
.safehome-checkout .safehome-checkout-totals .fee td,
.safehome-checkout .safehome-checkout-totals .tax-total td,
.safehome-checkout .safehome-checkout-totals .order-total td .woocommerce-Price-amount {
  color: #1b5e20;
  font-weight: 700;
}

.safehome-checkout .safehome-checkout-totals .order-total th,
.safehome-checkout .safehome-checkout-totals .order-total td {
  font-size: 14px;
  font-weight: 800;
  color: #111111;
}

.safehome-checkout-place {
  margin-top: 1rem;
}

.safehome-checkout-place__label {
  margin: 0 0 0.45rem;
  color: #555555;
  font-size: 13px;
}

.safehome-checkout .woocommerce-privacy-policy-text,
.safehome-checkout .woocommerce-terms-and-conditions-wrapper {
  margin: 0 0 0.75rem;
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 991px) {
  .safehome-checkout__grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  .safehome-checkout__top {
    flex-wrap: wrap;
  }

  .safehome-checkout__kicker {
    width: 100%;
    order: -1;
    font-size: 20px;
  }

  .safehome-checkout__col,
  .safehome-checkout__col--billing,
  .safehome-checkout__col--mid,
  .safehome-checkout__col--review {
    width: 100% !important;
    padding: 0 0 1.5rem !important;
    border-right: 0 !important;
    border-bottom: 1px dashed #d9d9d9;
  }

  .safehome-checkout__col--review {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

@media (max-width: 767px) {
  .safehome-checkout__trust {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 0.4rem;
  }

  .safehome-checkout__continue {
    font-size: 10px;
  }

  /*
   * Payment methods (phone only): OceanWP paints the radio via label:before.
   * space-between then pushes the title to the far right when there are no icons.
   */
  .safehome-checkout #payment ul.payment_methods > li > label {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .safehome-checkout #payment ul.payment_methods > li > label .safehome-pesapal-icons,
  .safehome-checkout #payment ul.payment_methods > li > label .safehome-lmb-icons {
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Pesapal order-pay: keep payment iframe visible (plugin can set opacity:0). */
body.woocommerce-order-pay #pesapal-iframe,
body.woocommerce-order-pay iframe.pesapal_loading_frame {
  opacity: 1 !important;
  min-height: 900px;
  width: 100%;
  border: 0;
}

body.woocommerce-order-pay #pesapal-iframe-loader-msg {
  display: none !important;
}

/* Pesapal plugin dumps "TOKEN: …" when the access token request fails. */
body.woocommerce-order-pay .alert-danger {
  display: none !important;
}

body.woocommerce-order-pay .pesapal_container,
body.woocommerce-order-pay .pesapal_loading_preloader {
  display: none !important;
}
