/* =============================================
   BVetter — components.css
   Page: Shared navbar + footer. Used on ALL authenticated pages.
   Depends: variables.css (must load first in HTML)

   Path from public/html/[page].html:
     <link rel="stylesheet" href="../css/variables.css"/>
     <link rel="stylesheet" href="../css/components.css"/>

   All colors use CSS custom properties from variables.css.
   To change a color: edit variables.css only — not this file.
   ============================================= */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-links li a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links li a.active {
  color: var(--color-green);
  font-weight: 700;
  border-bottom: 2px solid var(--color-green);
  padding-bottom: 2px;
}

.nav-links li a:hover { color: #ffffff; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-register {
  padding: 8px 22px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: border-color 0.2s;
}

.btn-register:hover { border-color: rgba(255,255,255,0.8); }

.btn-login-nav {
  padding: 8px 26px;
  background: var(--color-green);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-login-nav:hover { background: var(--color-green); }

/* ── AUTH NAV (logged-in state) ─────────── */
.nav-right-auth {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.nav-notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

.nav-notif-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.85;
}

.nav-notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-green);
  border-radius: 50%;
  border: 2px solid var(--color-navy);
}

.nav-notif-dot[hidden] {
  display: none;
}

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
}

.nav-user-info { text-align: right; }

.nav-user-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.nav-user-role {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  min-width: 210px;
  overflow: hidden;
  z-index: 300;
}

.nav-user-dropdown.open { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item:hover { background: var(--bg-page); }
.dropdown-item.active-item { color: var(--color-green-dark); background: var(--color-green-pale); }

.dropdown-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.65;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-logout { color: var(--color-red); }

/* ── NOTIFICATION PANEL ─────────────────── */
.nav-notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: -8px;
  width: min(360px, 92vw);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-dropdown);
  overflow: hidden;
  z-index: 300;
}

.notif-panel.open { display: block; }

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}

.notif-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-mark-read,
.notif-clear-all {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  transition: opacity 0.2s;
}

.notif-mark-read { color: var(--color-green-dark); }
.notif-clear-all { color: var(--text-muted); }

.notif-mark-read:hover,
.notif-clear-all:hover { opacity: 0.7; }

.notif-panel-actions .notif-clear-all {
  padding-left: 10px;
  border-left: 1px solid var(--border-light);
}

.notif-panel-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-panel-item {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.notif-panel-item:last-child { border-bottom: none; }

.notif-panel-item:hover { background: var(--bg-page); }

.notif-panel-item.unread { background: var(--bg-input); }

.notif-panel-item.unread .notif-item-link::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green);
}

.notif-item-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 14px 4px 14px 18px;
  text-decoration: none;
  color: inherit;
}

.notif-item-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 14px 14px 14px 2px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.notif-item-delete:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.notif-panel-empty {
  padding: 32px 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.notif-item-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-icon-wrap.green { background: var(--color-green-pale); }
.notif-item-icon-wrap.blue  { background: #E8EEF8; }

.notif-item-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.notif-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 5px;
}

.notif-item-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.notif-panel-footer {
  display: block;
  text-align: center;
  padding: 13px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green-dark);
  text-decoration: none;
  background: var(--bg-page);
  transition: background 0.15s;
}

.notif-panel-footer:hover { background: var(--border-light); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--color-navy);
  position: relative;
  overflow: hidden;
  padding: 52px 80px 24px;
  height: 350px;
}

.footer-paw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  opacity: 0.15;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 2;
}

.footer-brand h3 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  width: 400px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links ul li a:hover { color: #ffffff; }

.footer-contact p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-email {
  color: #83AEF5 !important;
  font-weight: 500;
}

.footer-phone {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin-top: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  position: relative;
  z-index: 2;
}

.footer-bottom span {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.footer-socials { display: flex; gap: 8px; }

.social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.social-btn:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* ── NOTIFICATION BELL MODAL ─────────────── */
#owner-modal-root[hidden] {
  display: none;
}

.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 42, 88, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 1200;
}

