/* Kit visual UR — tokens e widgets (sheet, campo, CTA, checkbox, rodapé).
   Medidas copiadas da TELA 05 do artifact. Acento único: verde #5FE000. */

:root {
  --ur-accent: #5FE000;
  --ur-accent-hover: #56CA00;
  --ur-accent-ink: #0a1600;
  --ur-accent-wash: rgba(95, 224, 0, 0.16);
  --ur-accent-link: #3d9900;
  --ur-ok: #16a34a;
  --ur-font: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-ur-theme="light"] {
  --ur-card: #ffffff;
  --ur-tx: #111111;
  --ur-mu: #5e5e57;
  --ur-tx: #111111;
  --ur-line: #e1e1d9;
  --ur-line: #e1e1d9;
  --ur-row: #f0f0eb;
  --ur-sheet-close-bg: #f0f0eb;
  --ur-tx: #111111;
  --ur-card: #ffffff;
  --ur-line: #e1e1d9;
  --ur-field-placeholder: #8a8a84;
  --ur-overlay: rgba(0, 0, 0, 0.55);
  --ur-row: #f0f0eb;
  --ur-tx: #111111;
  --ur-warn-bg: #fff6e8;
  --ur-warn-fg: #7a4100;
  --ur-cta-icon-bg: var(--ur-accent-ink);
  --ur-cta-icon-fg: var(--ur-accent);
  --ur-link: var(--ur-accent-link);
}

[data-ur-theme="dark"] {
  --ur-card: #1c1c1c;
  --ur-tx: #f4f4f2;
  --ur-mu: #a3a39e;
  --ur-tx: #f4f4f2;
  --ur-line: #2c2c2c;
  --ur-line: #2c2c2c;
  --ur-row: #242424;
  --ur-sheet-close-bg: #333333;
  --ur-tx: #f4f4f2;
  --ur-card: #1c1c1c;
  --ur-line: #2c2c2c;
  --ur-field-placeholder: #6a6a64;
  --ur-overlay: rgba(0, 0, 0, 0.62);
  --ur-row: #242424;
  --ur-tx: #f4f4f2;
  --ur-warn-bg: #3d2a12;
  --ur-warn-fg: #ffd7a8;
  --ur-cta-icon-bg: var(--ur-accent-ink);
  --ur-cta-icon-fg: var(--ur-accent);
  --ur-link: var(--ur-accent);
}

/* Sem tema no html nem na folha: escuro (checkout atual). */
html:not([data-ur-theme]) .ur-sheet:not([data-ur-theme]) {
  --ur-card: #1c1c1c;
  --ur-tx: #f4f4f2;
  --ur-mu: #a3a39e;
  --ur-tx: #f4f4f2;
  --ur-line: #2c2c2c;
  --ur-line: #2c2c2c;
  --ur-row: #242424;
  --ur-sheet-close-bg: #333333;
  --ur-tx: #f4f4f2;
  --ur-card: #1c1c1c;
  --ur-line: #2c2c2c;
  --ur-field-placeholder: #6a6a64;
  --ur-overlay: rgba(0, 0, 0, 0.62);
  --ur-row: #242424;
  --ur-tx: #f4f4f2;
  --ur-warn-bg: #3d2a12;
  --ur-warn-fg: #ffd7a8;
  --ur-cta-icon-bg: var(--ur-accent-ink);
  --ur-cta-icon-fg: var(--ur-accent);
  --ur-link: var(--ur-accent);
}

