/* Mapa de convênios (/convenios/mapa). O mapa ocupa a tela abaixo do cabeçalho
   do site; a lista fica ao lado (no celular, alterna com o mapa). O dourado
   segue reservado ao desconto, como no resto do guia. */

.mc { position: relative; display: grid; grid-template-columns: 400px minmax(0, 1fr);
  height: calc(100vh - var(--mc-topo, 96px)); height: calc(100dvh - var(--mc-topo, 96px)); min-height: 520px;
  background: #EEF3FB; border-top: 1px solid rgba(43,91,232,.1); }
.mc-lado { display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid rgba(15,27,61,.08); z-index: 2; }
.mc-topo { padding: 22px 22px 14px; border-bottom: 1px solid rgba(15,27,61,.07); }
.mc-voltar { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #2B5BE8; }
.mc-voltar-seta { width: 14px; height: 14px; transform: rotate(180deg); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mc-topo h1 { margin: 8px 0 2px; font-size: 26px; font-weight: 800; letter-spacing: -.8px; color: #0F1B3D; }
.mc-resumo { font-size: 13.5px; color: #7B8DB0; }
.mc-resumo b { color: #0F1B3D; }
.mc-busca { display: flex; gap: 8px; margin-top: 14px; }
.mc-busca input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: #0F1B3D; padding: 11px 14px; border: 1px solid rgba(15,27,61,.14); border-radius: 11px; background: #fff; }
.mc-busca input:focus { outline: none; border-color: #2B5BE8; box-shadow: 0 0 0 3px rgba(43,91,232,.14); }
.mc-perto { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font: inherit; font-size: 13.5px; font-weight: 700;
  color: #2B5BE8; background: #EEF2FF; border: 0; border-radius: 11px; padding: 0 13px; cursor: pointer; transition: background .15s; }
.mc-perto svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.mc-perto:hover { background: #E1E8FF; }
.mc-perto.ativo { background: #2B5BE8; color: #fff; }
.mc-perto.buscando svg { animation: mc-pulsa 1s ease-in-out infinite; }
@keyframes mc-pulsa { 50% { transform: scale(.75); opacity: .5; } }

.mc-areas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mc-area { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: #46567A;
  background: #fff; border: 1px solid rgba(15,27,61,.12); border-radius: 99px; padding: 5px 11px; cursor: pointer; transition: all .15s; }
.mc-area i { width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }
.mc-area:hover { border-color: rgba(15,27,61,.3); }
.mc-area.ativa { background: #0F1B3D; border-color: #0F1B3D; color: #fff; }

.mc-lista { list-style: none; margin: 0; padding: 6px 10px 90px; overflow-y: auto; flex: 1; min-height: 0; }
.mc-lista li { animation: mc-entra .3s ease both; animation-delay: calc(var(--k) * 18ms); }
@keyframes mc-entra { from { opacity: 0; transform: translateY(6px); } }
.mc-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: #0F1B3D;
  background: none; border: 0; border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: background .15s; }
.mc-item:hover { background: #F4F6FB; }
.mc-item.ativo { background: #EEF2FF; box-shadow: inset 3px 0 0 #2B5BE8; }
.mc-item-cor { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor) 18%, transparent); }
.mc-item-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mc-item-texto strong { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.mc-item-texto small { font-size: 12.5px; color: #7B8DB0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-item-desc { flex-shrink: 0; font-size: 13px; font-weight: 800; color: #0B6B4A; background: #E3F7EE; border-radius: 7px; padding: 3px 8px; }
.mc-item--sem .mc-item-cor { background: transparent; box-shadow: inset 0 0 0 2px var(--cor); }
.mc-vazio { padding: 30px 12px; text-align: center; color: #7B8DB0; }

.mc-mapa { position: relative; z-index: 1; min-height: 0; }

/* --- o pino: etiqueta com o desconto ---------------------------------------- */
.mc-pino { background: none; border: 0; }
.mc-pino-etiqueta {
  position: absolute; left: 0; bottom: 0; transform: translate(-50%, -8px);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font: 800 12.5px/1 Inter, -apple-system, 'Segoe UI', sans-serif; letter-spacing: -.01em; color: #0F1B3D;
  background: #fff; border-radius: 99px; padding: 6px 9px 6px 7px;
  box-shadow: 0 2px 6px rgba(15,27,61,.22), 0 0 0 1px rgba(15,27,61,.06);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1), background .15s, color .15s;
  animation: mc-cai .45s cubic-bezier(.3,1.4,.5,1) both;
}
.mc-pino-etiqueta::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit;
  transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0; box-shadow: 2px 2px 3px rgba(15,27,61,.12); z-index: -1; }
.mc-pino-etiqueta i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor); }
.mc-pino:hover .mc-pino-etiqueta, .leaflet-marker-icon.mc-pino:focus .mc-pino-etiqueta { transform: translate(-50%, -12px) scale(1.12); background: #0F1B3D; color: #6EE7B7; }
@keyframes mc-cai { from { opacity: 0; transform: translate(-50%, -30px); } }

.mc-grupo { display: grid; place-items: center; }
.mc-grupo span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font: 800 14px/1 Inter, -apple-system, 'Segoe UI', sans-serif; color: #fff; background: #0F1B3D;
  box-shadow: 0 0 0 5px rgba(15,27,61,.16), 0 4px 12px rgba(15,27,61,.3); transition: transform .15s; }
.mc-grupo:hover span { transform: scale(1.08); }

.mc-eu span { display: block; width: 20px; height: 20px; border-radius: 50%; background: #2B5BE8; border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(43,91,232,.5); animation: mc-eu 2s ease-out infinite; }
@keyframes mc-eu { 0% { box-shadow: 0 0 0 0 rgba(43,91,232,.45); } 100% { box-shadow: 0 0 0 22px rgba(43,91,232,0); } }

/* --- popup ------------------------------------------------------------------- */
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 14px 40px -10px rgba(15,27,61,.35); padding: 0; }
.leaflet-popup-content { margin: 0; }
.mc-pop { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 14px; color: #0F1B3D !important; text-decoration: none !important; }
.mc-pop img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; border: 1px solid rgba(15,27,61,.08); margin-bottom: 4px; }
.mc-pop-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #46567A; }
.mc-pop-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }
.mc-pop strong { font-size: 16px; line-height: 1.25; }
.mc-pop-desc { align-self: flex-start; font-size: 14px; font-weight: 800; color: #0B6B4A; background: #E3F7EE; border-radius: 7px; padding: 3px 8px; margin-top: 2px; }
.mc-pop-end { font-size: 12.5px; color: #7B8DB0; line-height: 1.4; }
.mc-pop-ver { font-size: 13px; font-weight: 700; color: #2B5BE8; margin-top: 4px; }

.mc-alternar { display: none; }

/* --- celular ----------------------------------------------------------------- */
@media (max-width: 860px) {
  .mc { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mc-topo, .mc-lista, .mc-mapa { min-width: 0; }
  .mc-lado { display: contents; }
  .mc-topo { grid-row: 1; background: #fff; padding: 14px 16px 10px; z-index: 3; }
  .mc-topo h1 { font-size: 21px; }
  .mc-areas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px 2px; }
  .mc-areas::-webkit-scrollbar { display: none; }
  .mc-area { flex-shrink: 0; }
  .mc-mapa, .mc-lista { grid-row: 2; grid-column: 1; }
  .mc-lista { background: #fff; z-index: 2; visibility: hidden; }
  body.mc-vendo-lista .mc-lista { visibility: visible; }
  .mc-alternar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 5;
    display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 700; color: #fff;
    background: #0F1B3D; border: 0; border-radius: 99px; padding: 12px 20px; box-shadow: 0 10px 26px rgba(15,27,61,.35); cursor: pointer; }
  .mc-alternar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-lista li, .mc-pino-etiqueta, .mc-eu span { animation: none; }
}
.mc-pino-etiqueta--so { padding: 6px; }