.dash-modal-shell {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-modal);
}

.dash-modal-mini {
  width: min(420px, 100%);
}

.dash-modal-header {
  background: #ffffff;
  color: var(--color-navy);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  gap: 12px;
}

.dash-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-modal-header h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.3px;
}

.dash-header-action {
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-header-action:hover {
  background: var(--border-light);
  border-color: var(--border-default);
}

.dash-close-btn {
  border: 1px solid var(--border-default);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.dash-close-btn:hover {
  background: var(--border-light);
  color: var(--color-navy);
}

.dash-modal-content {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.dash-notification-list {
  display: grid;
  gap: 8px;
}

.dash-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  padding: 10px 12px;
  cursor: pointer;
}

.dash-notification-item-body {
  flex: 1;
  min-width: 0;
}

.dash-notification-item .notif-item-delete {
  margin: 0;
}

.dash-notification-item.unread {
  border-left: 4px solid var(--color-green);
  background: var(--color-green-pale);
}

.dash-notification-item.read {
  opacity: 0.8;
}

.dash-notification-item h4 {
  color: var(--color-navy);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.dash-notification-item p,
.dash-notification-item small {
  color: var(--text-body);
  font-size: 0.82rem;
}

.dash-notification-item small {
  color: var(--text-muted);
}

.notif-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-badge svg {
  width: 14px;
  height: 14px;
}

.notif-badge--positive {
  background: var(--color-green-pale);
  color: var(--color-green-dark);
}

.notif-badge--negative {
  background: var(--color-red-pale);
  color: var(--color-red);
}

.notif-badge--neutral {
  background: var(--color-navy-pale);
  color: var(--color-navy);
}

.notif-show-more-btn {
  border: 1px dashed var(--border-default);
  background: var(--bg-card);
  color: var(--color-navy-mid);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.notif-show-more-btn:hover {
  background: var(--bg-input);
}

/* =============================================
   MOBILE NAV TOGGLE (hamburger)
   Hidden on desktop, shown at tablet + mobile.
   ============================================= */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-radius: 8px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-hamburger:hover { background: rgba(255, 255, 255, 0.14); }

/* =============================================
   RESPONSIVE — see public/css/variables.css for
   the shared breakpoint scale used across all pages.
   ============================================= */

/* ── Tablet: 481px – 1024px ─────────────────── */
@media (max-width: 1024px) {
  .navbar { padding: 0 20px; }

  .nav-left { gap: 14px; }

  .nav-hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-navy);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 20px;
    box-shadow: var(--shadow-dropdown);
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  }

  .nav-links.open {
    max-height: 320px;
    opacity: 1;
    padding: 10px 20px 18px;
  }

  .nav-links li { width: 100%; }

  .nav-links li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links li a.active {
    border-bottom: 1px solid var(--color-green);
    padding-bottom: 10px;
  }

  .nav-right { gap: 8px; }

  .nav-notif-btn {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .nav-user-pill { min-height: 44px; }

  .footer {
    height: auto;
    padding: 40px 32px 24px;
  }

  .footer-paw { width: 200px; opacity: 0.1; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { width: 100%; }
}

/* ── Mobile: up to 480px ─────────────────────── */
@media (max-width: 480px) {
  .navbar { padding: 0 14px; }

  .nav-left { gap: 8px; }

  .nav-logo { width: 36px; height: 36px; }

  .nav-links.open { max-height: 280px; }

  .nav-right { gap: 6px; }

  .nav-right-auth { gap: 8px; }

  .nav-user-info { display: none; }

  .btn-register,
  .btn-login-nav {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-user-dropdown { min-width: 190px; }

  .footer { padding: 32px 20px 20px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links,
  .footer-contact { grid-column: 1 / -1; }

  .footer-phone { font-size: 18px !important; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-bottom span { line-height: 1.5; }
}
