/* =========================================================
   COTACAO DA ENTREGA
   Bloco principal exibido depois do preenchimento do endereco.
========================================================= */

.cotacao-entrega-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 96px;
  padding: 18px 18px 18px 20px;
  overflow: hidden;
  border: 1px solid #eccfd9;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 12%, rgba(223, 91, 139, 0.08), transparent 32%),
    linear-gradient(135deg, #fffdfd 0%, #fff7fa 100%);
  box-shadow:
    0 9px 24px rgba(101, 50, 61, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Faixa lateral ajuda o cliente a identificar que esta etapa precisa de atenção. */
.cotacao-entrega-box::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  content: "";
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #ed7aa2, #d84f80);
}

.cotacao-entrega-box:hover {
  border-color: #e5b7c7;
  box-shadow:
    0 12px 28px rgba(101, 50, 61, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cotacao-entrega-conteudo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cotacao-entrega-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid #f1d0dc;
  border-radius: 15px;
  color: #c94775;
  background: linear-gradient(145deg, #fff4f7, #ffe9f0);
  box-shadow: 0 7px 16px rgba(196, 79, 120, 0.12);
  font-size: 1.05rem;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.cotacao-entrega-conteudo > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cotacao-entrega-conteudo strong {
  color: #5f2f3a;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.cotacao-entrega-conteudo small {
  max-width: 410px;
  margin-top: 5px;
  color: #89777d;
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Botao principal da cotacao. */
.cotacao-entrega-box > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 205px;
  min-height: 50px;
  padding: 0 22px;
  border: 2px solid #e65a8c;
  border-radius: 999px;
  color: #c94072;
  background: #ffffff;
  box-shadow: 0 7px 17px rgba(223, 91, 139, 0.11);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.cotacao-entrega-box > .btn:hover:not(:disabled) {
  border-color: #d84f80;
  color: #ffffff;
  background: linear-gradient(135deg, #e96b98, #d84f80);
  box-shadow: 0 10px 21px rgba(216, 79, 128, 0.23);
  transform: translateY(-1px);
}

.cotacao-entrega-box > .btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(223, 91, 139, 0.15),
    0 9px 20px rgba(216, 79, 128, 0.16);
}

.cotacao-entrega-box > .btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

/* =========================================================
   ESTADOS DA COTACAO
========================================================= */

.cotacao-entrega-box.calculando {
  border-color: #bfd4ef;
  background:
    radial-gradient(circle at 92% 12%, rgba(71, 126, 199, 0.08), transparent 32%),
    linear-gradient(135deg, #fbfdff, #f1f7ff);
  box-shadow: 0 9px 24px rgba(65, 111, 169, 0.09);
}

.cotacao-entrega-box.calculando::before {
  background: linear-gradient(180deg, #78a7df, #4f80c1);
}

.cotacao-entrega-box.calculando .cotacao-entrega-icone {
  border-color: #c9dcf4;
  color: #477fc4;
  background: #e8f2ff;
  box-shadow: 0 7px 16px rgba(71, 127, 196, 0.13);
  animation: cotacao-entrega-pulso 1.15s ease-in-out infinite;
}

.cotacao-entrega-box.calculando > .btn {
  border-color: #8db3df;
  color: #477fc4;
  background: #ffffff;
  box-shadow: none;
}

.cotacao-entrega-box.sucesso {
  border-color: #a9ddbf;
  background:
    radial-gradient(circle at 92% 12%, rgba(39, 132, 81, 0.08), transparent 32%),
    linear-gradient(135deg, #fbfffc, #effaf4);
  box-shadow: 0 9px 24px rgba(39, 132, 81, 0.09);
}

.cotacao-entrega-box.sucesso::before {
  background: linear-gradient(180deg, #4db97c, #278451);
}

.cotacao-entrega-box.sucesso .cotacao-entrega-icone {
  border-color: #bce5cd;
  color: #278451;
  background: #ddf5e7;
  box-shadow: 0 7px 16px rgba(39, 132, 81, 0.13);
}

.cotacao-entrega-box.sucesso .cotacao-entrega-conteudo strong {
  color: #216c43;
}

.cotacao-entrega-box.sucesso > .btn {
  min-width: 180px;
  border-color: #71bd92;
  color: #277b4c;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 15px rgba(39, 132, 81, 0.09);
}

.cotacao-entrega-box.sucesso > .btn:hover:not(:disabled) {
  border-color: #278451;
  color: #ffffff;
  background: #278451;
  box-shadow: 0 9px 19px rgba(39, 132, 81, 0.2);
}

.cotacao-entrega-box.erro {
  border-color: #efbcbc;
  background:
    radial-gradient(circle at 92% 12%, rgba(177, 60, 60, 0.07), transparent 32%),
    linear-gradient(135deg, #fffdfd, #fff1f1);
  box-shadow: 0 9px 24px rgba(177, 60, 60, 0.08);
}

.cotacao-entrega-box.erro::before {
  background: linear-gradient(180deg, #dc7777, #b13c3c);
}

.cotacao-entrega-box.erro .cotacao-entrega-icone {
  border-color: #efc3c3;
  color: #b13c3c;
  background: #ffe1e1;
  box-shadow: 0 7px 16px rgba(177, 60, 60, 0.11);
}

.cotacao-entrega-box.erro .cotacao-entrega-conteudo strong {
  color: #993737;
}

.cotacao-entrega-box.erro > .btn {
  border-color: #d96f6f;
  color: #a73d3d;
  background: #ffffff;
  box-shadow: 0 6px 15px rgba(177, 60, 60, 0.08);
}

.cotacao-entrega-box.erro > .btn:hover:not(:disabled) {
  border-color: #b13c3c;
  color: #ffffff;
  background: #b13c3c;
  box-shadow: 0 9px 19px rgba(177, 60, 60, 0.18);
}

@keyframes cotacao-entrega-pulso {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 7px 16px rgba(71, 127, 196, 0.12);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(71, 127, 196, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cotacao-entrega-box,
  .cotacao-entrega-box > .btn,
  .cotacao-entrega-icone {
    transition: none;
  }

  .cotacao-entrega-box.calculando .cotacao-entrega-icone {
    animation: none;
  }
}

@media (max-width: 575px) {
  .cotacao-entrega-box {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    padding: 17px;
    border-radius: 17px;
  }

  .cotacao-entrega-box::before {
    top: 0;
    right: 18px;
    bottom: auto;
    left: 18px;
    width: auto;
    height: 4px;
    border-radius: 0 0 999px 999px;
  }

  .cotacao-entrega-conteudo {
    align-items: flex-start;
  }

  .cotacao-entrega-icone {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .cotacao-entrega-conteudo strong {
    font-size: 0.86rem;
  }

  .cotacao-entrega-conteudo small {
    font-size: 0.7rem;
  }

  .cotacao-entrega-box > .btn,
  .cotacao-entrega-box.sucesso > .btn {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }
}

/*
 * Campos confirmados pela consulta do CEP ficam somente para leitura.
 * O numero, o complemento e o ponto de referencia continuam editaveis.
 */
.campo-preenchido-pelo-cep {
  background-color: #f6f1f3 !important;
  color: #67565d !important;
  cursor: not-allowed;
}

.campo-preenchido-pelo-cep:focus {
  border-color: #e7cfd8;
  box-shadow: none;
}

/* =========================================================
   RESUMO COMPACTO DENTRO DO MODAL
========================================================= */

.resumo-modal-pedido {
  margin-top: 4px;
  padding: 20px;
  border: 1px solid #edd8df;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fff8fa);
}

.resumo-modal-cabecalho {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.resumo-modal-etapa {
  display: block;
  margin-bottom: 3px;
  color: #df5b8b;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.resumo-modal-cabecalho h3 {
  margin: 0;
  color: #65323d;
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.resumo-modal-quantidade {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #a14a69;
  border: 1px solid #efd4de;
  border-radius: 999px;
  background: #fff1f5;
  font-size: 0.68rem;
  font-weight: 700;
}

.resumo-modal-itens {
  display: grid;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eadde1;
}

.resumo-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.resumo-modal-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.resumo-modal-item strong {
  color: #61484f;
  font-size: 0.78rem;
}

.resumo-modal-item > strong {
  flex: 0 0 auto;
}

.resumo-modal-item small {
  margin-top: 2px;
  color: #9b898f;
  font-size: 0.66rem;
}

.resumo-modal-vazio {
  margin: 0;
  color: #9b898f;
  font-size: 0.75rem;
}

.resumo-modal-valores {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.resumo-modal-valores > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #806e74;
  font-size: 0.75rem;
}

.resumo-modal-valores strong {
  color: #654f56;
  white-space: nowrap;
}

.resumo-modal-valores .resumo-modal-total {
  margin-top: 4px;
  padding-top: 11px;
  color: #65323d;
  border-top: 1px solid #eadde1;
  font-size: 0.9rem;
  font-weight: 700;
}

.resumo-modal-total strong {
  color: #df5b8b;
  font-size: 1.1rem;
}

@media (max-width: 575px) {
  .resumo-modal-pedido {
    padding: 16px;
  }

  .resumo-modal-cabecalho h3 {
    font-size: 1.1rem;
  }
}