/* SA Checkout Elementor Widget — assets/css/checkout.css v1.0.0 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=DM+Serif+Display&display=swap');

/* ── RESET SCOPE ── */
.sa-cw-wrap, .sa-cw-wrap * { box-sizing: border-box; }
.sa-cw-wrap {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #111;
  background: #f4f4f2;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ── TOPBAR ── */
.sa-cw-topbar {
  background: #fff;
  border-bottom: 1px solid #e0e0dc;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sa-cw-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.sa-cw-logo-img { display: block; width: 160px; height: 40px; object-fit: contain; }
.sa-cw-logo-text { font-family: 'DM Serif Display', serif; font-size: 22px; letter-spacing: .06em; color: #111; line-height: 1; }
.sa-cw-bag-icon { width: 24px; height: 24px; color: #111; cursor: pointer; flex-shrink: 0; }

/* ── LOGIN PROMPT ── */
.sa-cw-login-prompt {
  background: #fff;
  border-bottom: 1px solid #e0e0dc;
  padding: 10px 24px;
  font-size: 13px;
  color: #6b6b68;
  text-align: center;
}
.sa-cw-login-prompt a { color: #111; text-decoration: underline; margin-left: 4px; }

/* ── GRID ── */
.sa-cw-grid {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ── SECTIONS ── */
.sa-cw-section { margin-bottom: 28px; }
.sa-cw-section-title { font-size: 18px; font-weight: 600; color: #111; margin: 0 0 16px; padding: 0; line-height: 1.3; }

/* ── FIELDS: override WooCommerce defaults within our wrapper ── */
.sa-cw-wrap .woocommerce-billing-fields,
.sa-cw-wrap .woocommerce-shipping-fields { }

.sa-cw-wrap .form-row { margin: 0 0 8px !important; padding: 0 !important; float: none !important; width: 100% !important; }
.sa-cw-wrap .form-row-first,
.sa-cw-wrap .form-row-last {
  display: inline-block;
  width: calc(50% - 4px) !important;
  vertical-align: top;
}
.sa-cw-wrap .form-row-first { margin-right: 8px !important; }

.sa-cw-wrap label { font-size: 13px; color: #6b6b68; display: block; margin-bottom: 4px !important; font-weight: 400 !important; }
.sa-cw-wrap label .required { color: #e24b4a; margin-left: 2px; }
.sa-cw-wrap label .optional { font-size: 11px; color: #999; margin-left: 4px; }

.sa-cw-input,
.sa-cw-wrap input.input-text,
.sa-cw-wrap select,
.sa-cw-wrap textarea.input-text {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e0e0dc !important;
  border-radius: 6px;
  background: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  color: #111 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.sa-cw-wrap textarea.input-text { height: auto !important; padding: 10px 12px !important; resize: vertical; }
.sa-cw-textarea { height: auto !important; padding: 10px 12px !important; resize: vertical; }
.sa-cw-wrap input.input-text::placeholder,
.sa-cw-input::placeholder { color: #b0b0aa; }
.sa-cw-wrap input.input-text:focus,
.sa-cw-input:focus,
.sa-cw-wrap select:focus { border-color: #111 !important; }

/* Select arrow */
.sa-cw-field.sa-cw-select-wrap,
.sa-cw-wrap .select2-container { width: 100% !important; }
.sa-cw-wrap select { padding-right: 32px !important; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b68' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 10px !important; }

/* Select2 override */
.sa-cw-wrap .select2-container--default .select2-selection--single {
  height: 44px !important;
  border: 1px solid #e0e0dc !important;
  border-radius: 6px !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
}
.sa-cw-wrap .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px !important; color: #111 !important; padding: 0 12px !important; }
.sa-cw-wrap .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px !important; }

/* ── CHECKBOXES ── */
.sa-cw-checkbox-row, .sa-cw-wrap .woocommerce-form__label-for-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b6b68;
  cursor: pointer;
  margin: 6px 0 0 !important;
  user-select: none;
}
.sa-cw-checkbox-row input[type="checkbox"],
.sa-cw-wrap input[type="checkbox"] {
  width: 15px !important;
  height: 15px !important;
  accent-color: #111;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0 !important;
}

/* ── METHOD CARDS ── */
.sa-cw-method-card {
  border: 1px solid #e0e0dc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s;
  background: #fff;
}
.sa-cw-method-card.sa-cw-selected { border-color: #111; border-width: 1.5px; }
.sa-cw-radio-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.sa-cw-radio-row input[type="radio"] { margin-top: 2px; accent-color: #111; flex-shrink: 0; cursor: pointer; }
.sa-cw-method-body { flex: 1; min-width: 0; }
.sa-cw-method-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sa-cw-method-name, .sa-cw-method-price { font-weight: 500; font-size: 14px; }
.sa-cw-no-shipping { font-size: 13px; color: #6b6b68; padding: 12px 0; }

/* ── PAYMENT SECTION (WooCommerce gateway styles override) ── */
.sa-cw-payment-wrap { }
.sa-cw-wrap #payment { background: transparent !important; border-radius: 0 !important; }
.sa-cw-wrap #payment ul.payment_methods { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.sa-cw-wrap #payment ul.payment_methods li.wc_payment_method {
  border: 1px solid #e0e0dc;
  border-radius: 8px;
  padding: 14px 16px !important;
  margin-bottom: 8px !important;
  background: #fff;
  transition: border-color .15s;
}
.sa-cw-wrap #payment ul.payment_methods li.wc_payment_method.sa-gateway-selected { border-color: #111; border-width: 1.5px; }
.sa-cw-wrap #payment ul.payment_methods li label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #111 !important;
  cursor: pointer;
  margin: 0 !important;
}
.sa-cw-wrap #payment ul.payment_methods li input[type="radio"] { accent-color: #111; flex-shrink: 0; }
.sa-cw-wrap #payment ul.payment_methods li img { max-height: 24px !important; width: auto !important; margin-left: auto !important; }
.sa-cw-wrap #payment .payment_box {
  background: transparent !important;
  padding: 12px 0 0 26px !important;
  margin: 0 !important;
  border: none !important;
}
.sa-cw-wrap #payment .payment_box::before { display: none !important; }
.sa-cw-wrap #payment .place-order { padding: 0 !important; background: transparent !important; margin: 0 !important; }
.sa-cw-wrap #place_order {
  display: block !important;
  width: 100% !important;
  height: 50px !important;
  background: #111 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  cursor: pointer !important;
  margin-top: 16px !important;
  transition: background-color .15s, opacity .15s !important;
}
.sa-cw-wrap #place_order:hover { opacity: .88 !important; }
.sa-cw-secure-note { font-size: 12px; color: #6b6b68; margin: 0 0 12px; }

/* Terms checkbox */
.sa-cw-wrap .woocommerce-terms-and-conditions-wrapper { font-size: 12px; color: #6b6b68; margin: 12px 0 0; }
.sa-cw-wrap .woocommerce-privacy-policy-text { font-size: 12px; color: #6b6b68; margin: 8px 0 0; }

/* ── LEGAL ── */
.sa-cw-legal { font-size: 11.5px; color: #6b6b68; line-height: 1.65; margin: 16px 0; }
.sa-cw-legal a { color: #6b6b68; text-decoration: underline; }

/* ── PAY BUTTON ── */
.sa-cw-pay-btn {
  display: block; width: 100%; height: 50px;
  background: #111; color: #fff;
  border: none; border-radius: 4px;
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .15s, opacity .15s, transform .1s;
}
.sa-cw-pay-btn:hover { opacity: .88; }
.sa-cw-pay-btn:active { transform: scale(.99); }

/* ── FOOTER LINKS ── */
.sa-cw-footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: 12px; }
.sa-cw-footer-links a { color: #6b6b68; text-decoration: underline; transition: color .15s; }
.sa-cw-footer-links a:hover { color: #111; }

/* ── ORDER PANEL ── */
.sa-cw-order-panel {
  background: #fff;
  border: 1px solid #e0e0dc;
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 24px;
}
.sa-cw-order-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sa-cw-thumb-wrap { position: relative; flex-shrink: 0; }
.sa-cw-thumb {
  width: 64px; height: 64px;
  background: #e8e8e4;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sa-cw-thumb img, .sa-cw-thumb .wp-post-image { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border: none !important; border-radius: 0 !important; }
.sa-cw-qty-badge {
  position: absolute; top: -5px; right: -5px;
  background: #111; color: #fff;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.sa-cw-item-info { flex: 1; min-width: 0; }
.sa-cw-item-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.sa-cw-item-variant { font-size: 12px; color: #6b6b68; }
.sa-cw-item-price { font-size: 13px; font-weight: 500; white-space: nowrap; }

/* Coupon */
.sa-cw-discount-row { display: flex; gap: 8px; margin-bottom: 8px; }
.sa-cw-discount-row .sa-cw-input { flex: 1; }
.sa-cw-apply-btn {
  flex-shrink: 0;
  background: #fff; border: 1px solid #e0e0dc; border-radius: 6px;
  padding: 0 14px; height: 44px;
  font-family: inherit; font-size: 13px; color: #111;
  cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.sa-cw-apply-btn:hover { background: #f4f4f2; }
.sa-cw-coupon-msg { font-size: 12px; padding: 6px 0; margin-bottom: 8px; }
.sa-cw-coupon-msg.success { color: #3b8c00; }
.sa-cw-coupon-msg.error   { color: #e24b4a; }
.sa-cw-applied-coupons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sa-cw-coupon-tag {
  display: flex; align-items: center; gap: 6px;
  background: #f0f0ec; border: 1px solid #e0e0dc;
  border-radius: 4px; padding: 3px 8px;
  font-size: 12px; color: #555;
}
.sa-cw-coupon-tag button { background: none; border: none; color: #999; cursor: pointer; font-size: 11px; padding: 0; }
.sa-cw-coupon-tag button:hover { color: #e24b4a; }

/* Totals */
.sa-cw-totals { border-top: 1px solid #e0e0dc; padding-top: 12px; }
.sa-cw-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 7px; }
.sa-cw-total-label { color: #6b6b68; }
.sa-cw-grand-total { margin-top: 8px; padding-top: 10px; border-top: 1px solid #e0e0dc; font-weight: 600; font-size: 16px; margin-bottom: 0; }
.sa-cw-currency { font-size: 13px; color: #6b6b68; font-weight: 400; }
.sa-cw-total-val { font-weight: 600; }

/* ── EMPTY CART ── */
.sa-cw-empty-cart { text-align: center; padding: 60px 24px; }
.sa-cw-empty-icon { font-size: 48px; margin-bottom: 16px; }
.sa-cw-empty-msg { font-size: 16px; color: #6b6b68; margin-bottom: 24px; }
.sa-cw-empty-btn {
  display: inline-block; padding: 12px 28px;
  background: #111; color: #fff; border-radius: 4px;
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: opacity .15s;
}
.sa-cw-empty-btn:hover { opacity: .85; color: #fff; }

/* ── EDITOR PREVIEW ── */
.sa-cw-editor-notice {
  background: #fff; border: 2px dashed #e0e0dc; border-radius: 8px;
  padding: 32px 24px; text-align: center; color: #6b6b68;
}
.sa-cw-editor-notice-icon  { font-size: 36px; margin-bottom: 12px; }
.sa-cw-editor-notice-title { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 8px; }
.sa-cw-editor-notice-text  { font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.sa-cw-editor-notice-meta  { font-size: 12px; color: #aaa; }

/* ── WC NOTICES inside widget ── */
.sa-cw-wrap .woocommerce-error,
.sa-cw-wrap .woocommerce-message,
.sa-cw-wrap .woocommerce-info {
  border-radius: 6px !important;
  margin: 0 24px 16px !important;
  font-size: 13px !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .sa-cw-grid {
    grid-template-columns: 1fr !important;
    padding: 16px;
    gap: 20px;
  }
  .sa-cw-order-panel { order: -1; position: static; }
  .sa-cw-wrap .form-row-first,
  .sa-cw-wrap .form-row-last { width: 100% !important; display: block; }
  .sa-cw-wrap .form-row-first { margin-right: 0 !important; }
}
@media (max-width: 480px) {
  .sa-cw-grid    { padding: 12px; }
  .sa-cw-topbar  { padding: 14px 16px; }
  .sa-cw-logo-text { font-size: 17px; }
}

/* ── ELEMENTOR EDITOR ── */
.elementor-editor-active .sa-cw-order-panel { position: static; }
