/* A proposta: o botão na barra, a gaveta com as linhas e os totais, o formulário. Por cima de tudo, até do detalhe. */

.proposta-botao {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; margin-left: 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .3);
  font: 500 11px 'Roboto', 'Segoe UI', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fff; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.proposta-botao b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 99px; background: rgba(255, 255, 255, .15); font-size: 11px; letter-spacing: 0; }
.proposta-botao.cheio { border-color: #7be0ae; }
.proposta-botao.cheio b { background: #7be0ae; color: #150c17; }
.proposta-botao:hover { background: rgba(255, 255, 255, .08); }
.proposta-botao:focus-visible { outline: 2px solid #f06be0; outline-offset: 2px; }

/* as cores da proposta valem também na pergunta depois de adicionar (está fora da gaveta): sem elas, o botão
   «Fechar pedido de orçamento» ficava sem o verde */
.proposta, .pergunta {
  --p-papel: #f3efe9; --p-noite: #0d070f; --p-verde: #7be0ae; --p-rosa: #f06be0; --p-saida: cubic-bezier(.16, 1, .3, 1);
}
.proposta {
  position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end;
  background: rgba(13, 7, 15, 0); transition: background .35s;
  color: var(--p-papel); font: 14px/1.5 'Roboto', 'Segoe UI', system-ui, sans-serif;
}
.proposta[hidden] { display: none; }
.proposta.aberta { background: rgba(13, 7, 15, .55); }
.p-caixa {
  width: min(560px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 28px 28px; background: rgba(20, 11, 23, .92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(243, 239, 233, .12); box-shadow: -30px 0 80px rgba(0, 0, 0, .4);
  transform: translateX(100%); transition: transform .35s var(--p-saida);
}
.proposta.aberta .p-caixa { transform: none; }
.proposta .p-topo { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 72px; background: inherit; margin: 0 -28px 8px; padding: 0 28px; border-bottom: 1px solid rgba(243, 239, 233, .12); }
.proposta .p-topo h2 { font: 400 26px/1 'Designer', sans-serif; }
.p-fechar { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .26em; text-transform: uppercase; }
.p-fechar i { font-style: normal; font-size: 20px; letter-spacing: 0; }
.p-vazio { padding: 48px 0; text-align: center; opacity: .75; }

.p-linhas { list-style: none; padding: 0; margin: 0; }
.p-linhas li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(243, 239, 233, .1); }
.p-linhas li.fora { opacity: .55; }
.p-linhas img, .p-sem-foto { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: rgba(243, 239, 233, .08); }
.p-info { display: grid; gap: 2px; min-width: 0; }
.p-info b { font: 400 15px/1.2 'Designer', sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.p-info span { font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; }
.p-cor { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); vertical-align: -1px; }
.p-preco { opacity: 1 !important; }
.p-cor.sem-tom { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .6) 0 2px, rgba(255, 255, 255, .15) 2px 4px); }
.p-preco.a-calcular { opacity: .55 !important; }
.p-totais small { font-size: 11px; opacity: .7; margin-left: 4px; }
.p-preco b { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.p-analisar { font-style: normal; font-size: 12px; color: var(--p-verde); }
.p-qtd { display: grid; gap: 2px; justify-items: center; text-align: center; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.p-qtd input { width: 76px; text-align: center; font-family: inherit; font-size: 15px; font-weight: 300; color: var(--p-papel); background: rgba(243, 239, 233, .06); border: 1px solid rgba(243, 239, 233, .25); border-radius: 8px; padding: 6px 8px; }
.p-tirar { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; font-size: 18px; opacity: .7; }
.p-tirar:hover { opacity: 1; background: rgba(243, 239, 233, .08); }

.p-totais { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 20px 0 12px; font-variant-numeric: tabular-nums; }
.p-totais dt { opacity: .75; }
.p-totais dd { text-align: right; }
.p-totais .forte { opacity: 1; font-size: 17px; font-weight: 500; padding-top: 6px; border-top: 1px solid rgba(243, 239, 233, .2); }
.p-nota { font-size: 12px; opacity: .7; margin: 8px 0; }
.p-nota.atencao { color: var(--p-verde); opacity: 1; }
.p-acoes { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 20px; }
.p-principal, .p-sec { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 0 20px; border-radius: 14px; font: 500 11px 'Roboto', sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.p-principal { flex: 1; background: var(--p-verde); color: var(--p-noite); }
.p-principal:disabled { opacity: .4; cursor: not-allowed; }
.p-sec { border: 1px solid rgba(243, 239, 233, .3); }
.p-principal:focus-visible, .p-sec:focus-visible, .p-tirar:focus-visible, .p-fechar:focus-visible { outline: 2px solid var(--p-rosa); outline-offset: 2px; }

.p-form { display: grid; gap: 14px; }
.p-form label { display: grid; gap: 6px; font-size: 12px; letter-spacing: .06em; }
.p-form small { opacity: .65; letter-spacing: 0; }
.p-form input:not([type=checkbox]):not([type=file]) { font-family: inherit; font-size: 15px; color: var(--p-papel); background: rgba(243, 239, 233, .06); border: 1px solid rgba(243, 239, 233, .25); border-radius: 10px; padding: 11px 12px; }
.p-form input:focus { outline: none; border-color: var(--p-verde); }
.p-form input[type=file] { font-size: 13px; color: rgba(243, 239, 233, .75); }
.p-caixa-ok { grid-template-columns: auto 1fr !important; align-items: start; letter-spacing: 0 !important; font-size: 13px !important; }
.p-caixa-ok input { width: 18px; height: 18px; accent-color: var(--p-verde); margin-top: 2px; }
.p-caixa-ok a { color: var(--p-verde); }
.p-armadilha { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.p-erro { color: var(--p-rosa); font-size: 13px; }
.p-feito { padding: 32px 0; text-align: center; }
.p-numero { font: 400 30px/1.2 'Designer', sans-serif; letter-spacing: .04em; color: var(--p-verde); margin-bottom: 12px; }

/* a pergunta depois de adicionar: fechar o pedido, ou continuar a explorar */
.pergunta { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px;
  background: rgba(13, 7, 15, .6); opacity: 0; transition: opacity .25s;
  color: #f3efe9; font: 14px/1.5 'Roboto', 'Segoe UI', system-ui, sans-serif; }
.pergunta[hidden] { display: none; }
.pergunta.aberta { opacity: 1; }
.q-caixa { width: min(460px, 100%); padding: 28px; border-radius: 18px; background: rgba(20, 11, 23, .96);
  border: 1px solid rgba(243, 239, 233, .14); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); text-align: center;
  transform: translateY(14px) scale(.98); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.pergunta.aberta .q-caixa { transform: none; }
.q-sobre { color: #7be0ae; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
.q-caixa h2 { font: 400 30px/1.1 'Designer', sans-serif; margin: 10px 0; }
.q-texto { opacity: .8; }
.q-caixa .p-acoes { margin-top: 22px; }
.q-caixa .p-principal, .q-caixa .p-sec { flex: 1 1 180px; }

@media (max-width: 560px) {
  .p-caixa { padding: 0 16px 20px; }
  .proposta .p-topo { margin: 0 -16px 8px; padding: 0 16px; }
  .p-linhas li { grid-template-columns: 48px 1fr auto; grid-template-areas: "f i x" "f q q"; }
  .p-linhas img, .p-sem-foto { width: 48px; height: 48px; grid-area: f; align-self: start; }
  .p-info { grid-area: i; }
  .p-qtd { grid-area: q; grid-template-columns: auto auto; justify-content: start; justify-items: start; align-items: center; gap: 8px; }
  .p-tirar { grid-area: x; align-self: start; }
  .proposta-botao { padding: 0 10px; margin-left: 8px; }
}
@media (prefers-reduced-motion: reduce) { .p-caixa, .proposta { transition: none; } }
