/* Produto e recursos: complemento do Master existente. Carregar depois de master.css. */

#vps-cadastro.vps-cadastro {
  width: min(1100px, 94vw);
  height: 90dvh;
  max-height: 90dvh;
}

#vps-cadastro #vps-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

#vps-cadastro #vps-form > :is(.vps-cadastro-head, .vps-cadastro-tabs, .vps-cadastro-feedback, .vps-submit) {
  flex: none;
}

#vps-cadastro .vps-cadastro-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
}

#vps-cadastro .vps-cadastro-body > .vps-fields {
  flex: none;
}

#vps-cadastro .vps-produto-escolha {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#vps-cadastro .vps-produto-escolha > legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

#vps-cadastro .vps-produto-opcoes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

#vps-cadastro .vps-produto-opcao {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 88px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) > input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--navy);
  box-shadow: none;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}

#vps-cadastro .vps-produto-opcao:has(input:checked) {
  border-color: var(--navy-3);
  background: #eef3f9;
}

#vps-cadastro .vps-produto-opcao:hover:not(:has(input:disabled)) {
  border-color: var(--navy-3);
  background: var(--surface-2);
}

#vps-cadastro .vps-produto-opcao:has(input:checked):hover:not(:has(input:disabled)) {
  background: #eef3f9;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label):has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) > input:focus-visible {
  outline: none;
  box-shadow: none;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label):has(input:disabled) {
  opacity: 1;
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label):has(input:disabled) strong {
  color: var(--ink-2);
}

#vps-cadastro :is(.vps-produto-opcao, .vps-web-access, .vps-feature-options > label) > input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

#vps-cadastro :is(#vps-produto-ajuda, #vps-produto-status) {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#vps-cadastro #vps-produto-status:empty {
  display: none;
}

#vps-cadastro .vps-produto-escolha > #vps-produto-status {
  margin-top: 12px;
}

#vps-cadastro .vps-web-access {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin-top: 16px;
  padding: 12px 4px;
  border-block: 1px solid var(--line);
  cursor: pointer;
}

#vps-cadastro .vps-web-access:hover:not(:has(input:disabled)) {
  background: var(--surface-2);
}

#vps-cadastro #vps-produto-status[data-error="true"] {
  color: var(--danger);
  font-weight: 600;
}

#vps-cadastro #vps-produto-migracao {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}

#vps-cadastro #vps-produto-migracao > p {
  flex: 1 1 320px;
  max-width: 72ch;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

#vps-cadastro #vps-ver-troca {
  flex: none;
  white-space: normal;
}

#vps-cadastro .vps-feature-section {
  min-width: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

#vps-cadastro .vps-feature-section > h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

#vps-cadastro .vps-feature-section > p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#vps-cadastro .vps-permissoes.vps-feature-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#vps-cadastro .vps-feature-options > legend:not(.sr-only) {
  padding: 0 0 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

#vps-cadastro .vps-feature-options > label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#vps-cadastro .vps-feature-options > label:has(input:checked) {
  border-color: var(--line);
  background: transparent;
  box-shadow: none;
}

#vps-cadastro .vps-feature-options > label:hover:not(:has(input:disabled)) {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

#vps-cadastro .vps-feature-options > small {
  grid-column: 1 / -1;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

#vps-cadastro .vps-feature-details {
  border: 0;
  border-block: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#vps-cadastro .vps-feature-details > summary {
  min-height: 50px;
  padding: 16px 0;
  border-radius: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

#vps-cadastro .vps-feature-details[open] > summary {
  border-bottom: 0;
  border-radius: 0;
}

#vps-cadastro .vps-feature-details > :not(summary) {
  margin: 0 0 16px;
}

#vps-cadastro .vps-feature-details > .vps-feature-section {
  padding-top: 0;
  border-top: 0;
}

#vps-cadastro .vps-feature-details > .vps-feature-section + .vps-feature-section {
  margin-top: 24px;
}

#vps-cadastro #vps-modo-pdv {
  margin-top: 16px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#vps-cadastro .vps-produto-resumo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 16px;
  border-block: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

#vps-cadastro .vps-produto-resumo strong {
  color: var(--ink);
  font-weight: 700;
}

#vps-cadastro .vps-produto-resumo > h3 {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

#vps-cadastro .vps-produto-resumo > p {
  flex: 1 1 320px;
  max-width: 72ch;
}

.vps-product-label {
  display: inline-block;
  max-width: 100%;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  #vps-cadastro .vps-produto-opcoes,
  #vps-cadastro .vps-permissoes.vps-feature-options {
    grid-template-columns: minmax(0, 1fr);
  }

  #vps-cadastro .vps-produto-opcao {
    min-height: 0;
    padding: 12px;
  }
}

@media (max-width: 600px) {
  #vps-cadastro.vps-cadastro {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  #vps-cadastro .vps-cadastro-body {
    padding: 16px;
  }

  #vps-cadastro .vps-submit {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  #vps-cadastro #vps-ver-troca {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #vps-cadastro .vps-produto-opcao {
    transition: none;
  }
}
