/* CLOTHMAN'S 4.3 — Cart confirmation / View Cart and checkout refinement.
   Loaded after the base WooCommerce styles; compatible with classic and blocks. */

/* Clear, editorial add-to-cart notification with its own prominent action. */
.woocommerce-message,
.woocommerce .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-message {
  position: relative;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  width: 100%;
  min-height: 104px;
  margin: 0 0 30px !important;
  padding: 23px 25px 23px 80px !important;
  border: 1px solid #dededb !important;
  border-inline-start: 3px solid #151515 !important;
  border-radius: 12px !important;
  background: #fafaf9 !important;
  color: #191919 !important;
  box-shadow: 0 8px 32px rgba(17,17,17,.055);
  font-family: var(--cm-body-font, Inter, sans-serif);
  font-size: clamp(13px, 1.1vw, 15px) !important;
  font-weight: 600;
  line-height: 1.6;
  text-align: start;
  box-sizing: border-box;
}
.woocommerce-message::before,
.woocommerce .woocommerce-message::before {
  content: '✓' !important;
  position: absolute !important;
  inset: auto !important;
  top: 50% !important;
  left: 25px !important;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #161616;
  color: #fff !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1 !important;
}
.woocommerce-message .button.wc-forward,
.woocommerce .woocommerce-message a.button.wc-forward,
.woocommerce-notices-wrapper .woocommerce-message .button {
  order: 2;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 17px;
  flex: 0 0 auto;
  float: none !important;
  min-width: 170px;
  min-height: 51px !important;
  margin: 0 !important;
  padding: 14px 19px !important;
  border: 1px solid #171717 !important;
  border-radius: 7px !important;
  background: #171717 !important;
  color: #fff !important;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .095em;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  white-space: normal;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
/* Keep the View Cart button text-only in all language directions. */
.woocommerce-message .button.wc-forward::after,
.woocommerce .woocommerce-message a.button.wc-forward::after,
.woocommerce-notices-wrapper .woocommerce-message .button::after {
  content: none !important;
  display: none !important;
}
.woocommerce-message .button.wc-forward:hover,
.woocommerce .woocommerce-message a.button.wc-forward:hover {
  background: #343434 !important;
  border-color: #343434 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,.15);
}
.woocommerce-message .button.wc-forward:focus-visible,
.woocommerce .woocommerce-message a.button.wc-forward:focus-visible,
.woocommerce form.checkout button:focus-visible,
.wc-block-checkout button:focus-visible { outline: 3px solid #656565 !important; outline-offset: 3px; }

/* Shopping cart and mini-cart actions: clear contrast and comfortable tap targets. */
.woocommerce .cart-collaterals .cart_totals {
  border-radius: 10px;
  background: #fafaf9;
  box-shadow: 0 5px 24px rgba(0,0,0,.035);
}
.woocommerce .cart-collaterals .wc-proceed-to-checkout a.checkout-button,
.woocommerce .woocommerce-cart-form button[name="update_cart"]:not(:disabled) {
  min-height: 52px;
  border-radius: 7px !important;
}
.clothmans-cart-drawer .woocommerce-mini-cart__buttons a {
  border-radius: 6px;
  transition: background .2s ease, transform .2s ease;
}
.clothmans-cart-drawer .woocommerce-mini-cart__buttons a:hover { transform: translateY(-2px); }

/* Classic checkout: tidy fields and a structured order summary. */
.woocommerce form.checkout .form-row { margin-bottom: 20px; }
.woocommerce form.checkout .form-row label {
  display: block;
  margin-bottom: 8px;
  color: #252525;
  letter-spacing: .035em;
  font-size: 12px;
  line-height: 1.5;
}
.woocommerce form.checkout .form-row .input-text,
.woocommerce form.checkout .form-row input[type="tel"],
.woocommerce form.checkout .form-row input[type="email"],
.woocommerce form.checkout .form-row select,
.woocommerce form.checkout .form-row textarea,
.woocommerce form.checkout .select2-container .select2-selection--single {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dcdcdc;
  border-radius: 7px;
  background: #fff;
  color: #151515;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.woocommerce form.checkout .form-row .input-text:focus,
.woocommerce form.checkout .form-row textarea:focus,
.woocommerce form.checkout .form-row select:focus,
.woocommerce form.checkout .select2-container--focus .select2-selection--single {
  outline: none;
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(17,17,17,.09);
}
.woocommerce form.checkout .select2-container .select2-selection--single { height: 52px; }
.woocommerce form.checkout .select2-container .select2-selection__rendered { padding-inline: 12px; line-height: 50px; }
.woocommerce form.checkout .select2-container .select2-selection__arrow { height: 50px; }
.woocommerce form.checkout .woocommerce-checkout-review-order { border-radius: 10px !important; }
.woocommerce form.checkout #place_order { border-radius: 7px !important; min-height: 54px; }

/* WooCommerce Cart/Checkout Blocks (common in newer stores). */
.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart { color: #171717; }
.wp-block-woocommerce-checkout .wc-block-components-sidebar,
.wp-block-woocommerce-cart .wc-block-components-sidebar { box-sizing: border-box; }
.wp-block-woocommerce-checkout .wc-block-components-checkout-step,
.wp-block-woocommerce-checkout .wc-block-components-order-summary,
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper {
  border-color: #e4e4e4;
}
.wp-block-woocommerce-checkout .wc-block-components-text-input input,
.wp-block-woocommerce-checkout .wc-block-components-text-input textarea,
.wp-block-woocommerce-checkout .wc-block-components-combobox-control input,
.wp-block-woocommerce-checkout .wc-block-components-select .wc-block-components-select__select {
  min-height: 52px;
  border-color: #dedede !important;
  border-radius: 7px !important;
  background: #fff !important;
}
.wp-block-woocommerce-checkout .wc-block-components-text-input input:focus,
.wp-block-woocommerce-checkout .wc-block-components-combobox-control input:focus,
.wp-block-woocommerce-checkout .wc-block-components-select .wc-block-components-select__select:focus {
  border-color: #111 !important;
  box-shadow: 0 0 0 2px rgba(17,17,17,.08) !important;
  outline: none;
}
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-button {
  min-height: 54px;
  border-radius: 7px;
  background: #171717;
  color: #fff;
  text-transform: uppercase;
  font-weight: 750;
  letter-spacing: .06em;
  transition: background .2s ease, transform .2s ease;
}
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
.wp-block-woocommerce-cart .wc-block-cart__submit-button:hover {
  background: #323232;
  transform: translateY(-1px);
}

/* Arabic: preserve RTL content while keeping the notification icon in place. */
html[dir="rtl"] .woocommerce-message,
html[dir="rtl"] .woocommerce .woocommerce-message {
  padding: 23px 80px 23px 25px !important;
  text-align: right;
}
html[dir="rtl"] .woocommerce-message::before,
html[dir="rtl"] .woocommerce .woocommerce-message::before {
  left: auto !important;
  right: 25px !important;
}
html[dir="rtl"] .woocommerce form.checkout .form-row label,
html[dir="rtl"] .wp-block-woocommerce-checkout { text-align: right; }
html[dir="rtl"] .woocommerce form.checkout .form-row input,
html[dir="rtl"] .woocommerce form.checkout .form-row textarea,
html[dir="rtl"] .woocommerce form.checkout .form-row select { direction: rtl; text-align: right; }
html[dir="rtl"] .woocommerce form.checkout input[type="email"],
html[dir="rtl"] .woocommerce form.checkout input[type="tel"] { direction: ltr; text-align: left; }


@media (max-width: 680px) {
  .woocommerce-message,
  .woocommerce .woocommerce-message,
  .woocommerce-notices-wrapper .woocommerce-message {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 15px;
    min-height: 124px;
    padding: 23px 17px 18px 64px !important;
    font-size: 13px !important;
    line-height: 1.5;
    margin-bottom: 23px !important;
  }
  .woocommerce-message::before,
  .woocommerce .woocommerce-message::before {
    top: 23px !important;
    left: 17px !important;
    transform: none;
    width: 31px;
    height: 31px;
    font-size: 16px !important;
  }
  .woocommerce-message .button.wc-forward,
  .woocommerce .woocommerce-message a.button.wc-forward,
  .woocommerce-notices-wrapper .woocommerce-message .button {
    width: 100%;
    min-height: 48px !important;
    min-width: 0;
    margin-top: 2px !important;
  }
  html[dir="rtl"] .woocommerce-message,
  html[dir="rtl"] .woocommerce .woocommerce-message { padding: 23px 64px 18px 17px !important; }
  html[dir="rtl"] .woocommerce-message::before,
  html[dir="rtl"] .woocommerce .woocommerce-message::before { left: auto !important; right: 17px !important; }
  .wp-block-woocommerce-checkout,
  .wp-block-woocommerce-cart { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .woocommerce-message .button.wc-forward,
  .clothmans-cart-drawer .woocommerce-mini-cart__buttons a,
  .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button,
  .wp-block-woocommerce-cart .wc-block-cart__submit-button { transition: none !important; transform: none !important; }
}
