/* ==========================================================================
   Custom Made Food — custommade.css (Bootstrap 5 friendly)
   Consolidado e alinhado ao HTML atual (index.html + menu.html)
   ========================================================================== */

/* -----------------------------
   1) Tokens / Tema
------------------------------ */
:root{
  --cmf-bg: #f3f5f7;               /* fundo suave (acinzentado) */
  --cmf-surface: #ffffff;          /* superfícies/cards */
  --cmf-text: #2f3a45;             /* texto menos agressivo */
  --cmf-muted: rgba(47,58,69,.65); /* meta cinza */
  --cmf-border: rgba(0,0,0,.08);

  --cmf-brand: #5fb3a2;            /* título da lista */
  --cmf-link: #1d7ff0;
  --cmf-link-hover: #1366c5;

  --cmf-radius: 14px;
  --cmf-radius-img: 18px;

  --cmf-shadow-sm: 0 2px 10px rgba(0,0,0,.06);
  --cmf-shadow-md: 0 10px 22px rgba(0,0,0,.10);

  --cmf-promo: #e55300;            /* laranja promo */
}

/* -----------------------------
   2) Layout base (footer “no lugar”)
------------------------------ */
html, body{ height: 100%; }


body.cmf-body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cmf-bg);
  color: var(--cmf-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.option {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
}

.option:hover {
  background-color: #f8f9fa;
}

.option.active {
  border: 2px solid #198754; /* verde bootstrap */
  background-color: #e9f7ef;
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.15);
  transform: scale(1.02);
}

.option.active i {
  color: #198754 !important;
}

.cmf-main{
  flex: 1;
  min-height: auto;
}

/* Links */
a{ color: var(--cmf-link); text-decoration: none; }
a:hover{ color: var(--cmf-link-hover); text-decoration: none; }

/* -----------------------------
   3) Navbar (acinzentada)
------------------------------ */
.cmf-navbar{
  background: #eef2f5 !important;
  border-bottom: 1px solid var(--cmf-border) !important;
  box-shadow: none !important;
}

.cmf-brand-logo{
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.90);
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
}

.navbar .nav-link{
  color: #5b6a78;
  font-weight: 500;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus{
  color: var(--cmf-text);
}

/* Busca */
.cmf-search .form-control{
  border-color: rgba(0,0,0,.12);
  box-shadow: none;
}
.cmf-search .form-control:focus{
  border-color: rgba(0,0,0,.18);
  box-shadow: 0 0 0 .2rem rgba(29,127,240,.12);
}
.cmf-search .btn{
  border-color: rgba(0,0,0,.12);
}

/* Botões */
.cmf-signup-btn{
  border-radius: 999px;
  font-weight: 600;
}
.cmf-user-btn{
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid rgba(0,0,0,.10);
}

/* -----------------------------
   4) Dropdown (branco, legível)
------------------------------ */
.dropdown-menu{
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.18) !important;
  border-radius: 6px !important;
  box-shadow: 0 12px 22px rgba(0,0,0,.18) !important;
  padding: .25rem 0 !important;
}

.dropdown-item{
  color: #1f2d3d !important;
  padding: .55rem .9rem !important;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.dropdown-item i{
  color: rgba(31,45,61,.75) !important;
  width: 18px;
  text-align: center;
}

.dropdown-item:hover,
.dropdown-item:focus{
  background: #f2f6fa !important;
  color: #132030 !important;
}

.dropdown-divider{
  border-top-color: rgba(0,0,0,.14) !important;
}

.dropdown-item.active,
.dropdown-item:active{
  background: rgba(29,127,240,.14) !important;
  color: #0b4ea2 !important;
}

/* -----------------------------
   5) Títulos
------------------------------ */
.cmf-page-title{
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--cmf-brand);
  letter-spacing: .2px;
}

/* -----------------------------
   6) Links que envolvem cards
------------------------------ */
.cmf-merchant-link{
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}
.cmf-merchant-link:hover{
  color: inherit !important;
}

