/* ══════════════════════════════════════════════════════
   TAS TOOLS — Shared Navigation
   Include on every tool page alongside nav.js
══════════════════════════════════════════════════════ */

/* ── Fixed hamburger trigger button ── */
/* Always sits at top-left of viewport, above everything */
#navTriggerBtn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 502;
  width: 40px;
  height: 40px;
  background: var(--white, #ffffff);
  border: 2px solid #c4c4c4;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color 0.15s, box-shadow 0.15s;
  padding: 0;
  flex-shrink: 0;
}
#navTriggerBtn:hover {
  border-color: #006649;
  box-shadow: 0 2px 8px rgba(0,102,73,0.15);
}
#navTriggerBtn span {
  display: block;
  width: 18px;
  height: 2px;
  min-height: 2px;
  flex-shrink: 0;
  background: #006649;
  border-radius: 2px;
  transition: background 0.15s;
}

/* Inline variant — sits inside a flex container, not fixed */
#navTriggerBtn.nav-trigger-inline {
  position: static;
  z-index: auto;
  background: transparent;
  border-color: #c4c4c4;
  box-shadow: none;
  flex-shrink: 0;
}
#navTriggerBtn.nav-trigger-inline:hover {
  border-color: #006649;
  box-shadow: none;
  background: #f0f8f4;
}

/* ── Overlay backdrop ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 500;
}
.nav-overlay.active { display: block; }

/* ── Slide-in nav panel ── */
.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: #ffffff;
  z-index: 501;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}
.nav-panel.open { transform: translateX(0); }

/* ── Panel header ── */
.nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 3px solid #006649;
  flex-shrink: 0;
}
.nav-panel-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-panel-logo {
  height: 40px;
  width: auto;
}
.nav-panel-title {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-panel-title strong {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #006649;
}
.nav-panel-title span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a0a0a0;
  margin-top: 3px;
}

.nav-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #a0a0a0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.nav-close-btn:hover { color: #006649; }

/* ── Nav list ── */
.nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-list-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a0a0a0;
  padding: 10px 18px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  cursor: pointer;
  transition: background 0.13s;
  text-decoration: none;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover {
  background: #f0f8f4;
  border-left-color: #006649;
}
.nav-item.active {
  background: #e8f5ef;
  border-left-color: #006649;
}

.nav-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #006649;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item.active .nav-item-icon,
.nav-item:hover .nav-item-icon {
  background: #004d36;
}

.nav-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-item-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: #1a1a1a;
}
.nav-item-desc {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #888;
  margin-top: 2px;
}

/* ── Panel footer ── */
.nav-panel-footer {
  padding: 12px 18px;
  border-top: 1px solid #c4c4c4;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c4c4c4;
  flex-shrink: 0;
}

/* ── Confirm navigation modal ── */
.nav-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 600;
  place-items: center;
}
.nav-confirm-overlay.active { display: grid; }

.nav-confirm-modal {
  background: #ffffff;
  border: 2px solid #006649;
  border-radius: 10px;
  padding: 32px 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 102, 73, 0.15);
}
.nav-confirm-modal h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: #004d36;
  margin-bottom: 8px;
}
.nav-confirm-modal p {
  color: #888;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 24px;
}
.nav-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.nav-confirm-btns button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 22px;
  transition: all 0.15s;
}
.nav-btn-cancel  { background: #9a9a9a; color: #ffffff; }
.nav-btn-cancel:hover  { background: #7a7a7a; }
.nav-btn-confirm { background: #cc2200; color: #ffffff; }
.nav-btn-confirm:hover { background: #aa1a00; }
