/**
 * @file
 * iDuct top nav (internal / auth header).
 *
 * Built to XD spec (Aug 4 2026, "5-Estimating Other Items" artboard).
 * Defines --iduct-header-height for other components (sidebar) to consume.
 */

:root {
  --iduct-header-height: 93px;
}

.iduct-topnav {
  display: flex;
  align-items: center;
  padding: 16px 32px;
  background: #ffffff;
  border-bottom: 1px solid #dcdcdc;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: #3e3e3e;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
}

/* Logo */

.iduct-topnav__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #171715;
  flex: 0 0 auto;
}

.iduct-topnav__logo-img {
  display: block;
  width: 88px;
  height: 60px;
  flex: 0 0 88px;
}

/* Cyan progress rule between logo and nav */

.iduct-topnav__rule {
  flex: 1 1 auto;
  height: 2px;
  background: #dce6eb;
  position: relative;
  min-width: 40px;
}

.iduct-topnav__rule::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 40%;
  background: #00a2d1;
}

/* Nav links */

.iduct-topnav__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 0 0 auto;
}

.iduct-topnav__nav-link {
  font-size: 16px;
  font-weight: 400;
  color: #3e3e3e;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.iduct-topnav__nav-link:hover,
.iduct-topnav__nav-link:focus {
  color: #00a2d1;
}

/* Actions cluster (icons + avatar) */

.iduct-topnav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* Icon circles */

.iduct-topnav__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #08b4e6;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(200, 200, 200, 0.55);
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.iduct-topnav__icon:hover,
.iduct-topnav__icon:focus {
  color: #00a2d1;
  box-shadow: 0 3px 10px rgba(160, 160, 160, 0.65);
}

.iduct-topnav__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Badge overlay on notification icons */

.iduct-topnav__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #c56522;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  box-sizing: border-box;
}

/* Avatar + dropdown caret */

.iduct-topnav__avatar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.iduct-topnav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dce6eb;
  color: #171715;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(200, 200, 200, 0.55);
}

.iduct-topnav__avatar-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3e3e3e;
  cursor: pointer;
}

.iduct-topnav__avatar-caret svg {
  width: 12px;
  height: 8px;
}

/* Anonymous login link */

.iduct-topnav__login {
  color: #00a2d1;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.iduct-topnav__login:hover,
.iduct-topnav__login:focus {
  color: #0288af;
}

/* Responsive: hide nav labels below tablet; keep icons */

@media (max-width: 900px) {
  :root {
    --iduct-header-height: 73px;
  }

  .iduct-topnav {
    gap: 12px;
    padding: 12px 16px;
  }

  .iduct-topnav__nav {
    gap: 16px;
  }

  .iduct-topnav__rule {
    display: none;
  }

  .iduct-topnav__logo-img {
    width: 60px;
    height: 40px;
    flex: 0 0 60px;
  }
}

@media (max-width: 600px) {
  .iduct-topnav__nav {
    display: none;
  }
}
