/**
 * WPH Checkout — Minimal structure styles.
 *
 * Just enough to visually separate sections.
 * Full styling comes in later phases.
 *
 * @package WPH_Checkout
 */

:root {
  --wph-ch-border: 1px solid #dedede;
}

.theme-wphome form.woocommerce-checkout {
  gap: 0px;
}

:root .theme-wphome textarea {
  min-height: 120px;
}

.theme-wphome label[for='order_comments'] {
  font-size: 18px;
  font-weight: 500;
}

.wph-collapsible-wrap {
  clear: both;
}

.theme-wphome .iti--allow-dropdown {
  width: 100%;
  max-width: 100%;
}

.theme-wphome button.iti__selected-country {
  border-radius: 8px 0px 0px 8px !important;
  padding: 0 5px 0 2px;
  font-size: 14px;
  gap: 0;
  background-color: transparent;
}

.theme-wphome .iti .iti__selected-dial-code {
  margin-left: 0px;
  padding: 4px 9px 4px 0px;
  border-right: var(--wph-ch-border);
  width: 45px;
}

.theme-wphome .iti--allow-dropdown input[type='tel'] {
  padding-left: 100px !important;
}

.woocommerce-invalid input[type='checkbox'] {
  border-color: #ca1919;
  box-shadow: 1px 1px #ca1919;
}

.theme-wphome .wph-checkout-layout form .woocommerce-invalid .select2-container--default .select2-selection,
.theme-wphome .wph-checkout-layout form .woocommerce-invalid input:not([type='radio'], [type='checkbox']) {
  border-color: #ca1919;
  box-shadow: 0px 0px 0 0.5px #ca1919;
}

form .wph-field-error {
  font-size: 12px;
  color: #ca1919;
  padding-left: 5px;
  display: none;
}
form .woocommerce-invalid .wph-field-error {
  display: block;
}

.theme-wphome .wd-checkout-prod-title > :is(.cart-product-label-link, .cart-product-label) {
  font-size: 13px;
  font-weight: 500;
}

.wph-order-review__content .shop_table tbody {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: 30vh;
  max-height: 30dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.wph-order-review__content .shop_table tbody::-webkit-scrollbar {
  width: 6px;
}

.wph-order-review__content .shop_table tbody::-webkit-scrollbar-track {
  background: transparent;
}

.wph-order-review__content .shop_table tbody::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 8px;
}

.wph-order-review__content .shop_table tbody::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* ── Hidden elements ── */
.theme-wphome .woocommerce > .woocommerce-notices-wrapper,
.wph-order-review__content #order_review_heading,
.woocommerce-checkout-review-order-table thead {
  display: none !important;
}

/* ── Reset lists ── */
.wph-checkout-layout :is(ul, ol) {
  list-style: none;
  padding-left: 0;
}

/* ── Header ── */
.wph-checkout-header {
  display: flex;
  justify-content: center;
  border-bottom: var(--wph-ch-border);
}

.theme-wphome input::placeholder {
  font-size: 13px;
}
.theme-wphome input::-webkit-input-placeholder {
  font-size: 13px;
}
.theme-wphome input::-moz-placeholder {
  font-size: 13px;
}
.theme-wphome input:-ms-input-placeholder {
  font-size: 13px;
}

.wph-checkout-header__inner {
  display: flex;
  justify-content: space-between;
  width: 1060px;
  max-width: 100%;
  padding: 20px 15px;
}

.wph-checkout-header .site-logo img {
  max-width: 140px;
}

.wph-checkout-header .wd-tools-icon.wd-icon-alt::before {
  content: '\f126';
  font-family: 'woodmart-font';
  font-size: 20px;
}

/* ── Order review toggle ── */
.wph-order-review {
  background-color: #f5f7fa;
}
.wph-order-review .wph-order-review__inner {
  display: flex;
  flex-direction: column;
}

.theme-wphome .wph-order-review .wph-order-toggle:is(:hover, :active),
.theme-wphome .wph-order-review .wph-order-toggle {
  display: flex;
  flex: 1 1 100%;
  justify-content: space-between;
  min-height: 60px;
  border-bottom: var(--wph-ch-border);
  border-radius: 0 !important;
  color: #0082a6;
  background-color: #f5f5f5;
  font-size: 15px;
  font-weight: normal;
  text-transform: capitalize;
  box-shadow: none;
}

.wph-order-toggle .amount {
  color: #000;
  font-size: 18px;
  font-weight: 600;
}

/* ── Main layout ── */
.wph-order-review__content,
.wph-checkout-main__inner {
  padding: 20px;
}

