* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
  text-align: center;
}

body { 
  font-family: Arial, sans-serif; 
  background-color: #f5f5f5; 
  font-size: clamp(14px, 8vmin, 50px); 
  color: black;
}

/*ESTRUTURA*/
header, footer, .container-header { 
  background-color: #007bff; 
  color: #fff; 
}

header { 
  font-size: clamp(14px, 3vmin, 20px); 
  padding: 1vmin 0; 
  text-align: center; 
  justify-content: center; 
  width: 100%;  
}

main { 
  max-width: 100%; 
  margin: 0 auto; 
  padding-bottom: 6vmin;
}

footer { 
  text-align: center;  
  padding: 3vmin 2vmin 6vmin 2vmin; 
  margin-top: 4vmin;
  font-size: clamp(12px, 2.2vmin, 18px); 
}

/* === FULLSCREEN === */
.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1000;
  padding: clamp(10px, 5vw, 40px);
  box-shadow: 0 0 clamp(4px, 2vw, 20px) rgba(0, 0, 0, 0.5);
  overflow: auto;
  border: none; /* garante borda invisível caso exista */
}

.fullscreen summary {
  margin: 0 auto;
  display: block;
  font-size: clamp(16px, 5vmin, 40px); /* segue escala atualizada */
}

/*BOTÕES GERAIS*/
button, 
.btn-diminuir, 
.btn-aumentar, 
.btn-resetar, 
#btn-fullscreen { 
  font-weight: bold; 
  font-size: clamp(14px, 3vmin, 20px); 
  padding: 2vmin 0; 
  border: none; 
  border-radius: 4vmin; 
  cursor: pointer; 
  margin: 0; 
  background-color: white; 
  color: black; 
  transition: 0.3s; 
}

.btn-sugestao {
  background-color: #007bff;
  color: white;
  width: auto;
  padding: 2vmin 6vmin;
  margin-bottom: 2vmin;
  border-radius: 8vmin;
  font-size: clamp(13px, 6vmin, 30px);
}

.btn-diminuir, .btn-aumentar, .btn-resetar { 
  width: clamp(70px, 24vmin, 120px); 
}

.btn-diminuir:hover, 
.btn-aumentar:hover, 
.btn-resetar:hover { 
  background-color: gray; 
}

#btn-fullscreen { 
  width: clamp(90px, 30vmin, 150px); 
  display: inline-block; 
  white-space: nowrap;
}

#btn-darkmode {
  padding: 0 5vmin;
  width: auto;
  border: 2px solid black;
}

/*TEXTOS*/
ul li, ol li { margin-bottom: 0.5em; }
p { margin-bottom: 0.6em; }

p.h4 {
  font-size: clamp(14px, 8vmin, 50px);
  font-weight: bold;
  text-align: center;
}

p.h5 {
  font-size: clamp(13px, 7vmin, 40px);
  font-weight: bold;
  text-align: center;
}

p.h6 {
  font-size: clamp(12px, 6vmin, 30px);
  font-weight: bold;
  text-align: center;
}

/*LAYOUTS*/
.main { 
  padding: 2vmin 0; 
  max-width: 100%; 
  display: block; 
}

.container-botoes, .container-header { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
}

.container-botoes { 
  gap: 1.5vmin; 
  padding: 0; 
  background-color: #fff; 
  border-radius: 2vmin; 
}

.container-header { 
  gap: 2vmin; 
  padding: 1vmin 2vmin; 
}

/*SEÇÕES*/
.azul, .verde, .transparente { 
  padding: 0 2vmin; 
  border: 0.5vmin solid black; 
  border-radius: 2vmin; 
  margin: 5vmin 0; 
  width: 100%; 
  position: relative; 
}

.azul { 
  background-color: #007bff; 
  color: white; 
}

.verde { 
  background-color: #3FF527; 
  color: black; 
}

.transparente { 
  background-color: transparent; 
  color: black; 
}

.transparente p {
  margin: 0; 
}

