/* ================================================= */
/* CONFIGURAÇÕES GLOBAIS E VARIÁVEIS                 */
/* ================================================= */
:root {
  --cor-primaria: #5bc0de;
  --cor-secundaria: #ff99cc;
  --cor-texto-escuro: #4a4a4a;
  --cor-texto-claro: #ffffff;
  --cor-fundo-claro: #ffffff;
  --cor-fundo-cinza: #f8f9fa;
}

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Quicksand:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--cor-fundo-claro);
  color: var(--cor-texto-escuro);
  margin: 0;
}

/* ================================================= */
/* BARRA DE NAVEGAÇÃO INFERIOR (MOBILE)              */
/* ================================================= */
.bottom-nav {
  display: none;
  /* Começa escondida por padrão */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-decoration: none;
  color: #aaa;
  font-size: 0.7em;
  gap: 4px;
  transition: color 0.2s ease;
}

.nav-item i {
  font-size: 1.4em;
}

.nav-item:hover {
  color: var(--cor-texto-escuro);
}

.nav-item.active {
  color: var(--cor-primaria);
  font-weight: 600;
}

/* ================================================= */
/* RESPONSIVIDADE (MEDIA QUERIES)                    */
/* ================================================= */
@media (max-width: 1023px) {
  body {
    padding-bottom: 80px;
  }

  main {
    padding: 0 15px;
  }

  .body-loja .header-left,
  .body-loja .header-direita,
  .header-direita {
    display: none !important;
    /* Força o elemento a desaparecer */
  }

  .body-loja header {
    justify-content: center;
  }

  .bottom-nav {
    display: flex;
  }
}

@media (max-width: 600px) {
  .modal .modal-content {
    flex-direction: column;
    animation: none;
    /* Pode remover a animação em telas muito pequenas se preferir */
  }

  #modal-imagem,
  .modal-info {
    width: 100%;
  }

  .perfil-container {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  /* Aplica o layout flex apenas no body da loja/cardápio */
  .body-loja {
    display: flex;
    flex-wrap: nowrap;
  }
  main {
    flex-grow: 1;
    padding: 30px 40px;
  }

  .body-loja header {
    width: auto;
  }

  .body-loja .header-left,
  .body-loja .header-direita {
    display: flex;
  }

  .header-direita {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 440px;
  }

  .modal.active {
    background-color: rgba(0, 0, 0, 0.6);
  }

  .modal .modal-content {
    width: 90%;
    max-width: 700px;
    height: auto;
    border-radius: 10px;
    flex-direction: row;
    animation: none;
  }

  .modal-header-image {
    width: 50%;
    height: auto;
    min-height: 450px;
    border-radius: 10px 0 0 10px;
  }

  .info-loja-flutuante,
  .modal-fechar-novo {
    display: none;
  }

  .modal-body-content {
    width: 50%;
  }

  .modal-footer-actions {
    position: static;
    flex-direction: column;
    border-top: none;
    padding: 0;
    margin-top: auto;
  }

  .btn-adicionar-grande {
    width: auto;
  }
}

/* ================================================= */
/* ================================================= */
/* RODAPÉ (FOOTER)                                   */
/* ================================================= */
footer {
  width: 100%;
  text-align: center;
  padding: 20px 0;
  background-color: var(--cor-fundo-cinza);
  border-top: 1px solid #e9ecef;
}

.admin-login-link {
  color: #6c757d;
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.2s;
}

.admin-login-link:hover {
  color: #343a40;
}

/* ESTILO PARA O AVISO DE LOJA FECHADA */
.aviso-loja {
    background-color: #f8d7da; /* Vermelho bem claro */
    color: #721c24; /* Vermelho escuro para o texto */
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
    line-height: 1.5;
}

.aviso-loja p {
    margin: 0;
}

/* Estilo para desabilitar botões */
button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* ================================================= */
/* PADRONIZAÇÃO DE BOTÕES (ADICIONAR EM style.css)   */
/* ================================================= */

/* --- BOTÃO PRINCIPAL (Para Ações Positivas) --- */
.btn-principal {
    display: inline-block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box; /* Garante que o padding não aumente a largura */
    
    background-color: var(--cor-primaria); /* Nosso azul padrão */
    color: white;
    
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition: filter 0.2s ease;
}

.btn-principal:hover {
    filter: brightness(90%); /* Escurece um pouco ao passar o mouse */
}

/* --- BOTÃO SECUNDÁRIO (Para Ações de Cancelar) --- */
.btn-secundario {
    display: inline-block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;

    background-color: #6c757d; /* Um cinza neutro */
    color: white;
    
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition: filter 0.2s ease;
}

.btn-secundario:hover {
    filter: brightness(90%);
}

/* --- Pequeno ajuste para o botão do modal (que tem 2 textos) --- */
#btn-modal-adicionar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* ================================================= */
/* ESTILOS PARA A PÁGINA "MEUS PEDIDOS"              */
/* ================================================= */

#lista-meus-pedidos {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.meu-pedido-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 5px solid #ccc; /* Cor padrão */
}

.meu-pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
}

.meu-pedido-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.meu-pedido-data {
    font-size: 0.9em;
    color: #666;
}

.meu-pedido-body {
    padding: 15px;
}

.meu-pedido-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #555;
}

.meu-pedido-footer {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    font-size: 1.1em;
}

/* --- Cores por Status --- */
.meu-pedido-card.status-pendente {
    border-left-color: #ffc107; /* Amarelo */
}
.meu-pedido-card.status-pendente .meu-pedido-status {
    color: #856404;
}

.meu-pedido-card.status-confirmado {
    border-left-color: #28a745; /* Verde */
}
.meu-pedido-card.status-confirmado .meu-pedido-status {
    color: #155724;
}

.meu-pedido-card.status-cancelado {
    border-left-color: #dc3545; /* Vermelho */
    opacity: 0.8;
}
.meu-pedido-card.status-cancelado .meu-pedido-status {
    color: #721c24;
}