.wph-checkout-layout h2.wph-section__title {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.wph-checkout-layout p {
  margin-bottom: 14px;
}

.woocommerce-shipping-fields,
.wph-checkout-layout .wph-section {
  padding-bottom: 28px;
}

.wph-checkout-layout input[type='checkbox'] {
  border: 1px solid #3366cc;
}
.wph-checkout-layout .woocommerce-invalid input[type='checkbox'] {
  box-shadow: rgb(202, 25, 25) 1px 1px;
  border-color: rgb(202, 25, 25);
}

.wph-checkout-layout input[type='checkbox']:checked {
  background-color: #3366cc;
  border-color: #3366cc;
}

.wph-checkout-layout #place_order {
  font-size: 16px;
  text-transform: capitalize;
  padding: 16px;
  background-color: #3366cc;
  color: #f0f3f8;
  width: 100%;
  transition: all 0.4s ease-in-out 0s;
}

.wph-checkout-layout #place_order:hover {
  background-color: #2c59b3;
  color: #f0f3f8;
}

/* ── Form inputs ── */
.theme-wphome .wph-checkout-layout .select2-container--default .select2-selection,
.theme-wphome .wph-checkout-layout form input:not([type='radio'], [type='checkbox']) {
  border: var(--wph-ch-border);
  border-radius: 8px;
  background-color: #fff;
}

