/* FoodOrd Card - modern minimal empty cart styles */
/* Follows BEM-like naming with wr-card prefix. */

:root {
  --background-color: #f7f7f7;
  --primary-color: #ea004b;
  --primary-hover: #c70040;
  --text-color: #323232;
  --text-hover: #313131;
  --secondary-text: #6b6b6b;
  --button-bg: #ea004b;
  --button-text-color: #ffffff;
  --button-on-hover: #c70040;
  --header-bg: #ffffff;
  --footer-bg: #ffffff;
  --border-color: #f4f4f4;
}

.wr-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  background: #ffffff;
  z-index: 1050;
}

/* Block editor / Customizer preview (widgets) safety: avoid absolute positioning and overflow */
.wr-card.wr-card--editor {
  position: relative;
  height: auto;
  z-index: auto;
  max-width: 100%;
}

.wr-card.wr-card--editor .wr-card__header {
  position: static;
  border-radius: 12px 12px 0 0;
}

.wr-card.wr-card--editor .wr-card__body {
  margin-top: 0;
  padding-bottom: 0;
  overflow: visible;
}

.wr-card.wr-card--editor .wr-card__empty {
  margin-top: 0;
}

.wr-card.wr-card--editor .wr-card__footer {
  position: static;
  box-shadow: none;
}

/* Frontend-only overlay positioning */
body:not(.wp-admin) .wr-card {
  position: absolute;
  height: 100%;
}

.wr-card__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #f4f4f4;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body:not(.wp-admin) .wr-card__header {
  position: relative;
}

