/* Yucatán Fishing — coastal palette */
:root {
  --teal:#0d9488; --teal-d:#0f766e; --gulf:#0369a1; --gulf-d:#024b70;
  --sand:#fef3c7; --dark:#0f172a; --card:#ffffff; --border:#e2e8f0;
  --muted:#64748b; --amber:#f59e0b;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--sand);color:var(--dark);padding-bottom:64px}
.fish-header{position:sticky;top:0;z-index:10;background:#fff;padding:12px 16px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;align-items:center;justify-content:space-between}
.fish-header h1{font-size:20px;color:var(--teal);font-weight:700}
.icon-btn{background:none;border:none;font-size:24px;cursor:pointer;padding:4px}
.fish-main{padding:14px 18px}
.tab-panel{display:none}
.tab-panel.active{display:block}
.section-title{font-size:18px;margin-bottom:12px;color:var(--dark)}
.subtabs{display:flex;gap:6px;margin-bottom:14px}
.subtab-btn{flex:1;padding:10px 4px;border:none;border-radius:9px;background:#f1f5f9;color:var(--dark);cursor:pointer;font-weight:600;font-size:14px}
.subtab-btn.active{background:var(--teal);color:#fff}
.fish-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px}
.fish-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:14px 6px;text-align:center;box-shadow:0 1px 3px rgba(0,0,0,.06);cursor:pointer}
.fish-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.12);transform:translateY(-2px)}
.fish-img{font-size:34px;margin-bottom:6px}
.fish-name{font-size:13px;font-weight:600;color:var(--dark)}
.map-shell{background:var(--card);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.map-full{position:fixed;top:48px;left:0;right:0;bottom:64px;z-index:1;width:100%;height:calc(100vh - 112px)}
.map-full > *{height:100%;width:100%}
.map-overlay{position:fixed;top:56px;right:12px;z-index:10;pointer-events:none;display:flex;flex-direction:column;gap:10px}
#spots-map .leaflet-container, #shops-map .leaflet-container, .map-overlay .spots-legend, .map-overlay .chips, .map-overlay .chip, .map-overlay .fab { pointer-events: auto; }
.fish-icon { display: flex; align-items: center; justify-content: center; }
.fish-icon span { font-size: 20px; }
.spots-legend{display:flex;flex-direction:column;gap:6px;background:rgba(255,255,255,.9);backdrop-filter:blur(2px);padding:8px 10px;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.badge{font-size:12px;padding:4px 10px;border-radius:999px;background:#f1f5f9}
.chips{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;overflow-x:visible}
.chip{padding:8px 13px;border:1px solid var(--border);border-radius:999px;background:#f8fafc;cursor:pointer;font-size:13px;white-space:nowrap;pointer-events:auto}
.chip.active,.chip:hover{background:var(--teal);color:#fff;border-color:var(--teal)}
.fab{position:fixed;right:20px;bottom:90px;width:56px;height:56px;border:none;border-radius:50%;font-size:24px;box-shadow:0 4px 12px rgba(0,0,0,.25);z-index:1000;cursor:pointer;pointer-events:auto}
.fab.primary{background:var(--teal);color:#fff}
.fab.primary:hover{background:var(--teal-d)}
.rules-list{list-style:disc inside;line-height:1.7;font-size:14px}
.rules-list li{margin-bottom:8px}
.report-btn{width:100%;padding:13px;margin-top:14px;border:none;border-radius:12px;background:var(--gulf);color:#fff;font-size:15px;font-weight:600;cursor:pointer}
.report-btn:hover{background:var(--gulf-d)}
.feed.empty-state{padding:32px;text-align:center;color:var(--muted);font-size:14px}
.fish-bottom-nav{position:fixed;left:0;right:0;bottom:0;height:64px;background:#fff;border-top:1px solid var(--border);box-shadow:0 -2px 8px rgba(0,0,0,.08);display:flex;justify-content:space-around;align-items:center;z-index:30}
.nav-item{flex:1;background:none;border:none;padding:9px 2px 5px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted);font-size:11px;border-radius:0;transition:color .15s}
.nav-item.active{color:var(--teal)}
.nav-icon{font-size:22px}

.no-fish-label.leaflet-tooltip { background: #ffffff; color: #ef4444; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.2); pointer-events: none; }

/* ===== Guide modals + Add-fish form (coastal) ===== */
.guide-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.guide-header .section-title{margin:0}
.section-title{color:#fff}
.btn-ghost{background:#fff;border:1px solid var(--border);border-radius:9px;padding:6px 12px;font-size:13px;font-weight:600;color:var(--dark);cursor:pointer;transition:background .15s}
.btn-ghost:hover{background:var(--teal);color:#fff}
.btn-primary{width:100%;padding:12px;border:none;border-radius:12px;background:var(--teal);color:#fff;font-size:15px;font-weight:600;cursor:pointer}
.btn-primary:disabled{opacity:.6;cursor:wait}
.btn-primary:hover:not(:disabled){background:var(--teal-d)}
.add-fish-form{display:flex;flex-direction:column;gap:10px}
.add-fish-form h3{margin:0;color:var(--dark)}
.hint{margin:0;color:var(--muted);font-size:12px}
.add-fish-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.add-fish-form input[type=text],
.add-fish-form input[type=file],
.add-fish-form textarea{padding:9px 10px;border:1px solid var(--border);border-radius:10px;font:inherit;font-size:14px;background:#fff;width:100%;resize:vertical}
.add-fish-form textarea{min-height:60px}
.preview-box{margin-top:8px}
.preview-box img{max-width:100%;max-height:150px;border-radius:10px;border:1px solid var(--border);object-fit:cover}
.modal{position:fixed;inset:0;z-index:1001;display:none;align-items:center;justify-content:center}
.modal.open{display:flex}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45)}
.modal-content{position:relative;max-width:420px;width:calc(100% - 24px);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:16px;padding:18px 18px 14px;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.modal-close{position:absolute;top:10px;right:12px;background:none;border:none;font-size:22px;line-height:1;cursor:pointer;color:var(--muted)}
.modal-img{width:100%;height:180px;object-fit:cover;border-radius:10px;border:1px solid var(--border)}
.modal-body{padding-top:8px}
.modal-title{font-size:20px;color:var(--dark);margin:6px 0}
.modal-sci{color:var(--muted);font-style:italic;margin:0 0 6px}
.modal-meta{font-size:14px;line-height:1.7;margin:2px 0}
.modal-meta .label{color:var(--muted);font-weight:600}
.modal-attr{font-size:12px;color:var(--muted);margin-top:8px}
.empty{text-align:center;padding:24px;color:var(--muted);font-size:14px}
.fish-card img.fish-img{width:100%;height:70px;object-fit:cover;border-radius:8px}
.fish-sci{font-size:11px;color:var(--muted);margin-top:4px;font-style:italic}
@media (max-width:480px){.modal-content{width:calc(100% - 16px);padding:14px}}

/* ===== Water background ===== */
body{
  min-height:100vh;
  background:
    linear-gradient(rgba(2,13,48,.30), rgba(2,13,48,.50)),
    url("images/Gulf.jpeg") center/cover no-repeat;
}

/* ===== Rules tab (federal regulations accordion) ===== */
#tab-rules .rules-card{background:rgba(255,255,255,.93);border-radius:14px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,.08);max-width:780px;margin:0 auto}
.rules-card h3{margin:16px 0 10px;font-size:16px;color:var(--gulf-d)}
.rules-card h3:first-child{margin-top:0}
.rules-source{font-size:12px;color:var(--muted);font-weight:400}
.rules-list{margin:0;padding-left:20px}
.rules-list li{margin:4px 0;line-height:1.5}
.rules-federal details{margin-bottom:6px;border:1px solid var(--border);border-radius:10px;background:var(--card);padding:0 12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.rules-federal summary{cursor:pointer;padding:10px 0;font-weight:600;color:var(--dark);list-style:none;outline:none;-webkit-touch-callout:none;user-select:none}
.rules-federal summary::-webkit-details-marker{display:none}
.rules-federal summary::after{content:"\25B8";float:right;transition:transform .2s}
details[open] .rules-federal summary::after{transform:rotate(90deg)}
.rules-federal ul{margin:0;padding:0 0 10px 18px}
.rules-federal li{margin:4px 0;line-height:1.5}
.rules-note{font-size:13px;color:var(--muted);margin:14px 0 0}
#tab-rules .report-btn{margin-top:16px}

/* Language toggle */
.lang-btn{background:rgba(255,255,255,.92);border:1px solid var(--border);border-radius:8px;padding:6px 10px;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.15);display:inline-flex;align-items:center;gap:6px;transition:all .15s}
.lang-btn:hover{background:#f1f5f9;transform:translateY(-1px)}


/* ---- map extras: locate-me + drop-pin controls ---- */
.map-ctrl { padding: 2px; }
.map-ctrl button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #0284c7; font-size: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
.map-ctrl button:hover { background: #e0f2fe; }
.map-ctrl button.active { background: #2563eb; color: #fff; }
.fish-pin { width: 32px; height: 32px; }
.fish-pin span { display: block; text-align: center; font-size: 22px; line-height: 1; }

/* shop icon legend: clickable icons+labels filter pins by category */
.chips{flex-direction:row;flex-wrap:wrap;gap:8px;padding:4px;pointer-events:auto}
.chip{pointer-events:auto}
.chip-img{width:18px;height:18px;margin-right:6px;vertical-align:middle}
.chip.active .chip-img{filter:invert(1)}
.chip span{font-size:13px}
.fish-icon{display:flex;align-items:center;justify-content:center}
.fish-icon span{font-size:18px}

/* auto-location blue dot (blink) */
@keyframes blue-blink{0%,100%{opacity:1}50%{opacity:0.25}}
.blue-dot{animation:blue-blink 1.4s infinite}
/* text category chips */
.chips{flex-direction:row;flex-wrap:wrap;gap:8px;padding:4px;pointer-events:auto}
.chip{pointer-events:auto;min-width:96px;text-align:center;font-size:13px;background:#fff;border:1px solid #cbd5e1;border-radius:999px;padding:6px 10px;cursor:pointer}
.chip.active{background:#0d9488;color:#fff}
/* save modal */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:0;transition:opacity .15s}
.modal.open{visibility:visible;opacity:1}
.modal-body{background:#fff;padding:18px;border-radius:12px;width:90%;max-width:320px}
.modal textarea{width:100%;height:72px;margin:8px 0;border:1px solid #cbd5e1;border-radius:6px;padding:6px;font:inherit;font-size:13px}
.save-opt{display:flex;align-items:center;gap:6px;margin:8px 0;font-size:13px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px}
.btn{padding:8px 13px;border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;cursor:pointer;font-size:13px}
.btn.primary{background:#0d9488;color:#fff}
.loc-list{max-height:280px;overflow-y:auto}
.loc-row{display:flex;justify-content:space-between;align-items:center;padding:8px 6px;border-bottom:1px solid #e2e8f0}
.loc-name{font-weight:600;font-size:14px}
.loc-photo{max-width:80px;max-height:60px;border-radius:6px;margin-top:4px;display:block}
.go-btn{color:#0284c7}
.del-btn{color:#ef4444}

/* Settings / info panel: anchored to the header gear, opening DOWN into the page */
.settings-panel{position:absolute;top:calc(100% + 10px);right:8px;background:#fff;border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.18);padding:14px 16px;min-width:200px;z-index:1600}
.settings-panel h3{margin:0 0 10px;color:var(--teal);font-size:15px}
.settings-panel a{color:#2563eb;text-decoration:none;font-weight:600;font-size:14px}
.settings-panel.hidden{display:none}
