/* ===========================================================
   FTI — Modal do WhatsApp + campos do formulario
   Arquivo: /views/assets/css/fti-zap.css
   Versão: 1.0.0 (28/10/2026)
   -----------------------------------------------------------
   Por que este arquivo existe:
   o mini-form do WhatsApp era montado por JavaScript e nao
   tinha NENHUM estilo proprio. Os campos caíam com o visual
   nativo do navegador: sem rotulo, sem respiro, colados um no
   outro. Este arquivo da a eles a mesma linguagem do
   formulario de cotacao (borda de 2px, raio 8, padding 13/16).
   =========================================================== */

/* ---------- estrutura do modal ---------- */
.fti-zap-box {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
}

.fti-zap-modal.fti-open .fti-zap-box {
  overflow: hidden;
}

/* a lista de assuntos rola se nao couber na tela */
.fti-zap-modal.fti-open .fti-zap-box > .fti-zap-opt {
  flex: 0 0 auto;
}

.fti-zap-box { overflow-y: auto; }

/* ---------- cabecalho ---------- */
.fti-zap-head { padding: 20px 22px; position: relative; }
.fti-zap-head strong { color: #fff; font-size: 17px; display: block; line-height: 1.3; }
.fti-zap-head span { color: rgba(255,255,255,.92); font-size: 13px; display: block; margin-top: 3px; line-height: 1.35; }

/* botao voltar do mini-form fica no canto, como o de fechar */
#ftiZapFormBack {
  position: absolute;
  top: 12px;
  right: 14px;
}

/* ---------- corpo do mini-form ---------- */
.fti-zap-body {
  padding: 20px 22px 22px;
  background: #fff;
}

.fti-zf-field {
  margin-bottom: 16px;
}

.fti-zf-field:last-of-type {
  margin-bottom: 0;
}

.fti-zf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 6px;
  letter-spacing: .1px;
}

.fti-zf-field input,
.fti-zf-field select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #e5e2dd;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #2c2c2c;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}

.fti-zf-field input::placeholder {
  color: #a5a5a5;
}

.fti-zf-field input:focus,
.fti-zf-field select:focus {
  outline: none;
  border-color: #e0660b;
  box-shadow: 0 0 0 3px rgba(224, 102, 11, .12);
}

/* seta propria no select (o nativo some com o appearance:none) */
.fti-zf-field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23777' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.fti-zf-field select:invalid,
.fti-zf-field select option[value=""] {
  color: #a5a5a5;
}

/* ---------- erro ---------- */
.fti-zf-erro {
  background: #fdecea;
  border-left: 3px solid #c0392b;
  color: #a3281c;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 0 0 14px;
}

/* ---------- botao enviar ---------- */
.fti-zf-enviar {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  padding: 14px 18px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background .18s, transform .1s;
  margin-top: 20px;
}

.fti-zf-enviar:hover { background: #1eb958; }
.fti-zf-enviar:active { transform: scale(.985); }

.fti-zf-enviar strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
}

.fti-zf-enviar small {
  display: block;
  font-size: 12.5px;
  opacity: .92;
  margin-top: 2px;
  font-weight: 400;
}

/* ---------- aviso de privacidade ---------- */
.fti-zf-lgpd {
  font-size: 11.5px;
  color: #8e8e8e;
  text-align: center;
  line-height: 1.4;
  margin: 12px 0 0;
}

/* ---------- celular ---------- */
@media (max-width: 420px) {
  .fti-zap-modal { padding: 12px; }
  .fti-zap-head { padding: 18px 18px; }
  .fti-zap-body { padding: 18px 18px 20px; }
  .fti-zap-head strong { font-size: 16px; }
  .fti-zf-field input,
  .fti-zf-field select { font-size: 16px; } /* 16px evita o zoom automatico do iOS */
}

