/*
Theme Name: Hijz Pay
Description: The checkout look of Hijz Biz (plaster, qahwa and Hijz orange). Only the pages a buyer sees: checkout, payment, thank you.
Version: 1.0.1
Requires PHP: 7.4
Text Domain: hijz-pay
*/

/* The same tokens as the Hijz apps (web/src/styles/tokens.css, light). System fonts: nothing is downloaded. */
:root {
  --bg: #F5F1EE;
  --surface: #FFFFFF;
  --border: #EAE3DD;
  --strong: #C9BFB6;
  --text: #23180F;
  --muted: #75685E;
  --primary: #CE4A13;
  --primary-hover: #9C3410;
  --primary-text: #FFFFFF;
  --tint: #FBEDE5;
  --danger: #B42A22;
  --radius: 12px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--primary); }

/* --- Header and footer --- */
.hzp-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.hzp-bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hzp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.hzp-brand img { height: 25px; width: auto; display: block; }
.hzp-right { display: flex; align-items: center; gap: 18px; }
.hzp-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.hzp-secure svg { width: 16px; height: 16px; }
.hzp-back { font-size: 13px; color: var(--muted); text-decoration: none; }
.hzp-back:hover { color: var(--primary); }
[dir="rtl"] .hzp-back { unicode-bidi: plaintext; }

.hzp-main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 48px; }
.hzp-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 24px; }
.hzp-button, .hijz-return a {
  display: inline-block; background: var(--primary); color: var(--primary-text) !important; text-decoration: none;
  border-radius: 10px; padding: 12px 22px; font-weight: 600;
}
.hzp-button:hover, .hijz-return a:hover { background: var(--primary-hover); }
.hijz-note { margin: 0 0 16px; }

.hzp-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.hzp-footer .hzp-bar { padding-top: 18px; padding-bottom: 24px; flex-wrap: wrap; }
.hzp-footer nav { display: flex; gap: 16px; }
.hzp-footer a { color: var(--muted); text-decoration: none; }
.hzp-footer a:hover { color: var(--primary); }

@media (max-width: 640px) {
  .hzp-back { display: none; }
  .hzp-main { padding: 20px 16px 40px; }
  .hzp-title { font-size: 22px; margin-bottom: 16px; }
  .hzp-bar { padding-left: 16px; padding-right: 16px; }
}

/* --- WooCommerce checkout (blocks) --- */
.wp-block-woocommerce-checkout { max-width: none !important; margin: 0 !important; padding: 0 !important; }
.wc-block-components-sidebar-layout { gap: 0; }

.wc-block-checkout__main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 28px !important;
}
.wp-block-woocommerce-checkout-order-summary-block {
  background: var(--surface);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 699px) {
  .wc-block-checkout__main { padding: 18px 16px 22px !important; }
}

.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-checkout-order-summary__title-text {
  font-family: inherit !important;
  font-weight: 600 !important;
  font-size: 17px !important;
  color: var(--text) !important;
}
.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading-content,
.wc-block-components-product-metadata,
.wc-block-components-order-summary-item__individual-prices { color: var(--muted) !important; }

/* Inputs and selects */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input {
  font-family: inherit !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--strong) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--tint) !important;
  outline: none !important;
}
.wc-block-components-text-input label,
.wc-blocks-components-select__label { color: var(--muted) !important; font-family: inherit !important; }
.wc-block-components-validation-error, .wc-block-components-validation-error p { color: var(--danger) !important; }
.wc-block-components-text-input.has-error input { border-color: var(--danger) !important; }

/* Payment options */
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option { font-family: inherit !important; }
.wc-block-checkout__payment-method .wc-block-components-radio-control--highlight-checked::after,
.wc-block-checkout__payment-method .wc-block-components-radio-control--highlight-checked--first-selected::after {
  border-color: var(--primary) !important;
  border-radius: 10px;
}
.wc-block-components-radio-control__input:checked { border-color: var(--primary) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--primary) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked { background: var(--primary) !important; border-color: var(--primary) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--primary-text) !important; }

/* The pay button: Hijz orange with white text */
.wc-block-components-checkout-place-order-button,
.wc-block-components-button:not(.is-link),
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  font-family: inherit !important;
  background: var(--primary) !important;
  color: var(--primary-text) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  min-height: 48px;
  padding: 0 22px !important;
  box-shadow: none !important;
  transition: background .15s ease;
}
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button:not(.is-link):hover,
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--primary-hover) !important; }
.wc-block-components-checkout-place-order-button:focus-visible,
.wc-block-components-button:not(.is-link):focus-visible { box-shadow: 0 0 0 3px var(--tint) !important; outline: 2px solid var(--primary); }
.wc-block-components-checkout-return-to-cart-button { display: none !important; } /* there is no cart: the invoice is chosen in Hijz Biz */

/* Order summary */
.wc-block-components-order-summary-item__image { display: none !important; }
.wc-block-components-order-summary-item__description { padding-inline-start: 0 !important; }
.wc-block-components-order-summary-item__quantity { display: none !important; }
.wc-block-components-product-name { font-weight: 600; color: var(--text) !important; }
.wc-block-components-totals-item__label, .wc-block-components-totals-item__value { font-family: inherit !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 18px !important; font-weight: 600 !important; }
.wc-block-components-totals-wrapper { border-color: var(--border) !important; }
.wp-block-woocommerce-checkout-order-summary-coupon-form-block { display: none !important; } /* no coupons */

.wc-block-components-notice-banner { border-radius: 10px !important; font-family: inherit !important; }

/* Thank you / order pay (classic templates) */
.woocommerce-order, .woocommerce-MyAccount-content, .woocommerce form.checkout_coupon, .woocommerce-form-login {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.woocommerce table.shop_table { border-radius: 10px; border-color: var(--border); }
.woocommerce .input-text, .woocommerce select {
  font-family: inherit; border: 1px solid var(--strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--text);
}

/* Small clean-ups */
.wc-block-components-checkout-place-order-button { width: 100%; justify-content: center !important; font-size: 16px !important; }
.wc-block-components-checkout-place-order-button .wc-block-components-button__text { width: 100% !important; text-align: center !important; }
.wp-block-woocommerce-checkout-order-note-block { display: none !important; } /* no notes: nothing is shipped */
.wc-block-components-order-summary-item__individual-prices { display: none !important; }
.wc-block-checkout__terms { color: var(--muted); font-size: 13px; }
.wc-block-checkout__terms a { color: var(--text); }
.wc-block-components-checkout-place-order-button__text { justify-content: center !important; }

.wc-block-components-sidebar-layout.is-large .wc-block-checkout__sidebar,
.wc-block-components-sidebar-layout.is-medium .wc-block-checkout__sidebar { padding-inline-start: 24px !important; }

/* Phones: Woo shows the summary twice. Keep only the one above the button. */
.wc-block-components-sidebar-layout.is-small .wc-block-checkout__sidebar,
.wc-block-components-sidebar-layout.is-mobile .wc-block-checkout__sidebar { display: none !important; }
.checkout-order-summary-block-fill-wrapper { background: transparent !important; border: 0 !important; border-radius: 0 !important; overflow: visible !important; }
.checkout-order-summary-block-fill { border-color: var(--border) !important; border-radius: 10px !important; background: var(--surface); }

/* Auto-renew always keeps the card, so the "save payment information" choice is not shown (as on pay.mykteb.com). */
.wc-block-components-payment-methods__save-card-info,
.revolut-payment-method-save { display: none !important; }
