/* === MOBILE TOUCH TARGET OVERRIDES === */
/* Bump interactive elements from 40px → 44px on mobile */

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  width: 44px;      /* 44px on mobile */
  height: 44px;
  padding: 10px;

  border-radius: 999px;
  border: 1px solid var(--stroke-soft-200);
  background: var(--bg-weak-50);
  color: #5C5C5C;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

@media (min-width: 1024px) {
  .icon-button {
    width: 40px;
    height: 40px;
  }
}

/* ... rest of icon-button variants unchanged ... */
.icon-button:hover:not(.is-disabled):not(.is-active) {
  background: #EBEBEB;
  color: #5C5C5C;
}

.icon-button.is-active {
  background: #00293F;
  border-color: #00293F;
  color: #FFFFFF;
}

.icon-button.is-disabled,
.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Icon stack */
.icon-stack {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-block;
  pointer-events: none;
}

.icon-stack .icon {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.icon-stack .icon-default { opacity: 1; }

.icon-button:hover .icon-default        { opacity: 0; }
.icon-button:hover .icon-hover          { opacity: 1; }

.icon-button.is-active .icon-default,
.icon-button.is-active:hover .icon-default { opacity: 0; }
.icon-button.is-active .icon-hover          { opacity: 0; }
.icon-button.is-active .icon-active         { opacity: 1; }

/* Badge */
.btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-accent);
  color: var(--static-white);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

/* Cart specific */
.cart-btn {
  width: 104px;
  height: 44px; /* was 40px */
  padding: 6px 10px;
}

@media (min-width: 1024px) {
  .cart-btn {
    height: 40px;
  }
}

/* User button */
.user-btn {
  color: #fff;
  background: #00293F;
  border: none;
}

/* Submit Button */
.submit-btn {
  margin-top: 8px;
  height: 44px; 
  border-radius: 10px;
  background: var(--primary-accent);
  color: var(--static-white);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--primary-accent-hover);
}

@media (min-width: 1024px) {
  .submit-btn {
    height: 40px;
  }
}

.submit-btn-search {
  width: 90px;
  height: 44px;
  border-radius: 10px;
  padding-bottom: 5px;
  background: var(--primary-accent);
  color: var(--static-white);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.submit-btn-search:hover {
  background: var(--primary-accent-hover);
}

/* Repeat button */
.btn-repeat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 104px;
  height: 44px;
  padding: 8px;
  border-radius: 8px;
  border: 1px transparent;
  background: var(--bg-weak-50);
  color: #5C5C5C !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-repeat:hover  { background: var(--primary-accent); color: var(--static-white) !important; }
.btn-repeat:active { transform: translateY(1px); opacity: 0.9; }
.btn-repeat:disabled { opacity: 0.5; cursor: not-allowed; }

/* Round cancel button */
.cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--stroke-soft-200);
  user-select: none;
  background: white;
}

/* Dialog cancel */
.dialog-cancel-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  background: var(--bg-weak-50);
  color: var(--text-strong-950);
}

.dialog-cancel-btn:hover { background: var(--stroke-soft-200); }
.dialog-cancel-btn.is-disabled,
.dialog-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Form (scoped) */
.card form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden { display: none; }

.card input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke-soft-200);
  background: var(--bg-weak-50);
  font-size: 16px;
}

.card input:focus {
  outline: none;
  border-color: var(--primary-accent);
  background: var(--bg-white-0);
}

/* Text link */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-accent);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.btn-link:hover   { color: var(--primary-accent-hover); }
.btn-link:active  { opacity: 0.7; }
.btn-link:visited { color: var(--primary-accent); }

/* Admin buttons */
.btn-staff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-weak-50);
  color: #5C5C5C;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-staff:hover   { background: var(--bg-weak-100); border-color: #C4C4C4; color: #2E2E2E; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
.btn-staff:active  { transform: translateY(1px); background: #E4E4E4; border-color: #BABABA; box-shadow: none; }


.delete-btn {
  /* identical layout to submit-btn */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;

  /* red instead of primary */
  background: #e53535;
  color: var(--static-white);
}

.delete-btn:hover {
  background: #c92d2d;
}

.delete-btn.is-disabled,
.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* == Soft-blocked checkout button == */

.submit-btn.is-soft-blocked {
  opacity: 0.45;
  cursor: not-allowed;
  /* suppress the active/hover colour shift */
  pointer-events: auto; /* keep clicks so JS can intercept and toast */
}

.submit-btn.is-soft-blocked:hover,
.submit-btn.is-soft-blocked:active {
  background: var(--primary-accent); /* no colour feedback */
  transform: none;
}

/* Desktop: CSS tooltip sourced from the title attribute */
@media (min-width: 1024px) {
  .submit-btn.is-soft-blocked {
    position: relative;
  }

  .submit-btn.is-soft-blocked::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);

    width: 220px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    white-space: normal;

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
  }

  .submit-btn.is-soft-blocked:hover::after {
    opacity: 1;
  }
}