/* -----------------------------
   7) Card base (restaurantes e itens)
------------------------------ */
.cmf-merchant-card{
  background: var(--cmf-surface);
  border: 1px solid var(--cmf-border);
  border-radius: var(--cmf-radius);
  padding: 12px;
  box-shadow: var(--cmf-shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}

.cmf-merchant-card:hover{
  box-shadow: var(--cmf-shadow-md);
  transform: translateY(-1px);
}

/* imagem “moldura” (para restaurante e para prato) */
.cmf-merchant-card__media{
  width: 110px;
  height: 110px;
  border-radius: var(--cmf-radius-img);
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

.cmf-merchant-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .25s ease-out;
}
.cmf-merchant-card:hover .cmf-merchant-card__img{
  transform: scale(1.10);
}

/* corpo e tipografia do card */
.cmf-merchant-card__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmf-merchant-card__title{
  color: #1f2d3d;
  font-weight: 600;
  line-height: 1.15rem;
  white-space: normal;
  word-break: break-word;
  margin: 0;
}

.cmf-merchant-card__meta{
  color: var(--cmf-muted);
  font-size: 11px;
  line-height: 1.25rem;
}
.cmf-merchant-card__meta i{
  color: rgba(47,58,69,.55);
}

/* CTA (ex.: schedule no card de restaurante) */
.cmf-merchant-card__cta .btn{
  font-size: .78rem;
  padding: .25rem .5rem;
  border-radius: 6px;
  font-weight: 500;
}
.cmf-merchant-card__cta .btn i{
  font-size: .75rem;
}
.cmf-merchant-card__cta .btn-outline-primary{
  --bs-btn-color: #1d7ff0;
  --bs-btn-border-color: rgba(29,127,240,.55);
  --bs-btn-hover-bg: rgba(29,127,240,.08);
  --bs-btn-hover-border-color: #1d7ff0;
}

/* -----------------------------
   8) MENU — Card “nutri” (estado final)
   (alinhado ao seu menu.html atual)
------------------------------ */
.cmf-food-card--nutri{
  display: grid;
  grid-template-columns: 120px 1fr;  /* imagem | conteúdo */
  grid-template-rows: auto auto;     /* topo | nutrição */
  gap: 12px 14px;
  align-items: start;
}

/* coluna esquerda: imagem */
.cmf-food-card__left{
  grid-column: 1;
  grid-row: 1;
}
.cmf-food-card__left .cmf-merchant-card__media{
  width: 120px;
  height: 120px;
}

/* coluna direita: título + id/preço + callout */
.cmf-food-card__right{
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

/* Linha 2: ID + preço (na mesma linha) */
.cmf-food-subline{ margin-top: 2px; }

.cmf-food-meta-inline{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;

  font-size: 12px;
  color: rgba(47,58,69,.55); /* ID discreto */
}

.cmf-food-price{
  margin-left: auto;
  white-space: nowrap;

  font-size: 13px;
  font-weight: 600;
  color: rgba(47,58,69,.50); /* parênteses/contexto */
}

/* Preços */
.price-normal{
  font-weight: 700;
  color: rgba(47,58,69,.90);
}

.price-old{
  font-size: 11px;
  font-weight: 500;
  color: rgba(47,58,69,.45);
  text-decoration: line-through;
  margin-right: 6px;
}

/* Promo em laranja */
.price-promo{
  font-weight: 800;
  font-size: 14px;
  color: var(--cmf-promo);
}

/* Callout */
/* Callout mais discreto e compacto */
.cmf-food-callout{
  font-size: 0.8rem;        /* ↓ menor que o texto padrão */
  color: rgba(47,58,69,.75);
}

/* Linha de nutrição ocupa as 2 colunas */
.cmf-food-nutri{
  grid-column: 1 / -1;
  grid-row: 2;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;

  padding-top: 6px;
  border-top: 1px dashed rgba(0,0,0,.10);
}

/* Força os alérgenos a irem para a “linha 2” */
.cmf-allergen-inline{
  grid-column: span 1;
}
/* Na prática: alérgenos ocupam 2 colunas e ficam alinhados */
.cmf-food-nutri > .cmf-allergen-inline:nth-last-child(2){
  grid-column: 1 / span 1;
}
.cmf-food-nutri > .cmf-allergen-inline:nth-last-child(1){
  grid-column: 2 / span 1;
}

/* Cores e ícones dos alérgenos (mesmo padrão, com semântica) */
.cmf-allergen-inline i.fa-check-circle{
  color: rgba(0,122,90,.85);
}
.cmf-allergen-inline i.fa-exclamation-triangle{
  color: rgba(229,83,0,.90);
}
.cmf-allergen-inline{
  font-weight: 600;
  color: rgba(47,58,69,.78);
}

.cmf-food-nutri__item{
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(47,58,69,.70);
  font-size: 11px;
  line-height: 1.2rem;
}

.cmf-food-nutri__item i{
  color: rgba(47,58,69,.55);
  width: 14px;
  text-align: center;
}

.cmf-food-nutri__item strong{
  color: rgba(47,58,69,.92);
  font-weight: 700;
}

/* Mobile */
/* =========================================================
   MENU — Mobile melhor: imagem à esquerda + infos à direita
   Cole no FINAL do cmf.menu.css
   ========================================================= */

@media (max-width: 570px){

  /* Mantém 2 colunas no topo do card */
  .cmf-food-card--nutri{
    grid-template-columns: 92px 1fr !important; /* imagem | texto */
    grid-template-rows: auto auto !important;   /* topo | nutri */
    gap: 10px 12px !important;
    align-items: start !important;
  }

  /* Imagem menor no mobile */
  .cmf-food-card__left .cmf-merchant-card__media{
    width: 92px !important;
    height: 92px !important;
    border-radius: 16px;
  }

  /* Deixa título e callout mais “respiráveis” */
  .cmf-merchant-card__title{
    font-size: 1rem;
    line-height: 1.1rem;
  }

  /* Callout mais curto para não “empurrar” o card */
  .cmf-food-callout{
    display: box; /* ainda experimental */
    line-clamp: 2;
    overflow: hidden;
  }

  /* Linha ID + preço: empilha melhor e aproveita o espaço ao lado */
  .cmf-food-meta-inline{
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
  }

  .cmf-food-price{
    margin-left: auto;      /* preço vai para a direita quando couber */
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* Nutrientes ficam embaixo, ocupando as duas colunas */
  .cmf-food-nutri{
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;

    /* Em mobile, lista vertical fica mais legível */
    grid-template-columns: 1fr !important;
    gap: 6px 0 !important;
  }
}

/* -----------------------------
   9) Redlane + Footer
------------------------------ */
.redlane{
  background: #fff;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.redlane img{
  width: 100%;
  height: 10px;
  display: block;
  opacity: .95;
}

.footer,
.cmf-footer{
  background: #f6f6f6;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* -----------------------------
   10) Mapa (modo mapa)
------------------------------ */
#map-container{
  width: 100%;
  height: 100vh;
}

/* -----------------------------
   11) Utilitários (mantidos, mas sem duplicar regras de preço)
------------------------------ */
.bg-tomato{ background-color: #efefef !important; }
.bg-gray{ background-color: #f2f2f2; }
.bg-white{ background-color: #ffffff; }

.smaller-font{ font-size: 12px; }

.bg-red{ background-color:#ffcccc !important; }

.icon-green{ color: green; }
.icon-blue{ color: blue; }
.icon-orange{ color: #ff6a00; }
.icon-purple{ color: purple; }
.icon-white{ color: #fff; }
.icon-red{ color: rgb(170,10,10); }

.upload-button{
  padding: 10px 20px;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.upload-button:hover{ background-color: #0b5ed7; }

.back-button{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  color: var(--cmf-link);
  font-size:1.05em;
}
.back-button:hover{ text-decoration: underline; }
.back-button i{ margin-right:6px; }

/* Ícone cutlery no menu (se existir em algum link) */
.nav-item a i.fa-cutlery{
  color: #ff6347;
  margin-right: 5px;
  font-size: 18px;
}
/* ---------- Schedule day cards ---------- */
.day-card {
  height: 100%;
}

.day-card .card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  cursor: pointer;
}

.day-card .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.08);
}

.day-card.is-selected .card {
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 .6rem 1.4rem rgba(13,110,253,.10);
}

.day-card.is-disabled .card {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.day-card__title {
  font-weight: 600;
  line-height: 1.15;
}

.day-card__window {
  font-size: .82rem;
  color: rgba(0,0,0,.55);
}

.day-card__help {
  font-size: .82rem;
  color: rgba(0,0,0,.55);
  margin-top: .25rem;
}

.day-card__radio {
  width: 1.05rem;
  height: 1.05rem;
}

.day-card__time input[type="time"] {
  font-size: .95rem;
  border-radius: 10px;
}

/* Opcional: destaque para "today" */
.day-card.is-today .card {
  background: linear-gradient(0deg, rgba(13,110,253,.04), rgba(13,110,253,.02));
}
/* schedule day cards */
.day-card.bg-warning-subtle{
  background: #fff7cc !important; /* amarelo claro */
}
.day-card .form-control{
  background-color: #fff;
}
/* =========================================================
   FOOD PANEL (detail) — compact + mobile friendly
   ========================================================= */

/* Header vermelho mais baixo */
.cmf-food-hero {

  padding-top: .25rem; /* ↓ reduz o espaço visual */
  background: #dc3545; /* bootstrap danger */
  color: #fff;
  border-radius: .75rem;
  padding: .75rem;              /* ↓ menor */
}
@media (min-width: 768px) {
  .cmf-food-hero { padding: .9rem 1rem; }
}

.cmf-food-hero__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  line-height: 1.15;            /* ↓ mais compacto */
}
.cmf-food-hero__title .badge {
  font-weight: 600;
}

.cmf-food-hero__ingredients{
  margin-top: .35rem;           /* ↓ menor */
  font-size: .875rem;           /* ↓ menor */
  line-height: 1.2;             /* ↓ mais compacto */
  opacity: .95;

  display: -webkit-box;
  -webkit-box-orient: vertical;

  -webkit-line-clamp: 2;        /* suporte WebKit */
  line-clamp: 2;                /* padrão */

  overflow: hidden;
}

/* Card de peso + botão */
.cmf-food-actions {
  border-radius: .75rem;
}
.cmf-food-actions .form-control,
.cmf-food-actions .btn {
  height: 40px;                 /* consistente e compacto */
}
.cmf-food-actions .form-text {
  margin-top: .25rem;           /* ↓ menor */
}

/* Nutrients “table” mais compacta */
.cmf-nutri-card {
  border-radius: .75rem;
}
.cmf-nutri-table {
  width: 100%;
  border-collapse: collapse;
}
/* ==============================
   Nutrients — ultra compact
   ============================== */

.cmf-nutri-table th,
.cmf-nutri-table td {
  padding: .2rem .4rem;      /* ↓ antes .35rem */
  line-height: 1.15;         /* ↓ mais justo */
}

.cmf-nutri-table thead th {
  font-size: .8rem;
  color: rgba(0,0,0,.55);
  font-weight: 600;
}
.cmf-nutri-name {
  font-size: .8rem;          /* ↓ antes .85 */
  line-height: 1.15;
}

.cmf-nutri-value {
  font-size: .8rem;
  line-height: 1.15;
}

/* Barras mais largas e baixinhas */
.cmf-nutri-progress .progress {
  height: 8px;               /* ↓ antes 10px */
}

.cmf-nutri-progress .progress-bar {
  line-height: 8px;
  font-size: .6rem;
}

/* Faz a coluna da barra “mandar” no desktop */
.cmf-col-progress {
  width: 55%;
}
.cmf-col-name { width: 22%; }
.cmf-col-value { width: 10%; }
.cmf-col-dv { width: 13%; }


/* No desktop, garante que tudo fique alinhado horizontalmente */
@media (min-width: 992px) {
    .cmf-navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}


/* No mobile, força a quebra de linha para o menu colapsado */
@media (max-width: 700) {
    .cmf-navbar .container-xl {
        flex-wrap: wrap; /* Permite que o menu desça */
    }
    .cmf-navbar .navbar-collapse {
        flex-basis: 100%; /* Ocupa a linha inteira de baixo */
        order: 3; /* Garante que fique abaixo do Logo e das Ações */
        padding-top: 10px;
    }
    .cmf-input-search-mobile {
        max-width: 80px; /* Evita empurrar os botões para fora */
    }
}

/* Garante que os links fiquem verticalmente centrados com o logo no desktop */
.cmf-navbar .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Mobile: remove scroll horizontal desmontando a tabela */
@media (max-width: 570px) {
  .cmf-nutri-table thead { display: none; }
  .cmf-nutri-table tr {
    padding: .2rem 0;        /* ↓ antes .35 */
  }
  .cmf-nutri-table td.cmf-td-top {
    padding: .1rem .2rem;   /* ↓ antes .15/.25 */
    gap: .35rem;
  }
  .cmf-nutri-table td.cmf-td-bar {
    padding: .1rem .2rem .2rem .2rem;
  }
  .cmf-nutri-table tbody,
  .cmf-nutri-table td {
    display: block;
    width: 100%;
  }
  .cmf-nutri-name { white-space: normal; }

  .cmf-navbar{
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }

  .cmf-navbar .nav-link{
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.9rem;
  }

}

/* Alergenos: compactos */
.cmf-allergen-pill {
  border-radius: .6rem;
  padding: .55rem .75rem;
  font-weight: 600;
}