.com-label { padding-top: 2vmin; }

.label { 
  position: absolute; 
  top: -2.5vmin; 
  left: 4vmin; 
  background-color: inherit; 
  color: white; 
  font-size: clamp(14px, 8vmin, 50px); 
  padding: 0 2vmin; 
  font-weight: bold; 
  border-radius: 1vmin; 
}

.verde .label { color: black; }

/* BOTÕES CIRCULARES */
.nova-secao {
  margin: 3rem 0;
  text-align: center;
}

.botoes-circulares {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.app-btn {
  text-align: center;
  text-decoration: none;
  width: 100px;
  color: #000000;
}

/* CÍRCULO */
.circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid black;
  background-color: #d0d0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.45rem auto;
  transition: transform 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* ÍCONES DENTRO DO CÍRCULO (proporcional e centralizado) */
.circle img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  pointer-events: none; /* evita atrapalhar clique no link */
}

.icon-nao {
  width: 55% !important;
  height: 55% !important;
}

/* LETRAS CENTRALIZADAS */
.circle .letra {
  font-size: clamp(20px, 12vmin, 70px);
  font-weight: bold;
  line-height: 1;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black !important;
}

.app-btn span {
  display: block;
  font-size: clamp(10px, 2.4vmin, 16px);
  line-height: 1;
}

.app-btn:hover .circle {
  transform: scale(1.05);
  border-color: #1e90ff;
}

/* === MODO ESCURO === */
body.dark-mode {
  background-color: black;
  color: white;
}

body.dark-mode a {
  color: white;
}

body.dark-mode a:hover {
  color: #ddd;
}

body.dark-mode .azul {
  background-color: #0033CC;
  color: white;
}

body.dark-mode .verde {
  background-color: #006600;
  color: white;
}

body.dark-mode .transparente {
  background-color: #000000;
  color: white;
  border-color: white;
}

body.dark-mode .verde .label {
  color: white;
}

body.dark-mode .circle {
  border-color: #007bff !important;
}

body.dark-mode .circle .letra {
  color: black !important;
}

/* Botões no modo escuro (mantém legibilidade) */
body.dark-mode button,
body.dark-mode .btn-diminuir,
body.dark-mode .btn-aumentar,
body.dark-mode .btn-resetar,
body.dark-mode #btn-fullscreen,
body.dark-mode #btn-darkmode {
  background-color: black;
  color: white;
  border: 1px solid white;
}

body.dark-mode .btn-sugestao {
  background-color: #007bff;
  color: white;
  border: none;
}

body.dark-mode button:hover {
  background-color: #333;
}

/* MODAL OVERLAY */
.modal-overlay {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,0.65);
  justify-content:center; align-items:center;
  z-index:999;
}

/* MODAL */
.modal {
  background:white;
  width:90%;
  max-width:650px;
  border-radius:18px;
  padding:30px;
  animation:zoomIn .25s ease;
  text-align:center;
  color: black;
}

@keyframes zoomIn {
  from { transform:scale(0.8); opacity:0; }
  to { transform:scale(1); opacity:1; }
}

/* CAMPO DO MODAL */
.modal input, .modal textarea {
  width:100%;
  padding:14px;
  border-radius:10px;
  border:2px solid #000;
  margin-top:15px;
  font-size:17px;
  color: black;
  background: white;
}

/* BOTÕES MODAL */
.modal button {
  margin-top:15px;
  width:100%; padding:14px;
  border:none; border-radius:8px;
  font-weight:bold; font-size:17px;
}