.wr-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.wr-card__clear-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--foodord-card-clear-border, #e5e7eb);
  color: var(--foodord-card-clear-color, #323232);
  background: var(--foodord-card-clear-bg, #ffffff);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.wr-card__clear-btn:hover {
  color: var(--foodord-card-clear-hover-color, #323232);
  background: var(--foodord-card-clear-hover-bg, #fef2f2);
  border-color: var(--foodord-card-clear-hover-border, #ea004b);
}

.wr-card__clear-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.wr-card__clear-btn:disabled:hover {
  background: var(--foodord-card-clear-disabled-bg, #ffffff);
  border-color: var(--foodord-card-clear-disabled-border, #e5e7eb);
}

.wr-card__clear-btn.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.wr-card__clear-btn.disabled:hover {
  background: var(--foodord-card-clear-disabled-bg, #ffffff);
  border-color: var(--foodord-card-clear-disabled-border, #e5e7eb);
}

.wr-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  z-index: 1000;
  scroll-padding-bottom: 80px;
}

/* Frontend-only body spacing to account for absolute header/footer */
body:not(.wp-admin) .wr-card__body {
  margin-top: 4rem;
  margin-bottom: 0;
  padding-bottom: 80px;
  /* Default gap */
}

body:not(.wp-admin) .wr-card.wr-card--gap-80 .wr-card__body {
  padding-bottom: 80px;
  scroll-padding-bottom: 80px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-96 .wr-card__body {
  padding-bottom: 96px;
  scroll-padding-bottom: 96px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-112 .wr-card__body {
  padding-bottom: 112px;
  scroll-padding-bottom: 112px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-128 .wr-card__body {
  padding-bottom: 128px;
  scroll-padding-bottom: 128px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-144 .wr-card__body {
  padding-bottom: 144px;
  scroll-padding-bottom: 144px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-160 .wr-card__body {
  padding-bottom: 160px;
  scroll-padding-bottom: 160px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-176 .wr-card__body {
  padding-bottom: 176px;
  scroll-padding-bottom: 176px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-192 .wr-card__body {
  padding-bottom: 192px;
  scroll-padding-bottom: 192px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-208 .wr-card__body {
  padding-bottom: 208px;
  scroll-padding-bottom: 208px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-224 .wr-card__body {
  padding-bottom: 224px;
  scroll-padding-bottom: 224px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-240 .wr-card__body {
  padding-bottom: 240px;
  scroll-padding-bottom: 240px;
}

body:not(.wp-admin) .wr-card.wr-card--gap-256 .wr-card__body {
  padding-bottom: 256px;
  scroll-padding-bottom: 256px;
}

@media (min-width: 1025px) {
  body:not(.wp-admin) .wr-card.wr-card--empty .wr-card__footer {
    display: none;
  }

  body:not(.wp-admin) .wr-card.wr-card--empty .wr-card__body {
    padding-bottom: 0;
    scroll-padding-bottom: 0;
  }
}

.wr-card__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  padding: 48px 24px;
  margin: auto;
  box-sizing: border-box;
}

.wr-card__empty-icon-wrap {
  width: 72px;
  height: 72px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #94a3b8;
  position: relative;
}

.wr-card__empty-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed #e2e8f0;
  border-radius: 50%;
  opacity: 0.5;
}

.wr-card__empty-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.wr-card__empty-text {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.wr-card__empty-subtext {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  max-width: 220px;
  line-height: 1.5;
}

.wr-card__footer {
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  background: #ffffff;
  border-radius: 0;
  z-index: 9999;
}

.wr-card__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 10px 0 4px 0;
  margin-bottom: 0;
  color: var(--text-color);
  animation: wr-card-fade-in 0.3s ease-out;
}

.wr-card__subtotal-info,
.wr-card__delivery-info {
  display: flex;
  align-items: center;
}

.wr-card__subtotal-label,
.wr-card__delivery-label {
  color: var(--secondary-text);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wr-card__subtotal-amount {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 64px;
  position: relative;
  letter-spacing: -0.01em;
}

.wr-card__subtotal-amount--loading {
  color: transparent;
}

.wr-card__subtotal-amount--loading .woocommerce-Price-amount,
.wr-card__subtotal-amount--loading .woocommerce-Price-currencySymbol {
  color: transparent;
}

.wr-card__subtotal-amount--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 64px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--foodord-skeleton-base, #eeeeee) 0%,
    var(--foodord-skeleton-highlight, #f5f5f5) 40%,
    var(--foodord-skeleton-base, #eeeeee) 80%
  );
  background-size: 600px 100%;
  animation: wr-card-subtotal-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes wr-card-subtotal-skeleton-shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

.wr-card__delivery-fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 4px 0 12px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-color);
  animation: wr-card-fade-in 0.4s ease-out;
}

.wr-card__delivery-amount {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  letter-spacing: -0.01em;
}

@keyframes wr-card-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body:not(.wp-admin) .wr-card__footer {
  position: absolute;
}

.wr-card__fees {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.wr-card__fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: wr-card-fade-in 0.5s ease-out;
}

.wr-card__fee-label {
  color: var(--secondary-text);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
}

.wr-card__fee-amount {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  min-width: 80px;
  letter-spacing: -0.01em;
}

.wr-card__notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: wr-card-notice-enter 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes wr-card-notice-enter {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.wr-card__notice--warning {
  background: #fff9f0;
  border: 1px solid #fef3c7;
}

.wr-card__notice svg {
  flex-shrink: 0;
  color: #d97706;
  width: 18px;
  height: 18px;
}

.wr-card__notice-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.4;
  font-weight: 500;
}

.wr-card__notice-text strong {
  font-weight: 700;
}

.wr-card__min-notice {
  display: block;
  padding: 8px 4px 10px;
  margin: 10px 0 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wr-card__min-notice .wr-card__notice-text {
  display: block;
  margin: 0 0 10px;
  color: var(--text-color);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.wr-card__min-notice .wr-card__notice-text strong {
  color: var(--text-color);
  font-weight: 700;
}

.wr-card__min-notice .wr-card__min-notice-amount {
  color: #ef4444;
  font-weight: 700;
}

.wr-card__min-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wr-card__min-progress-edge {
  min-width: 34px;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.wr-card__min-progress-edge--end {
  text-align: right;
}

.wr-card__min-progress-track {
  display: block;
  flex: 1 1 auto;
  height: 7px;
  overflow: hidden;
  background: var(--border-color);
  border-radius: 999px;
}

.wr-card__min-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--button-bg, var(--primary-color, #ea004b));
  border-radius: inherit;
  transition: width 0.2s ease;
}

.wr-card__min-notice[data-foodord-min-progress="5"] .wr-card__min-progress-fill { width: 5%; }
.wr-card__min-notice[data-foodord-min-progress="10"] .wr-card__min-progress-fill { width: 10%; }
.wr-card__min-notice[data-foodord-min-progress="15"] .wr-card__min-progress-fill { width: 15%; }
.wr-card__min-notice[data-foodord-min-progress="20"] .wr-card__min-progress-fill { width: 20%; }
.wr-card__min-notice[data-foodord-min-progress="25"] .wr-card__min-progress-fill { width: 25%; }
.wr-card__min-notice[data-foodord-min-progress="30"] .wr-card__min-progress-fill { width: 30%; }
.wr-card__min-notice[data-foodord-min-progress="35"] .wr-card__min-progress-fill { width: 35%; }
.wr-card__min-notice[data-foodord-min-progress="40"] .wr-card__min-progress-fill { width: 40%; }
.wr-card__min-notice[data-foodord-min-progress="45"] .wr-card__min-progress-fill { width: 45%; }
.wr-card__min-notice[data-foodord-min-progress="50"] .wr-card__min-progress-fill { width: 50%; }
.wr-card__min-notice[data-foodord-min-progress="55"] .wr-card__min-progress-fill { width: 55%; }
.wr-card__min-notice[data-foodord-min-progress="60"] .wr-card__min-progress-fill { width: 60%; }
.wr-card__min-notice[data-foodord-min-progress="65"] .wr-card__min-progress-fill { width: 65%; }
.wr-card__min-notice[data-foodord-min-progress="70"] .wr-card__min-progress-fill { width: 70%; }
.wr-card__min-notice[data-foodord-min-progress="75"] .wr-card__min-progress-fill { width: 75%; }
.wr-card__min-notice[data-foodord-min-progress="80"] .wr-card__min-progress-fill { width: 80%; }
.wr-card__min-notice[data-foodord-min-progress="85"] .wr-card__min-progress-fill { width: 85%; }
.wr-card__min-notice[data-foodord-min-progress="90"] .wr-card__min-progress-fill { width: 90%; }
.wr-card__min-notice[data-foodord-min-progress="95"] .wr-card__min-progress-fill { width: 95%; }
.wr-card__min-notice[data-foodord-min-progress="100"] .wr-card__min-progress-fill { width: 100%; }

.wr-card__cta {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  background: var(--button-bg, #ea004b);
  color: #ffffff;
  border: 0;
  cursor: not-allowed;
  opacity: 0.6;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  text-align: left;
}

.wr-card__cta *:not(.wr-card__cta-count) {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.wr-card__cta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.wr-card__cta-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--foodord-card-cta-count-bg, #ffffff);
  color: var(--foodord-card-cta-count-color, var(--primary-color));
  border: 1px solid var(--foodord-card-cta-count-border, rgba(255, 255, 255, 0.6));
}

.wr-card__cta-label {
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.wr-card__cta-total {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.wr-card__cta-total--loading {
  min-width: 30px;
  justify-content: flex-end;
}

.wr-card__cta-total-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wr-card__cta-total-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  animation: wr-card-cta-dot-pulse 1s infinite ease-in-out;
}

.wr-card__cta-total-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.wr-card__cta-total-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes wr-card-cta-dot-pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes foodord-note-caret-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.wr-card__cta:not(.disabled) {
  cursor: pointer;
  opacity: 1;
}

.wr-card__cta:not(.disabled):hover {
  background: var(--button-on-hover, #c70040);
}

.wr-card__cta.wr-card__cta--disabled,
.wr-card.wr-card__cta--disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.wr-card__cta.wr-card__cta--disabled:hover,
.wr-card.wr-card__cta--disabled:hover {
  background: #ea004b;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Cart items */
.wr-card__items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 5px;
  width: 100%;
  position: relative;
  z-index: 1100;
}

.wr-card__upsells {
  width: 100%;
  padding: 0 5px 8px;
  box-sizing: border-box;
}

.wr-card__upsells .foodord-modal-upsells--card {
  padding: 16px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__grid {
  gap: 10px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__item {
  flex-basis: 148px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__content {
  gap: 6px;
  padding: 10px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__item-title {
  font-size: 13px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__price {
  font-size: 13px;
}

.wr-card__upsells .foodord-modal-upsells--card .foodord-modal-upsells__button {
  font-size: 11px;
}

.wr-card__item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 10px;
  background: var(--foodord-card-item-bg, #ffffff);
  position: relative;
  align-items: flex-start;
  cursor: default;
}

.wr-card__items--skeleton {
  pointer-events: none;
}

.wr-card__item--skeleton {
  align-items: center;
}

.wr-card__item-skeleton-title {
  width: 78%;
  height: 14px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.wr-card__item-skeleton-meta {
  width: 52%;
  height: 12px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.wr-card__item-skeleton-meta--short {
  width: 36%;
  margin-bottom: 0;
}

.wr-card__item--skeleton .wr-card__item-quantity {
  border: none;
  background: transparent;
  padding: 0;
}

.wr-card__item-skeleton-quantity {
  display: block;
  width: 36px;
  height: 24px;
  border-radius: 8px;
}

.wr-card__item-quantity {
  flex-shrink: 0;
  min-width: 0;
  height: auto;
  padding: 0;
  border: none;
  margin-left: 0;
  margin-right: 0;
  cursor: default;
  position: relative;
  z-index: 1150;
  align-self: flex-start;
  background: transparent;
  overflow: visible;
  display: block;
}

.wr-card__item-quantity:hover {
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.wr-card__item-quantity:active {
  transform: none;
}

/* Persistent inline quantity controls */
.foodord-sidebar .wr-card .wr-card__quantity-popover {
  position: static;
  right: auto;
  top: auto;
  transform: none;
  margin-right: 8px;
  padding: 1px 2px;
  background: var(--foodord-quantity-popover-bg, #f7f8fa);
  border: 1px solid var(--foodord-quantity-popover-border, #d9dde4);
  border-radius: 999px;
  display: flex;
  align-items: center;
  z-index: 1200;
  gap: 3px;
  opacity: 1;
  visibility: visible;
  transition: none;
  backdrop-filter: none;
  transform-origin: center;
}

/* Enhanced entrance animation */
@keyframes slideFromLeft {
  0% {
    transform: translateY(-50%) scale(0.6) translateX(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(-50%) scale(1) translateX(12px);
    opacity: 1;
  }
}

@keyframes fadeOutToRight {
  0% {
    transform: translateY(-50%) scale(1) translateX(12px);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) scale(0.6) translateX(30px);
    opacity: 0;
  }
}

.foodord-sidebar .wr-card .wr-card__quantity-popover.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: none;
}

.wr-card__quantity-popover::before {
  display: none;
}

.foodord-sidebar .wr-card .wr-card__quantity-popover.active::before {
  opacity: 1;
}

.foodord-sidebar .wr-card .wr-card__quantity-popover.closing {
  animation: none;
}

@keyframes slideFromLeft {
  0% {
    transform: translateY(-50%) scale(1) translateX(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(-50%) scale(1) translateX(12px);
    opacity: 1;
  }
}

@keyframes fadeOutToRight {
  0% {
    transform: translateY(-50%) scale(1) translateX(12px);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) scale(1) translateX(30px);
    opacity: 0;
  }
}

.wr-card__quantity-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  font-size: 22px;
  font-weight: 400;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--foodord-quantity-popover-btn-color, #323232);
  animation: none;
}

.wr-card__quantity-btn.minus:not(.trash)::before {
  content: "\2212";
  position: relative;
  top: -1px;
}

.wr-card__quantity-btn.plus::before {
  content: "";
  width: 14px;
  height: 14px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
}

.wr-card__quantity-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.wr-card__quantity-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(201, 56, 111, 0.05));
  opacity: 0;
  transition: all 0.3s ease;
  z-index: -1;
}

.wr-card__quantity-btn:hover {
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.wr-card__quantity-btn:hover::after {
  opacity: 1;
}

.wr-card__quantity-btn.minus.trash {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wr-card__quantity-btn.minus.trash:hover {
  background: var(--foodord-quantity-popover-trash-hover-bg, #f7f8fa);
  border-color: transparent;
  color: var(--foodord-quantity-popover-trash-hover-color, #ea004b);
}

.wr-card__quantity-btn.plus {
  background: transparent;
  border-color: transparent;
  color: var(--foodord-quantity-popover-btn-color, #323232);
}

.wr-card__quantity-btn.plus:hover {
  border-color: transparent;
  color: var(--foodord-quantity-popover-btn-hover-color, #ea004b);
  box-shadow: none;
}

.wr-card__quantity-value {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
  color: var(--foodord-quantity-popover-value-color, #323232);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-size: 15px;
}

/* Quantity field active state */
.wr-card__item-quantity.active {
  border-color: transparent;
  box-shadow: none;
}

.wr-card__quantity-btn:active {
  transform: none;
}


.wr-card__item-details {
  flex: 1;
  min-width: 0;
}

.wr-card__item-actions {
  --foodord-cart-price-align-offset: 8px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-start;
  flex-shrink: 0;
  gap: 12px;
  margin-left: auto;
}

.wr-card__item-title {
  font-size: 0.90rem;
  margin: 0 0 4px 0;
}

.wr-card__item-title-button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: underline;
  max-width: 100%;
}

.wr-card__item-title-button:hover {
  text-decoration: none;
}

.wr-card__item-price {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 56px;
  position: relative;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  margin-right: var(--foodord-cart-price-align-offset, 0);
}

.wr-card__item-price .woocommerce-Price-amount {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.wr-card__item-price .woocommerce-Price-currencySymbol {
  font-size: 14px;
  font-weight: 600;
}

.wr-card__item-price--loading {
  color: transparent;
}

.wr-card__item-price--loading .woocommerce-Price-amount,
.wr-card__item-price--loading .woocommerce-Price-currencySymbol {
  color: transparent;
}

.wr-card__item-price--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 56px;
  height: 15px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--foodord-skeleton-base, #eeeeee) 0%,
    var(--foodord-skeleton-highlight, #f5f5f5) 40%,
    var(--foodord-skeleton-base, #eeeeee) 80%
  );
  background-size: 600px 100%;
  animation: wr-card-subtotal-skeleton-shimmer 1.4s ease-in-out infinite;
}

.wr-card__note-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.78rem;
  text-decoration: underline;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
}

.wr-card__item-note {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  padding-right: 10px;
}

.wr-card__item-note:not(.is-editing):not(.has-note) {
  display: none;
}

.wr-card__note-toggle:hover {
  text-decoration: underline;
}

.wr-card__note-form {
  position: relative;
  margin-top: 6px;
  padding: 10px 0 12px 0;
  width: 100%;
  box-sizing: border-box;
}

.wr-card__item-note.is-editing:not(.has-note) .wr-card__note-form:not(:focus-within)::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 9px;
  width: 1px;
  height: 17px;
  background: var(--text-color);
  pointer-events: none;
  animation: foodord-note-caret-blink 1s steps(1, end) infinite;
}

.wr-card__note-counter {
  margin: 0 0 4px 0;
  color: var(--secondary-text, #6b6b6b);
  font-size: 12px;
  line-height: 1;
  text-align: right;
}

.wr-card__note-input {
  width: 100%;
  min-height: 72px;
  resize: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
  font-family: inherit;
  box-sizing: border-box;
}

.wr-card__note-input:focus {
  outline: none;
  border-color: #d1d5db;
  box-shadow: none;
}

.wr-card__note-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.wr-card__note-btn {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
}

.wr-card__note-btn--cancel {
  color: var(--text-color);
}

.wr-card__note-btn--add {
  color: var(--text-color);
}

.wr-card__note-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wr-card__note-display {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #d9e4ff78
}

.wr-card__note-display-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 4px;
}

.wr-card__note-display-text {
  margin: 0;
  font-size: 0.82rem;
  color: #374151;
  word-break: break-word;
}

.wr-card__note-feedback {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #b91c1c;
}

.wr-card__item-note[data-note-saving="1"] .wr-card__note-btn {
  opacity: 0.65;
  cursor: wait;
}

.wr-card__item-toppings {
  margin: 4px 0 4px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wr-card__item-topping-set {
  display: contents;
  margin-bottom: 2px;
}

.wr-card__item-topping-set:last-child {
  margin-bottom: 0;
}

.wr-card__item-topping-list {
  display: grid;
  gap: 2px;
}

.wr-card__item-topping {
  display: block;
  font-size: 12px;
}

.wr-card__item-topping-title {
  font-size: 13px;
  font-weight: 600;
}

.wr-card__item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: #ea004b;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.wr-card__item-remove:hover {
  opacity: 1;
}

/* Address Bar (below mode toggle, above header) */
.wr-card__address-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--foodord-address-bar-bg, #ffffff);
  border-bottom: 1px solid var(--foodord-address-bar-border, #f1f5f9);
  transition: background-color 0.2s ease;
}

.wr-card__address-bar:hover {
  background-color: var(--foodord-address-bar-hover-bg, #f8fafc);
}

.wr-card__address-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}

.wr-card__address-left svg {
  flex-shrink: 0;
  color: var(--foodord-address-bar-icon, #64748b);
}

.wr-card__address-text {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wr-card__address-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foodord-address-bar-muted, #64748b);
  line-height: 1;
}

.wr-card__address-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--foodord-address-bar-text, #1e293b);
  margin-top: 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  max-width: none;
}

.wr-card__address-delivery-fee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--foodord-address-bar-muted, #64748b);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.wr-card__address-delivery-fee[hidden] {
  display: none;
}

.wr-card__address-delivery-fee svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: currentColor;
}

.wr-card__address-change {
  appearance: none;
  border: 1px solid var(--foodord-address-bar-change-border, #e2e8f0);
  background: var(--foodord-address-bar-change-bg, #f8fafc);
  color: var(--foodord-address-bar-change-color, #475569);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 6px;
  height: 24px;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wr-card__address-change:hover {
  background: var(--foodord-address-bar-change-hover-bg, #f1f5f9);
  border-color: var(--foodord-address-bar-change-hover-border, #cbd5e1);
  color: var(--foodord-address-bar-change-hover-color, #0f172a);
}

/* Clear Cart Modal */
.wr-card__modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* Hide cart images globally when Tweaks setting disables product images */
.foodord-hide-cart-images .woocommerce-cart table.cart .product-thumbnail,
.foodord-hide-cart-images .woocommerce-cart table.cart td.product-thumbnail,
.foodord-hide-cart-images .woocommerce table.cart .product-thumbnail,
.foodord-hide-cart-images .woocommerce-mini-cart img,
.foodord-hide-cart-images .widget_shopping_cart img,
.foodord-hide-cart-images ul.cart_list img,
.foodord-hide-cart-images ul.product_list_widget img,
.foodord-hide-cart-images .wc-block-cart-item__image,
.foodord-hide-cart-images .wc-block-components-product-image,
.foodord-hide-cart-images .wc-block-mini-cart__drawer img,
.foodord-hide-cart-images .wc-block-mini-cart__items img,
.foodord-hide-cart-images .wp-block-woocommerce-cart .wc-block-cart-item__image,
.foodord-hide-cart-images .wp-block-woocommerce-mini-cart-contents img {
  display: none;
}

.wr-card__modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wr-card__modal {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  max-width: 540px;
  width: 90%;
  border: 1px solid #e2e8f0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s ease;
}

.wr-card__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.wr-card__modal-close {
  appearance: none;
  background: transparent;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: static;
  flex-shrink: 0;
}

.wr-card__modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
}

.wr-card__modal-close-icon {
  position: relative;
  width: 20px;
  height: 20px;
  color: #4b5563;
}

.wr-card__modal-close-icon::before,
.wr-card__modal-close-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
}

.wr-card__modal-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.wr-card__modal-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.wr-card__modal-overlay.active .wr-card__modal {
  transform: scale(1) translateY(0);
}

.wr-card__modal-message {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  flex: 1;
}

.wr-card__modal-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.wr-card__modal-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 4px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
}

.wr-card__modal-btn:disabled {
  cursor: not-allowed;
}

.wr-card__modal-btn--cancel {
  background: #ffffff;
  border-color: #d1d5db;
}

.wr-card__modal-btn--cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.wr-card__modal-btn--confirm {
  background: #c70040;
  border-color: #c70040;
  color: #ffffff;
}

.wr-card__modal-btn--confirm:hover {
  background: #c70040;
  border-color: #c70040;
}

.wr-card__modal-btn--confirm.is-loading {
  position: relative;
  background: #c70040;
  border-color: #c70040;
  color: transparent;
  cursor: wait;
  opacity: 1;
}

.wr-card__modal-btn--confirm.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: wr-card-modal-button-spin 0.7s linear infinite;
}

@keyframes wr-card-modal-button-spin {
  100% {
    transform: rotate(360deg);
  }
}

.foodord-counter-animate {
  display: inline-grid;
  grid-template-columns: minmax(1ch, auto);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  height: 1.25em;
  line-height: 1.25em;
  justify-items: center;
  align-items: center;
}

.foodord-counter-number {
  grid-column: 1;
  grid-row: 1;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.foodord-counter-number--old {
  position: relative;
  z-index: 1;
}

.foodord-counter-number--new {
  position: relative;
  z-index: 2;
}

.foodord-counter-animate.is-incrementing .foodord-counter-number--new {
  transform: translateY(100%);
}

.foodord-counter-animate.is-decrementing .foodord-counter-number--new {
  transform: translateY(-100%);
}

.foodord-counter-animate.is-incrementing.animate-active .foodord-counter-number--old {
  transform: translateY(-100%);
}

.foodord-counter-animate.is-incrementing.animate-active .foodord-counter-number--new {
  transform: translateY(0);
}

.foodord-counter-animate.is-decrementing.animate-active .foodord-counter-number--old {
  transform: translateY(100%);
}

.foodord-counter-animate.is-decrementing.animate-active .foodord-counter-number--new {
  transform: translateY(0);
}