/* ---------- teclado aberto no celular ---------- */
@media (max-height: 520px) {
  .fti-zap-box { max-height: calc(100vh - 16px); }
  .fti-zap-head { padding: 14px 18px; }
  .fti-zap-head span { display: none; }
}
/* ===========================================================
   FTI — campo de Serviço no formulário de cotação
   Acrescentar no FIM do arquivo /views/assets/css/fti-zap.css
   Versão: 1.2.0 (28/10/2026)
   -----------------------------------------------------------
   POR QUE ESTE TRECHO EXISTE

   O site aplica o plugin "niceSelect" em TODO <select> da
   página (functions.js). Ele esconde o select original e
   monta um widget próprio, com estilos herdados do template:

     float: left        -> o widget saía do fluxo e o container
                           colapsava (campo colado nos vizinhos)
     width: 175px       -> menos de 1/3 da largura dos outros
     height: 42px       -> diferente dos 53px dos inputs
     font-size: 14px    -> diferente dos 15px
     border: 1px cinza  -> diferente da borda 2px do form
     .list overflow:hidden
                        -> a lista era CORTADA e a opção
                           "Outros" (a última) ficava escondida

   Este bloco devolve ao widget o mesmo desenho dos inputs do
   formulário e faz a lista rolar quando não couber na tela.
   =========================================================== */

/* ---------- caixa do dropdown, igual aos inputs do form ---------- */
.fti-cot-group .nice-select {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 53px !important;
  min-height: 53px !important;
  box-sizing: border-box !important;
  padding: 0 44px 0 16px !important;
  border: 2px solid #e5e2dd !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  font-size: 15px !important;
  font-family: inherit !important;
  color: #001530 !important;
  margin-bottom: 0 !important;
  line-height: normal !important;
  transition: border-color .2s !important;
}

.fti-cot-group .nice-select:hover,
.fti-cot-group .nice-select:focus,
.fti-cot-group .nice-select.open {
  border-color: #e0660b !important;
  outline: none !important;
}

/* texto exibido dentro do campo */
.fti-cot-group .nice-select .current {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  color: #a5a5a5 !important;
  font-weight: 400 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* depois de escolher, o texto fica escuro como os outros campos */
.fti-cot-group .nice-select.has-value .current {
  color: #001530 !important;
  font-weight: 500 !important;
}

/* esconde a setinha original do plugin (que ficava torta) */
.fti-cot-group .nice-select::after {
  display: none !important;
}

/* seta própria, desenhada em CSS, alinhada à direita */
.fti-cot-group .nice-select::before {
  content: "" !important;
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  width: 9px !important;
  height: 9px !important;
  margin-top: -7px !important;
  border-right: 2px solid #8a8a8a !important;
  border-bottom: 2px solid #8a8a8a !important;
  transform: rotate(45deg) !important;
  pointer-events: none !important;
}

.fti-cot-group .nice-select.open::before {
  margin-top: -2px !important;
  transform: rotate(-135deg) !important;
}

/* ---------- lista de opções ---------- */
.fti-cot-group .nice-select .list {
  width: 100% !important;
  left: 0 !important;
  box-sizing: border-box !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  border: 2px solid #e5e2dd !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14) !important;
  z-index: 1000 !important;
  max-height: 244px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

/* quando o campo está muito embaixo, a lista abre para cima */
.fti-cot-group .nice-select.abre-cima .list {
  top: auto !important;
  bottom: calc(100% + 6px) !important;
  margin: 0 0 6px !important;
}

/* ---------- cada opção ---------- */
.fti-cot-group .nice-select .option {
  display: block !important;
  min-height: 40px !important;
  padding: 9px 16px !important;
  line-height: 1.35 !important;
  font-size: 15px !important;
  color: #001530 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.fti-cot-group .nice-select .option:hover,
.fti-cot-group .nice-select .option.focus {
  background: #fff4e8 !important;
}

.fti-cot-group .nice-select .option.selected {
  background: #e0660b !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* a primeira linha (placeholder) fica em cinza dentro da lista */
.fti-cot-group .nice-select .option:first-child {
  color: #8a8a8a !important;
  border-bottom: 1px solid #f0efed !important;
}

/* ---------- celular ---------- */
@media (max-width: 767px) {
  .fti-cot-group .nice-select {
    height: 53px !important;
    min-height: 53px !important;
    font-size: 16px !important;
  }
  .fti-cot-group .nice-select .current { font-size: 16px !important; }
  .fti-cot-group .nice-select .option { font-size: 16px !important; padding: 11px 16px !important; }
  .fti-cot-group .nice-select .list { max-height: 260px !important; }
}
