/* Rivora — shared WooCommerce UI: notices, address modal, form fields.
   Loaded on cart, checkout and account pages. */

/* ---- Notices ----
   Kadence's own woocommerce.min.css styles these via
   `.woocommerce .woocommerce-message` etc. — two classes, edging out a bare
   `.woocommerce-message` rule — so we match that same `.woocommerce`-prefixed
   shape (its background/color/accent border all need an explicit reset, not
   just an add-on) instead of trying to out-specificity it. Kadence's own
   accent stripe is a plain `border-left`, an LTR assumption; this site is
   RTL throughout, so the accent belongs on the *inline-start* (right) edge —
   `border-inline-start` resolves that automatically instead of hardcoding a
   physical side. */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.8;
  font-family: var(--rivora-font-body);
  background: var(--rivora-surface-2);
  color: var(--rivora-ink-2);
  border: 1px solid var(--rivora-border-subtle);
  border-left: none;
  border-inline-start: 1px solid var(--rivora-border-subtle);
  /* WooCommerce prints these notices (wc_print_notices(), e.g. "Cart
     updated") straight from core/plugin hooks, outside any of the
     dir="rtl" wrappers this theme adds around its own markup — the
     <html> tag itself has no dir attribute (site locale is en-US), so
     without this they render left-to-right. */
  direction: rtl;
  text-align: right;
}

.woocommerce .woocommerce-message,
.woocommerce-message {
  border-color: rgba(92, 116, 73, .35);
  border-inline-start-color: rgba(92, 116, 73, .35);
  color: #5C7449;
  background: rgba(92, 116, 73, .08);
}

.woocommerce .woocommerce-error,
.woocommerce-error {
  border-color: rgba(181, 73, 63, .35);
  border-inline-start-color: rgba(181, 73, 63, .35);
  color: #B5493F;
  background: rgba(181, 73, 63, .07);
}

.woocommerce-error li {
  margin: 0;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  float: right;
  margin-inline-start: 12px;
  font-size: 12.5px;
}

/* The "View cart" / "Continue shopping" link inside a notice — Kadence's
   global button styles paint it with the theme's blue palette otherwise. */
.woocommerce-message .button.wc-forward,
.woocommerce-info .button.wc-forward,
.woocommerce-error .button.wc-forward {
  background: var(--rivora-ink-1);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
}

.woocommerce-message .button.wc-forward:hover,
.woocommerce-message .button.wc-forward:focus,
.woocommerce-info .button.wc-forward:hover,
.woocommerce-info .button.wc-forward:focus,
.woocommerce-error .button.wc-forward:hover,
.woocommerce-error .button.wc-forward:focus {
  background: #000;
  color: #fff;
  box-shadow: none;
}

/* ---- Fields ---- */
.rivora-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rivora-field__label {
  font-size: 13px;
  color: var(--rivora-ink-2);
}

.rivora-field input,
.rivora-field select,
.rivora-field textarea {
  width: 100%;
  border: 1px solid var(--rivora-border-subtle);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--rivora-font-body);
  background: var(--rivora-surface-bg);
  color: var(--rivora-ink-1);
  resize: vertical;
}

.rivora-field input:focus,
.rivora-field select:focus,
.rivora-field textarea:focus {
  outline: none;
  border-color: var(--rivora-gold-primary);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, .18);
}

/* ---- Address add/edit modal ---- */
.rivora-address-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rivora-address-modal[hidden] {
  display: none;
}

.rivora-address-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 20, .4);
}

.rivora-address-modal__card {
  position: relative;
  background: var(--rivora-surface-card);
  border-radius: var(--rivora-radius-card);
  box-shadow: var(--rivora-shadow-card-hover);
  padding: 28px 26px;
  width: 480px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--rivora-font-body);
}

.rivora-address-modal__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--rivora-ink-1);
  margin: 0 0 4px;
}

.rivora-address-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.rivora-address-modal__default {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--rivora-ink-2);
}

.rivora-address-modal__default input {
  width: 16px;
  height: 16px;
  accent-color: var(--rivora-gold-primary);
}

.rivora-address-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.rivora-address-modal__actions .rivora-btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