.ur-sheet,
.ur-sheet .modal-title,
.ur-sheet .ur-sheet__title,
.ur-sheet .ur-sheet__body,
.ur-sheet .ur-sheet__alt,
.ur-sheet .ur-field,
.ur-sheet .ur-field__label,
.ur-sheet .ur-field__hint,
.ur-sheet .ur-field__input,
.ur-sheet .form-control,
.ur-sheet .btn,
.ur-sheet .ur-cta,
.ur-sheet .ur-cta__title,
.ur-sheet .ur-cta__sub,
.ur-sheet .ur-cta__value,
.ur-sheet .ur-notice,
.ur-sheet .ur-check,
.ur-sheet .ur-check__text,
.ur-sheet .ur-safe,
.ur-sheet .ur-user,
.ur-sheet .ur-user__text,
.ur-sheet h5,
.ur-sheet label,
.ur-sheet input,
.ur-sheet button,
.ur-sheet a,
.ur-sheet p,
.ur-sheet small {
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ur-sheet {
  color: var(--ur-tx);
}

.ur-drawer {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
}

.ur-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.ur-drawer__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: #000;
  opacity: 0.55;
  cursor: pointer;
}

body.ur-drawer-open {
  overflow: hidden;
}

.ur-drawer .ur-drawer__dialog,
.ur-sheet .ur-sheet__dialog {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  transform: translate3d(0, 100%, 0);
  transition: transform 0.32s ease-out;
}

.ur-drawer.is-open .ur-drawer__dialog,
.ur-drawer.is-open .ur-sheet__dialog {
  transform: none;
}

.ur-sheet__content,
.ur-sheet .modal-content {
  background: var(--ur-card) !important;
  color: var(--ur-tx);
  border: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ur-sheet__handle {
  width: 42px;
  height: 4px;
  min-width: 42px;
  min-height: 4px;
  max-width: 42px;
  max-height: 4px;
  border-radius: 9px;
  background: var(--ur-line);
  margin: 8px auto 2px;
  flex: none;
  display: block;
  align-self: center;
}

.ur-sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px 10px;
  flex: none;
  border: 0;
  background: transparent;
}

.ur-sheet__title,
.ur-sheet .modal-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ur-tx) !important;
}

.ur-sheet__close.btn-close,
.ur-sheet .ur-sheet__close,
.ur-sheet button.btn-close.ur-sheet__close {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box !important;
  background: var(--ur-sheet-close-bg) !important;
  background-image: none !important;
  color: var(--ur-tx) !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  box-shadow: none !important;
  filter: none !important;
  display: grid !important;
  place-items: center;
  flex: none;
  overflow: hidden;
}

.ur-sheet__close::before,
.ur-sheet__close::after {
  display: none !important;
  content: none !important;
}

.ur-sheet__close .ph {
  font-size: 14px;
  line-height: 1;
  color: var(--ur-tx) !important;
}

.ur-sheet__body {
  overflow-y: auto;
  padding: 0 14px 16px !important;
  display: grid;
  gap: 10px;
}

/* Campo */
.ur-field {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.ur-field__label {
  margin: 0;
  color: var(--ur-tx);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.ur-field__hint {
  margin: -2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--ur-mu);
}

.ur-field__box {
  border: 1.5px solid var(--ur-line);
  border-radius: 10px;
  padding: 0 12px;
  min-height: 46px;
  background: var(--ur-card);
  color: var(--ur-tx);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ur-field__box:focus-within {
  border-color: var(--ur-tx);
}

.ur-field__input,
.ur-sheet .ur-field__input.form-control,
.ur-sheet .app-form .ur-field__input.form-control {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 44px !important;
  min-height: 44px;
  padding: 11px 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--ur-tx) !important;
  caret-color: var(--ur-tx);
}

.ur-field__input::placeholder {
  color: var(--ur-field-placeholder) !important;
  opacity: 1;
}

.ur-field__prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--ur-mu);
}

.ur-field__prefix .ur-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.ur-field__prefix .ur-flag svg {
  display: block;
  width: 22px;
  height: 22px;
}

.ur-field__prefix .ph-caret-down {
  font-size: 11px;
}

.ur-field__sep {
  width: 1px;
  height: 18px;
  background: var(--ur-line);
}

