/* Native adaptations of Spell UI PopButton and LabelInput, in Nexo's palette. */

/* Only full action buttons receive the raised edge. Compact toolbar, quantity,
   icon and product-row controls keep the dimensions of their existing layouts. */
:is(.btn-primary, .btn-secondary):not(.central-btn-small, .pos-product > .btn, .product-card-price > .btn, .cart-dock .btn),
.lp-button,
.auth-button {
  --nexo-pop-edge: #7f2c0d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: auto;
  min-height: 44px;
  padding: 9px 16px 10px;
  border: 1px solid var(--nexo-pop-edge);
  border-bottom-width: 3px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  transform-origin: center bottom;
  transition: background-color 140ms ease, transform 100ms ease, box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:not(.central-btn-small),
.lp-button.lp-primary {
  color: #fff;
  background: #ad4119;
  border-color: #7f2c0d;
}
.btn-primary:not(.central-btn-small):hover:not(:disabled):not([aria-disabled="true"]),
.lp-button.lp-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  color: #fff;
  background: #943610;
  border-color: #7f2c0d;
}

.btn-secondary:not(.central-btn-small),
.lp-button:not(.lp-primary),
.auth-button.auth-button-secondary {
  --nexo-pop-edge: #b8c5ce;
  color: #17242d;
  background: #fff;
  border-color: var(--nexo-pop-edge);
}
.btn-secondary:not(.central-btn-small):hover:not(:disabled):not([aria-disabled="true"]),
.lp-button:not(.lp-primary):hover:not(:disabled):not([aria-disabled="true"]),
.auth-button.auth-button-secondary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: #f3f6f8;
  border-color: #91a5b3;
}

.auth-button:not(.auth-button-secondary) {
  --nexo-pop-edge: #0c161e;
  color: #fff;
  background: #17242d;
  border-color: var(--nexo-pop-edge);
}
.auth-button:not(.auth-button-secondary):hover:not(:disabled):not([aria-disabled="true"]) {
  background: #263c4b;
}

:is(.btn-primary, .btn-secondary):not(.central-btn-small, .pos-product > .btn, .product-card-price > .btn, .cart-dock .btn):active:not(:disabled):not([aria-disabled="true"]),
.lp-button:active:not(:disabled):not([aria-disabled="true"]),
.auth-button:active:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(1px) scaleY(.97);
}
:is(.btn-primary, .btn-secondary):not(.central-btn-small, .pos-product > .btn, .product-card-price > .btn, .cart-dock .btn):focus-visible,
.lp-button:focus-visible,
.auth-button:focus-visible {
  outline: 3px solid #ee7d4c;
  outline-offset: 3px;
}
:is(.btn-primary, .btn-secondary, .lp-button, .auth-button):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.nexo-label-input {
  position: relative;
  width: 100%;
  min-width: 0;
  isolation: isolate;
}
.nexo-label-input > input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #bcc9d2;
  border-radius: 8px;
  background: #fff;
  color: #17242d;
  font-size: 16px;
  line-height: normal;
  box-shadow: none;
}
.nexo-label-input > label {
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 9px;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 0 4px;
  overflow: hidden;
  background: #fff;
  color: #5c6d7a;
  font-size: 14px;
  font-weight: 550;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: top 140ms ease, transform 140ms ease, color 140ms ease;
}
.nexo-label-input:has(> input:focus) > label,
.nexo-label-input:has(> input:not(:placeholder-shown)) > label,
.nexo-label-input.nexo-label-placeholder > label {
  top: 0;
  transform: translateY(-50%) scale(.86);
}
.nexo-label-input:has(> input:focus) > label {
  color: #ad4119;
}
.nexo-label-input > input:focus {
  border-color: #ad4119;
  outline: 2px solid #ee7d4c;
  outline-offset: 2px;
}
.nexo-label-input > input:disabled {
  cursor: not-allowed;
  background: #f3f6f8;
  color: #5c6d7a;
}
.nexo-label-input:has(> input:disabled) > label {
  background: #f3f6f8;
}
.nexo-label-input > input[aria-invalid="true"] {
  border-color: #a1342d;
}
.nexo-label-input > input:-webkit-autofill {
  -webkit-text-fill-color: #17242d;
  box-shadow: 0 0 0 1000px #fff inset;
}
.auth-password.nexo-label-input > input {
  padding-right: 86px;
}
.auth-password.nexo-label-input > label {
  max-width: calc(100% - 102px);
}
.auth-password.nexo-label-input > .auth-reveal {
  top: 8px;
  height: 32px;
}

@media (prefers-reduced-motion: reduce) {
  :is(.btn-primary, .btn-secondary):not(.central-btn-small, .pos-product > .btn, .product-card-price > .btn, .cart-dock .btn),
  .lp-button,
  .auth-button,
  .nexo-label-input > label {
    transition: none;
  }
  :is(.btn-primary, .btn-secondary):not(.central-btn-small, .pos-product > .btn, .product-card-price > .btn, .cart-dock .btn):active,
  .lp-button:active,
  .auth-button:active {
    transform: none;
  }
}