/* ── Shared card list: payments, shipping methods, shipping toggle ── */
.theme-wphome .wc_payment_methods,
.wph-shipping-methods-list,
.wph-shipping-toggle {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.theme-wphome .wph-shipping-notice {
  display: flex;
  justify-content: center;
  padding: 20px 15px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.theme-wphome .wc_payment_methods .wc_payment_method,
.wph-shipping-method,
.wph-shipping-toggle__option {
  margin: 0;
  padding: 14px;
  border: var(--wph-ch-border);
  border-radius: 0;
  position: relative;
  cursor: pointer;
}

.theme-wphome .wc_payment_methods .wc_payment_method,
.wph-shipping-method label,
.wph-shipping-toggle__option label {
  cursor: pointer;
}

/* Remove double borders between siblings */
.theme-wphome .wc_payment_methods .wc_payment_method + .wc_payment_method,
.wph-shipping-method + .wph-shipping-method,
.wph-shipping-toggle__option + .wph-shipping-toggle__option {
  border-top: 0;
}

/* First item */
.theme-wphome .wc_payment_methods .wc_payment_method:first-child,
.wph-shipping-method:first-child,
.wph-shipping-toggle__option:first-child {
  border-radius: 8px 8px 0 0;
}

/* Last item */
.theme-wphome .wc_payment_methods .wc_payment_method:last-child,
.wph-shipping-method:last-child,
.wph-shipping-toggle__option:last-child:not(.wph-shipping-toggle__option--active) {
  border-radius: 0 0 8px 8px;
}

/* Single item */
.theme-wphome .wc_payment_methods .wc_payment_method:only-child,
.wph-shipping-method:only-child,
.wph-shipping-toggle__option:only-child {
  border-radius: 8px;
}

/* ── Active state ── */
.theme-wphome .wc_payment_methods .wc_payment_method.wph-payment-method--active,
.wph-shipping-method.wph-shipping-method--active,
.wph-shipping-toggle__option.wph-shipping-toggle__option--active {
  border: 1px solid #000;
  background-color: #f6f6fa;
}

/* ── Click area: label covers entire li ── */
.theme-wphome .wc_payment_methods .wc_payment_method > label::before {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.theme-wphome .payment_methods .payment_box {
  position: relative;
  z-index: 1;
}

/* ── Shipping method ── */
.wph-shipping-method .wph-shipping-method__label {
  display: flex;
  align-items: center;
  margin: 0px;
}

.wph-shipping-method .wph-shipping-method__label input.shipping_method {
  position: absolute;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

.wph-shipping-method__label .wph-shipping-method__name {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  font-size: 15px;
  color: #000;
}

.wph-shipping-method__label .wph-shipping-method__name .wph-shipping-description {
  font-size: 12px;
  line-height: 1;
  color: #707070;
}

.wph-shipping-price {
  padding-left: 10px;
  color: #000;
  font-weight: 600;
}

.wph-shipping-price .amount {
  color: #000;
  font-size: 16px;
}

/* ── Shipping toggle ── */
.wph-shipping-toggle__option label {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Shipping address ── */
.woocommerce-shipping-fields .shipping_address {
  margin: 0;
  padding: 15px;
  background-color: #f4f4f4;
  border-radius: 0 0 8px 8px;
}

.woocommerce-shipping-fields__field-wrapper > p:last-child {
  margin-bottom: 0;
}

/* ── Terms ── */
.theme-wphome .woocommerce-terms-and-conditions-wrapper {
  border: none;
  padding: 0px;
}

.theme-wphome .wph-order-review .wd-checkout-prod-img img {
  min-width: 75px;
  max-width: 75px;
}

.wph-coupon-form-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  text-align: start;
  gap: 8px;
}

.wph-coupon-input-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  position: relative;
}

.wph-coupon-input-group input#wph-coupon-code {
  border: var(--wph-ch-border);
  background-color: #fff;
  border-radius: 8px;
}

.theme-wphome .wph-coupon-input-group button.wph-coupon-button {
  border: var(--wph-ch-border);
  background-color: #f0f3f8;
  border-radius: 8px !important;
  text-transform: capitalize;
  font-size: 15px;
  font-weight: 700;
  padding: 5px 15px;
}

.theme-wphome .wph-coupon-input-group.wph-active button.wph-coupon-button {
  background-color: #3366cc;
  color: #f0f3f8;
}

.wph-coupon-message {
  font-size: 12px;
  padding: 0 5px;
}

.wph-coupon-message.wph-coupon-error {
  color: #d91c1c;
}
.wph-order-review__content {
  display: none;
}
.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
  margin-top: 10px;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr.order-total {
  font-size: 15px;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr.order-total th {
  font-size: 17px;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr:not(.order-total) th {
  font-size: 13px;
  font-weight: normal;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr :is(th, td) {
  padding-top: 10px;
  padding-bottom: 10px;
  position: relative;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr:not(:first-child):not(:last-child) :is(th, td) {
  padding-top: 3px;
  padding-bottom: 3px;
  position: relative;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot tr:not(:first-child) {
  border-bottom: 0px;
}

.wph-order-review__content .woocommerce-checkout-review-order-table tfoot td .amount {
  color: #000;
}

.theme-wphome .shop_table:not(.order_details) tr[class*='coupon'] td {
  display: flex;
  gap: 5px;
  direction: ltr;
  justify-content: flex-end;
  align-items: center;
}

/* ── Footer ── */
.wph-checkout-footer {
  display: flex;
  justify-content: center;
  border-top: var(--wph-ch-border);
  padding: 20px 15px;
  background-color: #fff;
}
.wph-checkout-footer__inner {
  width: 1060px;
  max-width: 100%;
}
.wph-checkout-footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wph-checkout-footer-menu li a {
  font-size: 13px;
  color: #555;
  text-decoration: none;
}
.wph-checkout-footer-menu li a:hover {
  color: #000;
}

.wph-checkout-main .wph-mobile-summary {
  margin-top: 30px;
}

.wph-checkout-main .wph-mobile-summary[data-expanded='false'] {
  margin-bottom: 20px;
}

.wph-checkout-main .wph-mobile-summary .wph-mobile-summary__toggle {
  display: flex;
  text-transform: capitalize;
  width: 100%;
  padding: 0;
  background-color: transparent;
  color: #000;
  border-radius: 0px !important;
}

.wph-checkout-main .wph-mobile-summary .wph-mobile-summary__toggle:hover {
  background-color: transparent;
}

.wph-checkout-main .wph-mobile-summary__info {
  display: flex;
  flex: 1 1 auto;
  text-align: left;
  padding: 0px 5px;
}

.wph-mobile-summary__toggle .wph-mobile-summary__thumb {
  display: flex;
  position: relative;
  z-index: 1;
}

.wph-mobile-summary__toggle:not([data-count='1']) .wph-mobile-summary__thumb {
  margin-right: 6px;
}

.wph-mobile-summary__toggle:not([data-count='1']) .wph-mobile-summary__thumb::after {
  content: '';
  position: absolute;
  top: 0px;
  right: -7px;
  width: 95%;
  height: 95%;
  background: #d0d0d0;
  border-radius: 8px;
  z-index: -1;
  transform: rotate(8deg);
  border: 1px solid #fff;
  box-shadow: 0px 0px 0px 1px #d0d0d0;
}

.wph-checkout-main .wph-mobile-summary__toggle .wph-mobile-summary__thumbs img {
  border-radius: 8px;
  width: 40px;
}

.wph-checkout-main .wph-mobile-summary__toggle .wph-mobile-summary__label-expanded {
  font-size: 22px;
}

.wph-checkout-main .wph-mobile-summary__toggle[aria-expanded='true'] :is(.wph-mobile-summary__thumbs, .wph-mobile-summary__label, .wph-mobile-summary__total),
.wph-checkout-main .wph-mobile-summary__toggle .wph-mobile-summary__label-expanded {
  display: none;
}

.wph-checkout-main .wph-mobile-summary__toggle .wph-mobile-summary__label,
.wph-checkout-main .wph-mobile-summary__toggle[aria-expanded='true'] .wph-mobile-summary__label-expanded {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.wph-mobile-summary__label .wph-mobile-summary__label-title {
  font-size: 19px;
}

.wph-mobile-summary__label .wph-mobile-summary__label-count {
  font-size: 13px;
  font-weight: normal;
}

.wph-mobile-summary__info .wph-mobile-summary__total {
  display: flex;
  align-items: center;
}

.wph-mobile-summary__info .wph-mobile-summary__total .amount {
  color: #000;
  font-size: 16px;
}
.wph-mobile-summary[data-expanded='true'] button.wph-mobile-summary__discount-btn {
  display: none;
}

.wph-mobile-summary[data-expanded='true'] svg.wph-mobile-summary__icon {
  transform: rotate(180deg);
}

.wph-mobile-summary button.wph-mobile-summary__discount-btn {
  font-size: 12px;
  padding: 11px;
  height: auto;
  min-height: auto;
  line-height: 1;
  color: #000;
  background-color: #fff;
  border: var(--wph-ch-border);
  text-transform: capitalize;
  margin-bottom: 15px;
}

.wph-mobile-summary button.wph-mobile-summary__discount-btn::before {
  content: '\e868';
  font-family: 'fontello';
}

.wph-mobile-summary .wph-mobile-summary__items .product-thumbnail {
  padding: 10px 0px;
}

.wph-mobile-summary .wph-mobile-summary__items .product-thumbnail .wph-checkout-prod-img {
  position: relative;
}

.wph-mobile-summary .wph-mobile-summary__items .wph-checkout-prod-img img {
  min-width: 70px;
  max-width: 70px;
}

.wph-mobile-summary table.wph-mobile-summary__totals,
.wph-mobile-summary table.wph-mobile-summary__items {
  margin-bottom: 15px;
}

.wph-mobile-summary .wph-coupon-form-wrapper {
  margin-bottom: 15px;
}

.wph-mobile-summary .wph-mobile-summary__totals :is(th, td) {
  font-size: 15px;
  border: none;
  color: #000;
  font-weight: 500;
  padding: 5px;
}

.wph-mobile-summary .wph-mobile-summary__totals :is(th, td) .amount {
  color: #000;
}

.wph-mobile-summary .wph-mobile-summary__totals td {
  text-align: end;
}

.wph-mobile-summary .wph-mobile-summary__totals .order-total :is(th) {
  font-size: 20px;
  font-weight: 600;
}

.wph-checkout-main .woocommerce-terms-and-conditions {
  background-color: #f6f6fa;
}

.wph-checkout-main .woocommerce-terms-and-conditions .wd-custom-width {
  width: 100%;
}

@media (min-width: 769px) {
  .wph-checkout-header__inner,
  .wph-checkout-footer__inner {
    padding: 30px 40px;
  }

  .wph-order-review__content,
  .wph-checkout-main__inner {
    padding: 40px;
  }
}

@media (max-width: 1024.999px) {
  .wph-checkout-layout #place_order.wph-fixed-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 999;
    border-radius: 0;
    transition: all 0s ease-in-out 0s;
  }
}

@media (min-width: 1025px) {
  .wph-checkout-header__inner {
    padding: 40px;
  }

  .wph-checkout-layout {
    display: flex;
    flex: 1 1 100%;
    justify-content: center;
    background: #ffffff;
    background: -webkit-linear-gradient(left, #ffffff 60%, #f5f7fa 60%);
    background: linear-gradient(to right, #ffffff 60%, #f5f7fa 60%);
  }

  .wph-checkout-layout__inner {
    display: flex;
    flex-direction: row-reverse;
    width: 1060px;
    max-width: 100%;
  }

  .wph-checkout-layout .wph-order-review {
    display: flex;
    flex: 1 1 45%;
  }

  .wph-checkout-layout .wph-checkout-main {
    display: flex;
    flex: 1 1 55%;
    border-right: var(--wph-ch-border);
  }

  .wph-checkout-main .wph-mobile-summary,
  .theme-wphome .wph-order-review .wph-order-toggle:is(:hover, :active),
  .theme-wphome .wph-order-review .wph-order-toggle {
    display: none;
    pointer-events: none;
  }
  .theme-wphome .wph-order-review .wph-order-review__content {
    display: flex !important;
    position: sticky;
    top: 10px;
  }

  .wph-checkout-layout h2.wph-section__title {
    font-size: 22px;
  }

  .wph-checkout-layout .place-order {
    margin-top: 25px;
  }
}