.ur-field__state {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ur-field__state--ok {
  color: var(--ur-ok);
}

.ur-field__state--error {
  color: #dc2626;
}

/* CTA */
.ur-cta,
.ur-sheet button.ur-cta,
.ur-sheet button.ur-cta.btn-success,
#loginModal button.ur-cta[type="submit"],
#modal-checkout .ur-cta,
#place_order.ur-cta,
body.sp-mode #loginModal button.ur-cta[type="submit"],
body.sp-mode #place_order.ur-cta {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 14px 16px !important;
  background: var(--ur-accent) !important;
  background-image: none !important;
  color: var(--ur-accent-ink) !important;
  text-align: left;
  box-shadow: none !important;
  animation: none !important;
  min-height: 0;
}

.ur-cta:hover,
.ur-cta:focus,
.ur-cta:active,
#loginModal button.ur-cta[type="submit"]:hover,
#place_order.ur-cta:hover {
  background: var(--ur-accent-hover) !important;
  color: var(--ur-accent-ink) !important;
  filter: none !important;
}

.ur-cta *,
.ur-cta:hover * {
  color: inherit;
}

.ur-cta__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ur-cta-icon-bg);
  color: var(--ur-cta-icon-fg) !important;
  display: grid;
  place-items: center;
  flex: none;
}

.ur-cta__icon .ph,
.ur-cta__icon * {
  color: var(--ur-cta-icon-fg) !important;
  font-size: 16px;
  line-height: 1;
  border: 0 !important;
  width: auto;
  height: auto;
}

.ur-cta__copy {
  display: block;
  min-width: 0;
}

.ur-cta__title,
.ur-cta b,
.ur-cta__copy .ur-cta__title {
  display: block;
  font-size: 16px;
  line-height: 18px;
  font-weight: 700;
  color: var(--ur-accent-ink) !important;
}

.ur-cta__sub {
  display: block;
  font-size: 12px;
  line-height: 16px;
  opacity: 0.8;
  font-weight: 500;
  color: var(--ur-accent-ink) !important;
}

.ur-cta__value,
.ur-cta .tot {
  font-size: 14px;
  font-weight: 700;
  color: var(--ur-accent-ink) !important;
  white-space: nowrap;
}

.ur-cta__value[hidden] {
  display: none !important;
}

/* Checkbox */
.ur-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
  align-items: start;
  color: var(--ur-tx);
}

.ur-check__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--ur-accent);
  color: var(--ur-accent-ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.ur-check__box .ph {
  font-size: 11px;
  line-height: 1;
  color: inherit;
}

.ur-check__link,
.ur-check a,
.ur-sheet .ur-check a {
  color: var(--ur-link) !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Rodapé seguro */
.ur-safe {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  color: var(--ur-mu);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.ur-safe .ph {
  font-size: 13px;
}

/* Avisos */
.ur-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.ur-notice--info {
  background: var(--ur-row);
  color: var(--ur-tx);
}

.ur-notice--warn,
.ur-sheet #aviso-login .text-danger,
.ur-sheet #aviso-login > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--ur-warn-bg) !important;
  color: var(--ur-warn-fg) !important;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.ur-notice .ph {
  font-size: 16px;
  flex: none;
  margin-top: 1px;
}

.ur-notice[hidden] {
  display: none !important;
}

.ur-sheet #aviso-login:empty {
  display: none;
}

.ur-sheet #aviso-login:not(:empty) + .ur-co-warn-placeholder {
  display: none;
}

.ur-sheet__alt,
.ur-sheet__alt a {
  /* Reset do botão nativo: o .btn-link do Bootstrap fazia isto, e a campanha
     em documento próprio carrega só o JS dele — sem este reset o "Criar
     conta" saía como uma barra cinza do navegador, em qualquer modelo. */
  background: transparent;
  border: 0;
  color: var(--ur-mu) !important;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
}

.ur-sheet__alt {
  padding: 2px 0 0;
}

.ur-sheet__actions {
  display: grid;
  gap: 4px;
}

@media (min-width: 768px) {
  .ur-drawer .ur-drawer__dialog,
  .ur-sheet .ur-sheet__dialog {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }
}
