/* ---------- MAP ---------- */
.pet-onde{padding-bottom:0;}
.pet-onde .section-lede{margin-bottom:24px;}
.pet-map-wrap{position:relative; width:100%; height:clamp(480px, 72vh, 700px); border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow:hidden; background:#eceee9;}
.pet-map{position:absolute; inset:0;}
.leaflet-container{font-family:'Inter',system-ui,sans-serif; background:#eceee9;}

.map-card{position:absolute; z-index:1000; top:20px; left:max(16px, calc((100% - 1080px) / 2 + 24px)); width:300px; max-width:calc(100% - 96px);
  background:#fff; border-radius:18px; box-shadow:0 8px 30px rgba(15,25,15,.14); padding:18px 20px 20px; transition:opacity .2s, transform .2s;}
.map-card.is-hidden{opacity:0; transform:translateY(-8px); pointer-events:none;}
.map-card h3{margin:0 0 12px; font-size:19px; font-weight:800; letter-spacing:-.01em;}
.map-legend{display:flex; align-items:center; gap:10px; font-size:14.5px; line-height:1.4;}
.map-dot{flex:0 0 auto; width:16px; height:16px; border-radius:50%; background:var(--green); border:2.5px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.25);}
.map-viewall{margin-top:16px; width:100%; justify-content:center; padding:12px 16px; font-size:14.5px; box-shadow:none;}

.map-panel{position:absolute; z-index:1001; top:0; left:0; bottom:0; width:370px; max-width:100%; background:#fff; box-shadow:6px 0 30px rgba(15,25,15,.16);
  display:flex; flex-direction:column; transform:translateX(-102%); visibility:hidden; transition:transform .28s ease, visibility 0s linear .28s;}
.map-panel.open{transform:none; visibility:visible; transition:transform .28s ease, visibility 0s;}
.map-panel-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:20px 18px 12px 22px;}
.map-panel-head h3{margin:0 0 3px; font-size:19px; font-weight:800;}
.map-panel-sub{font-size:13px; color:var(--text-dim);}
.map-panel-close{flex:0 0 auto; width:38px; height:38px; border-radius:50%; border:none; background:var(--bg-soft); color:var(--text); font-size:24px; line-height:1; cursor:pointer;}
.map-panel-close:hover{background:#e1e7dc;}
.map-search{padding:0 18px 14px 22px; border-bottom:1px solid var(--line);}
.map-search input{width:100%; font:inherit; font-size:14.5px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:var(--bg); color:var(--text); outline:none;}
.map-search input:focus{border-color:var(--green); box-shadow:0 0 0 3px rgba(63,184,76,.18);}
.map-list{list-style:none; margin:0; padding:8px 0; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch;}
.map-item{display:flex; align-items:center; gap:8px; padding:2px 14px 2px 10px;}
.map-item-main{flex:1; min-width:0; display:flex; align-items:flex-start; gap:12px; text-align:left; background:none; border:none; font:inherit; color:inherit; padding:11px 12px; border-radius:12px; cursor:pointer;}
.map-item-main:hover, .map-item.active .map-item-main{background:#eef6ec;}
.map-item-main .map-dot{width:14px; height:14px; margin-top:3px;}
.map-item.no-geo .map-dot{background:#c5cbc3;}
.map-item-name{font-weight:700; font-size:14.5px; line-height:1.3;}
.map-item-info{font-size:13.5px; color:var(--text); margin-top:3px; line-height:1.35;}
.map-item-addr{font-size:13px; color:var(--text-dim); margin-top:2px; line-height:1.35;}
.map-dir{flex:0 0 auto; width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--green); color:#0a170c; text-decoration:none;}
.map-dir:hover{background:#4bc958;}
.map-noresults{padding:16px 22px; color:var(--text-dim); font-size:14px; margin:0;}

.map-hint{position:absolute; inset:0; z-index:1002; display:flex; align-items:center; justify-content:center; text-align:center; padding:24px;
  background:rgba(15,25,15,.45); color:#fff; font-weight:700; font-size:16px; opacity:0; pointer-events:none; transition:opacity .25s;}
.map-hint.show{opacity:1;}

/* markers */
.pet-marker{background:none; border:none;}
.pet-marker span{display:block; width:26px; height:26px; margin:1px; border-radius:50%; background:var(--green); border:3px solid #fff; box-shadow:0 3px 10px rgba(0,0,0,.28); transition:transform .15s, background .15s;}
.pet-marker:hover span{transform:scale(1.12);}
.pet-marker.active span{background:var(--green-deep); transform:scale(1.3);}

/* leaflet controls & popups */
.leaflet-top .leaflet-control{margin-top:20px;}
.leaflet-right .leaflet-control{margin-right:16px;}
.leaflet-touch .leaflet-bar, .leaflet-bar{border:none; border-radius:14px; box-shadow:0 6px 24px rgba(15,25,15,.14); overflow:hidden;}
.leaflet-touch .leaflet-bar a, .leaflet-bar a{width:44px; height:44px; line-height:44px; font-size:22px; color:var(--text); border-bottom:1px solid var(--line);}
.leaflet-bar a:last-child{border-bottom:none;}
.leaflet-control-attribution{font-size:10.5px; background:rgba(255,255,255,.78) !important; border-radius:8px 0 0 0;}
.leaflet-popup-content-wrapper{border-radius:14px; box-shadow:0 8px 28px rgba(15,25,15,.18);}
.leaflet-popup-content{margin:14px 18px 16px 16px; font-size:14px; line-height:1.45;}
.pop-name{font-weight:800; font-size:15px; margin-bottom:2px; color:var(--text);}
.pop-info{color:var(--text); font-size:13.5px; line-height:1.4; margin:2px 0 6px;}
.pop-addr{color:var(--text-dim); font-size:13px; margin-bottom:12px;}
.leaflet-popup-content a.pop-dir{display:inline-flex; align-items:center; gap:6px; background:var(--green); color:#0a170c; text-decoration:none; font-weight:800; font-size:13px; padding:8px 13px; border-radius:10px;}
.leaflet-popup-content a.pop-dir:hover{background:#4bc958;}

@media (max-width:640px){
  .pet-map-wrap{height:clamp(440px, 74vh, 640px);}
  .map-card{top:12px; left:12px; width:auto; max-width:calc(100% - 88px); padding:14px 16px 16px; border-radius:16px;}
  .map-card h3{font-size:16.5px; margin-bottom:8px;}
  .map-legend{font-size:13.5px;}
  .map-viewall{margin-top:12px; padding:11px 14px;}
  .leaflet-top .leaflet-control{margin-top:12px;}
  .leaflet-right .leaflet-control{margin-right:12px;}
  .map-panel{width:100%;}
}
.pet-locate{display:flex !important; align-items:center; justify-content:center; color:var(--text);}
.pet-locate.busy svg{animation:petSpin 1s linear infinite;}
@keyframes petSpin{to{transform:rotate(360deg);}}
.pet-me{background:none; border:none;}
.pet-me span{display:block; width:16px; height:16px; margin:3px; border-radius:50%; background:#2a6fdb; border:3px solid #fff; box-shadow:0 0 0 2px rgba(42,111,219,.35), 0 2px 6px rgba(0,0,0,.3);}

/* ícones discretos no canto do mapa (PDF, integrar) */
.map-icons{display:flex;}
.leaflet-touch .leaflet-bar.map-icons a, .leaflet-bar.map-icons a{width:38px; height:38px; line-height:38px; display:flex !important; align-items:center; justify-content:center; color:var(--text-dim); border-bottom:none; border-right:1px solid var(--line);}
.leaflet-bar.map-icons a:last-child{border-right:none;}
.leaflet-bar.map-icons a:hover{color:var(--text); background:#f4f6f2;}
.leaflet-bar.map-icons a.is-off{opacity:.4; pointer-events:none;}
.leaflet-bar.map-icons a.busy svg{animation:petSpin 1s linear infinite;}
.leaflet-top .leaflet-control.map-icons + .leaflet-control{margin-top:10px;}

/* janela "Integrar no meu site" */
.embed-dlg{width:min(620px, calc(100% - 32px)); max-height:calc(100% - 32px); border:none; border-radius:20px; padding:26px 26px 22px; box-shadow:0 20px 60px rgba(15,25,15,.3); color:var(--text); font-family:'Inter',system-ui,sans-serif;}
.embed-dlg::backdrop{background:rgba(15,25,15,.5);}
.embed-dlg h3{margin:0 0 8px; font-size:21px; font-weight:800; letter-spacing:-.01em;}
.embed-dlg p{margin:0 0 14px; font-size:14.5px; line-height:1.55; color:var(--text-dim);}
.embed-row{display:flex; align-items:center; gap:10px; margin:0 0 12px; font-size:14px; font-weight:700;}
.embed-row select{font:inherit; font-weight:600; padding:7px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--text);}
.embed-dlg textarea{display:block; width:100%; min-height:118px; resize:vertical; font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--bg-soft); color:var(--text);}
.embed-dlg .embed-hint{font-size:13px; margin:10px 0 18px;}
.embed-actions{display:flex; flex-wrap:wrap; align-items:center; gap:10px;}
.embed-actions .btn{padding:12px 18px; font-size:14px;}
.embed-actions a.embed-prev{font-size:14px; font-weight:700; color:var(--text); text-underline-offset:3px; margin-left:auto;}
.embed-x{position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; border:none; background:var(--bg-soft); color:var(--text); font-size:22px; line-height:1; cursor:pointer;}
