/**
 * NEO modal + pay-popup form tokens for React shell.
 * Scoped under #popupPay where possible to avoid fighting SPA chrome.
 */

:root {
  --font-family-1: "Unbounded", "Sora", sans-serif;
  --font-family-2: "SF Pro Display", "Sora", sans-serif;
  --br-2: 2px;
  --br-6: 6px;
  --br-8: 8px;
  --br-12: 12px;
  --br-24: 24px;
  --font-weight-4: 400;
  --font-weight-5: 500;
  --font-weight-6: 600;
  --font-weight-7: 700;
  --font-size-s: 12px;
  --font-size-m: 14px;
  --font-size-default: 16px;
  --font-size-l: 18px;
  --font-size-xl: 20px;
  --transition-duration: 0.2s;
  --transition-duration-long: 0.7s;
  --input-height: 41px;
}

.popup_modal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-modal, rgba(18, 18, 18, 0.96));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.popup_modal.visible {
  opacity: 1;
  visibility: visible;
}

.popup_modal.visible .popup_modal_content {
  transform: scale(1);
  pointer-events: all;
}

.popup_modal_content {
  display: flex;
  background-color: var(--card, #171717);
  border-radius: var(--br-24);
  transform: scale(0.95);
  pointer-events: none;
  width: max-content;
  max-width: min(850px, 96vw);
  height: max-content;
  max-height: 96%;
  position: relative;
  flex-direction: column;
  z-index: 9999;
  transition: transform 0.2s;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
}

@media (max-width: 568.9px) {
  .popup_modal_content {
    width: 96%;
    min-width: 0;
  }
}

.popup_modal_close {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.popup_modal_close svg {
  width: 20px;
  height: 20px;
  fill: var(--text-default, #fff);
  opacity: 0.5;
  transition: var(--transition-duration);
}

.popup_modal_close:hover svg {
  opacity: 1;
}

.popup_modal_head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-7);
  background: transparent;
  padding: 0 0 15px;
  gap: 20px;
  color: var(--text-default, #fff);
}

body.modal__opened,
html.modal__opened {
  overflow: hidden;
}

#popupPay label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-custom, #bebebe);
  font-size: var(--font-size-s);
  margin-bottom: 0.35rem;
}

#popupPay label svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

#popupPay .inputs-inline {
  width: 100%;
  margin-bottom: 0.3rem;
}

#popupPay input[type="number"],
#popupPay input[type="text"],
#popupPay input:not([type]) {
  font-size: var(--font-size-s);
  padding-inline: 1rem;
  height: var(--input-height);
  color: var(--text-custom, #bebebe);
  background-color: var(--input-form, #1e1e1e);
  border-radius: var(--br-8);
  width: 100%;
  border: 0;
  outline: 1px solid transparent;
  box-sizing: border-box;
}

#popupPay input:focus {
  outline-color: var(--span-middle, rgba(126, 157, 255, 0.25));
}

#popupPay .number {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
}

#popupPay .number-minus,
#popupPay .number-plus {
  display: flex !important;
  position: absolute;
  width: 35px;
  height: 35px;
  padding: 0;
  font-size: var(--font-size-l);
  font-weight: var(--font-weight-5);
  align-items: center;
  justify-content: center;
  border-radius: var(--br-6);
  background-color: var(--transparent-2-w, rgba(255, 255, 255, 0.02));
  color: var(--text-custom, #bebebe);
  cursor: pointer;
  border: 0;
  z-index: 2;
}

#popupPay .number-plus {
  right: 2.45rem;
}

#popupPay .number-minus {
  right: 0.2rem;
}

#popupPay .preset_buttons button,
#popupPay .button-pay,
#popupPay button.flex-auto {
  min-height: var(--input-height);
  padding: 0 12px;
  border: 0;
  border-radius: var(--br-8);
  background: var(--button, #232323);
  color: var(--text-custom, #bebebe);
  cursor: pointer;
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-5);
}

#popupPay .preset_buttons button.active {
  background: var(--span, #7e9dff);
  color: var(--text-default, #fff);
}

#popupPay .button-pay {
  background: var(--money, #f4ca80);
  color: var(--text-default-invert, #1b1c24);
  font-weight: var(--font-weight-7);
}

#popupPay .button-pay:disabled {
  color: var(--transparent-10-w, rgba(255, 255, 255, 0.1));
  background-color: var(--btn-disabled, #1f1f1f);
  cursor: not-allowed;
}

#popupPay .button-delete {
  background-color: var(--red-10, rgba(255, 73, 64, 0.1));
  color: var(--red, #ff4940);
}

#popupPay .button-delete svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

#popupPay .width-100 {
  width: 100%;
}

#popupPay .margin-left-auto {
  margin-left: auto;
}

#popupPay .flex-auto {
  flex: 1 1 auto;
}

#popupPay hr {
  border: 0;
  border-top: 1px solid var(--transparent-5-w, rgba(255, 255, 255, 0.05));
  margin: 0.75rem 0;
}

#popupPay input[type="checkbox"] {
  width: auto;
  height: auto;
  margin-right: 8px;
}

#popupPay a {
  color: var(--span, #7e9dff);
}