.btnSalvar { background:#007bff; color:white; }
.btnCancelar { background:#444; color:white; }

/* HISTÓRICO */
#historico {
  background:white; border-radius:10px; padding:10px;
  border:1px solid #bbb; margin-top:10px; display:none;
  text-align:left; font-size:15px;
}
#historico p { margin:5px 0; }

/* ERRO: campo vazio - destaque (funciona em claro e escuro) */
.campo-erro {
  animation: piscar 0.25s ease-in-out 2;
  border-color: red !important;
}
@keyframes piscar {
  0%,100% { background: inherit; }
  50% { background: #ffbfbf; }
}


/* === DETALHES E RESUMO (summary/details) === */

summary {
  width: 100%;
  display: block;
  background-color: #007bff;
  font-size: clamp(14px, 5vmin, 40px);
  font-weight: bold;
  text-align: center;
  border-radius: 5vmin;
  cursor: pointer;
  list-style: none;      /* oculta o triângulo padrão */
  outline: none;
}

summary::-webkit-details-marker {
  display: none;
}

.summary-rota p {
  line-height: 1;
  margin: 0;
  padding: 1vmin;
}

.summary-pedido p {
  line-height: 1;        /* altura mínima */
  margin: 0;             /* remove espaço extra */
  padding: 0;            /* garante zero espaçamento */
}

details {
  width: 100%;
  padding: 1vmin;
  background-color: #f9f9f9;
  color: black;
  border-radius: 3vmin;
  text-align: center;
  transition: all 0.3s ease-in-out;
  font-size: clamp(14px, 4vmin, 32px);
}

/* Espaço interno ao abrir */
details[open] {
  padding: 3vmin;
  padding-bottom: 50vmin;
}

/* === MODO ESCURO === */
body.dark-mode summary {
  background-color: #0033cc;
  color: white;
  border: 0.8vmin solid #FFFFFF;
}

body.dark-mode details {
  background-color: #000;
  color: white;
  border-color: white;
}

/* === RESUMOS E PEDIDOS — ATUALIZADO === */

/* Caixa resumo da rota */
.summary-rota {
  width: 100%;
  margin: 2vmin auto;
  background-color: #d0d0d0;
  color: black;
  border: 0.8vmin solid black;
  border-radius: 3vmin;
  font-size: clamp(14px, 6vmin, 40px);
  font-weight: bold;
  text-align: center;
}

/* Resumo do pedido — caixa clicável */
.summary-pedido {
  width: 100%;
  display: block;
  padding: 1vmin;
  background-color: white;
  border-radius: 3vmin;
  border: 0.8vmin solid black;
  box-shadow: 0 1.5vmin 3vmin rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Efeito ao tocar / passar o dedo */
.summary-pedido:hover {
  transform: none;
  box-shadow: 0 2vmin 4vmin rgba(0, 0, 0, 0.22);
}

/* Conteúdo interno expandido */
.details-rota {
  width: 90%;
  margin: 0 auto;
  padding: 3vmin 2vmin;
  background-color: #f9f9f9;
  color: black;
  border-radius: 3vmin;
  display: block;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease-in-out;
}

/* Texto do resumo (pedido) */
.pedido-summary {
  color: black;
  font-size: clamp(16px, 7vmin, 45px);
  font-weight: bold;
  text-align: center;
}

/* Fontes ajustáveis com clamp e media query */
.cliente-summary, .pagamento-summary {
  font-size: clamp(3vw, 3vmin, 5vw);
  color: black;
}


/* Animação de interação */
.pedido {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* --- ORIENTAÇÃO LANDSCAPE --- */
@media (orientation: landscape) {

  .pedido-summary {
    font-size: clamp(16px, 7vmin, 45px);
  }

  .cliente-summary,
  .pagamento-summary {
    font-size: clamp(2vw, 2vmin, 3.5vw);
  }
}

/* === MODO ESCURO === */
body.dark-mode .summary-rota {
  background-color: #333;
  color: white;
  border-color: white;
}

body.dark-mode .summary-pedido {
  background-color: #000;
  color: white;
  border-color: white;
}

body.dark-mode .details-rota {
  background-color: #000;
  color: white;
  border-color: white;
}

body.dark-mode .pedido-summary {
  color: white;
}

body.dark-mode .cliente-summary {
  color: white;
}

body.dark-mode .pagamento-summary {
  color: white;
}