/* Gaveta da lista de orçamento. */

/* Sem moldura e mais baixo. Com caixa branca e 44px de altura os dois
   botoes do topo somavam 348px — quase a largura da propria busca, que
   e 380. Numa loja o peso fica na busca; as acoes sao compactas. */
/* So o icone, como no topo da Leroy: la as acoes sao tres icones sem
   caixa e sem rotulo, e a busca fica com o espaco. Com texto os dois
   botoes somavam 348px contra 380 da busca — pesavam o mesmo que ela. */
.oc-botao {
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 0;
  background: none; color: var(--texto);
  transition: color .18s;
}
.oc-botao:hover { color: var(--laranja-forte); }
.oc-botao[data-cheio="true"] { color: var(--laranja-forte); }

/* O numero encosta no canto do icone, que e onde se procura por ele. */
.oc-conta {
  position: absolute; top: 2px; right: 0;
}
.oc-botao svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.oc-conta {
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--laranja); color: #fff;
  border-radius: 999px; font-size: .7rem; font-weight: 700;
}

.gaveta {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(480px, 100%);
  background: var(--papel);
  display: flex; flex-direction: column;
  box-shadow: var(--sombra-alta);
  transform: translateX(100%);
  transition: transform .34s cubic-bezier(.3,.8,.3,1);
}
.gaveta[data-aberto="true"] { transform: none; }

.oc-topo {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--linha);
}
.oc-topo h2 { font-size: 1.5rem; margin-right: auto; }

/* Botão de fechar: definido aqui para a gaveta não depender de painel.css */
.oc-topo .painel-fechar {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--linha); border-radius: 999px; background: #fff;
  transition: border-color .16s, background .16s, color .16s;
}
.oc-topo .painel-fechar:hover { border-color: var(--texto); background: var(--texto); color: #fff; }
.oc-topo .painel-fechar svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.oc-limpar {
  border: 0; background: none; color: var(--texto-fraco);
  font-size: .82rem; font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px;
}
.oc-limpar:hover { color: var(--laranja-forte); }

.oc-corpo {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 20px 26px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-content: start;
}

.oc-vazio { padding: 56px 8px; text-align: center; color: var(--texto-medio); }
.oc-vazio strong { display: block; font-variation-settings: "wdth" 118; font-weight: 800; font-size: 1.5rem; color: var(--texto); margin-bottom: 8px; text-transform: uppercase; }
.oc-vazio p { font-size: .92rem; }

.oc-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.oc-item {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  padding: 10px; background: #fff;
  border: 1px solid var(--linha); border-radius: 0;
}
.oc-foto {
  width: 56px; height: 56px; padding: 5px;
  background: var(--nuvem); border-radius: 6px;
  display: grid; place-items: center;
}
.oc-foto img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.oc-info { display: grid; gap: 3px; min-width: 0; }
.oc-nome { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.oc-medida { font-size: .74rem; font-weight: 600; color: var(--laranja-forte); }

.oc-qtd { display: flex; align-items: center; border: 1px solid var(--linha); border-radius: 0; overflow: hidden; }
.oc-qtd button {
  width: 30px; height: 32px; border: 0; background: #fff;
  font-size: 1.05rem; line-height: 1; color: var(--texto-medio);
  transition: background .14s, color .14s;
}
.oc-qtd button:hover { background: var(--nuvem); color: var(--texto); }
.oc-qtd input {
  width: 38px; height: 32px; border: 0; outline: 0;
  text-align: center; font-size: 16px; font-weight: 600;
  -moz-appearance: textfield;
}
.oc-qtd input::-webkit-outer-spin-button,
.oc-qtd input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.oc-tirar {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: none; color: var(--texto-fraco); border-radius: 0;
  transition: background .14s, color .14s;
}
.oc-tirar:hover { background: #FDECEC; color: #C0392B; }
.oc-tirar svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* Formulário */
.oc-form { display: grid; gap: 13px; }
.oc-form h3 {
  font-variation-settings: "wdth" 100; font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--texto-fraco);
}
.campo { display: grid; gap: 5px; }
.campo label { font-size: .82rem; font-weight: 600; color: var(--texto-medio); }
.campo .opcional { font-weight: 400; color: var(--texto-fraco); }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--linha); border-radius: 0;
  background: #fff; font-family: inherit;
  /* 16px evita o zoom automático do Safari no iOS ao focar o campo */
  font-size: 16px; color: var(--texto);
  transition: border-color .16s, box-shadow .16s;
  -webkit-appearance: none; appearance: none;
}
.campo textarea { resize: vertical; min-height: 62px; }
.campo select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A625B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--laranja);
  box-shadow: 0 0 0 3px rgba(240,116,30,.14);
}

.oc-pe {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linha); background: #fff;
  display: grid; gap: 10px;
}
.oc-erro { font-size: .84rem; color: #C0392B; font-weight: 600; }
.oc-enviar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; border: 0; border-radius: 0;
  background: #25D366; color: #fff; font-weight: 600; font-size: 1rem;
  transition: background .18s;
}
.oc-enviar:hover { background: #1FB855; }
.oc-enviar svg { width: 19px; height: 19px; fill: currentColor; }

@media (max-width: 420px) {
  .oc-item { grid-template-columns: 46px minmax(0, 1fr) auto; row-gap: 8px; }
  .oc-qtd { grid-column: 2; }
  .oc-tirar { grid-column: 3; grid-row: 1; align-self: start; }
}

/* Dica sob o campo de cidade: diz que a lista existe antes de a pessoa
   digitar algo fora dela e levar um erro na cara. Aviso barato agora
   evita correção constrangida depois. */
.campo .dica {
  display: block; margin-top: 5px;
  font-size: .72rem; color: var(--texto-fraco);
}
