/* 18Cat Instant Navigation Top Progress Bar & Button Feedback (Strict CSP safe) */
.cat-fast-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #533afd 0%, #7c62ff 60%, #a78bfa 100%);
  box-shadow: 0 0 10px rgba(83, 58, 253, 0.45);
  transition: opacity 0.16s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-fast-nav-bar.is-active {
  opacity: 1;
  transform: scaleX(0.76);
  animation: cat-fast-nav-crawl 6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cat-fast-nav-crawl {
  0% { transform: scaleX(0.12); }
  18% { transform: scaleX(0.58); }
  55% { transform: scaleX(0.82); }
  100% { transform: scaleX(0.94); }
}

.is-cat-navigating {
  opacity: 0.86 !important;
  cursor: progress !important;
  pointer-events: none;
}

.is-cat-submitting {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0.9 !important;
  cursor: progress !important;
}

.is-cat-submitting::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  animation: cat-btn-spin 0.65s linear infinite;
}

@keyframes cat-btn-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cat-fast-nav-bar.is-active {
    animation: none;
    transform: scaleX(0.85);
  }
  .is-cat-submitting::before {
    animation: none;
  }
}

html[data-cat-switch-login] #session-screen {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Suppress false expired-session warning when explicitly adding another 18Cat account for Mail */
html[data-cat-mail-add] #login-session-notice {
  display: none !important;
}

.cat-mail-add-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e4e4e7;
}

html[data-theme="dark"] .cat-mail-add-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.cat-mail-add-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px 0 8px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  color: #18181b;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cat-mail-add-back:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

.cat-mail-add-back:focus-visible {
  outline: 2px solid #533afd;
  outline-offset: 2px;
}

html[data-theme="dark"] .cat-mail-add-back {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
}

html[data-theme="dark"] .cat-mail-add-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.cat-mail-add-tag {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
}

html[data-theme="dark"] .cat-mail-add-tag {
  color: #a1a1aa;
}

.cat-mail-add-hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  color: #52525b;
  font-size: 12.5px;
  line-height: 1.55;
}

html[data-theme="dark"] .cat-mail-add-hint {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
}

/* Subtle bottom gradient scrim on homepage #insights slides for crisp white headline legibility */
#insights .insight-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 18, 0) 42%, rgba(10, 12, 18, 0.68) 100%);
  pointer-events: none;
  z-index: 1;
}

#insights .insight-cover-title {
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* Option A: Centered 3-item product entrances inside 18cat.com floating glass header */
.site-header.has-cat-hdr-products .nav-shell {
  position: relative;
}

.site-header .cat-hdr-products {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(-50%, calc(-50% - 3px), 0);
  transition: opacity 0.36s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.36s;
}

.site-header:is(.is-scrolled, .menu-is-open) .cat-hdr-products,
body[data-inner-page-header] .site-header .cat-hdr-products {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.36s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

@media (min-width: 861px) {
  .site-header.has-cat-hdr-products .nav-links {
    display: none !important;
  }
}

.cat-hdr-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 244, 245, 0.88);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.cat-hdr-item svg {
  flex-shrink: 0;
  opacity: 0.84;
}

.cat-hdr-item:hover,
.cat-hdr-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cat-hdr-item:focus-visible {
  outline: 2px solid #533afd;
  outline-offset: 2px;
}

html[data-theme="light"] .cat-hdr-item {
  color: #27272a;
}

html[data-theme="light"] .cat-hdr-item:hover,
html[data-theme="light"] .cat-hdr-item.is-active {
  background: rgba(24, 24, 27, 0.065);
  color: #09090b;
}

.cat-hdr-mobile-group {
  display: none;
}

@media (max-width: 860px) {
  .site-header .cat-hdr-products {
    display: none !important;
  }

  .cat-hdr-mobile-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  html[data-theme="light"] .cat-hdr-mobile-group {
    border-bottom-color: rgba(24, 24, 27, 0.08);
  }

  .site-header .nav-links .cat-hdr-mob-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #f4f4f5;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
  }

  html[data-theme="light"] .site-header .nav-links .cat-hdr-mob-item {
    border-color: rgba(24, 24, 27, 0.1);
    background: rgba(24, 24, 27, 0.04);
    color: #18181b;
  }

  .site-header .nav-links .cat-hdr-mob-item.is-active {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
  }

  html[data-theme="light"] .site-header .nav-links .cat-hdr-mob-item.is-active {
    border-color: rgba(24, 24, 27, 0.2);
    background: rgba(24, 24, 27, 0.09);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .cat-hdr-products,
  .cat-portal-hub-menu {
    transition: none;
    animation: none;
  }
}

/* Unified 18Cat Account Hub & Product Switcher inside my.18cat.com / admin.18cat.com */
#login-screen .login-card {
  padding-top: 26px;
  padding-bottom: 20px;
}

#login-screen .client-login-support.has-cat-hub-link {
  margin: 16px 0 0 !important;
  padding: 14px 0 0 !important;
  width: 100% !important;
  border: 0 !important;
  border-top: 1px solid #e4e4e7 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
}

html[data-theme="dark"] #login-screen .client-login-support.has-cat-hub-link {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  background: transparent !important;
}

.cat-login-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #27272a;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 140ms ease;
}

.cat-login-hub-link:hover {
  color: #533afd;
}

html[data-theme="dark"] .cat-login-hub-link {
  color: #e4e4e7;
}

html[data-theme="dark"] .cat-login-hub-link:hover {
  color: #ffffff;
}

.cat-sidebar-switch-btn {
  font-size: 12px;
  color: #52525b;
  text-decoration: none;
  white-space: nowrap;
}

.cat-sidebar-switch-btn:hover {
  color: #111114;
}

html[data-theme="dark"] .cat-sidebar-switch-btn {
  color: #a1a1aa;
}

html[data-theme="dark"] .cat-sidebar-switch-btn:hover {
  color: #f4f4f5;
}

.cat-portal-hub-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.cat-portal-hub-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #27272a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.cat-portal-hub-btn:hover,
.cat-portal-hub-wrap.is-open .cat-portal-hub-btn {
  background: #f4f4f5;
  border-color: #d4d4d8;
  color: #111114;
}

.cat-portal-hub-btn:focus-visible {
  outline: 2px solid #533afd;
  outline-offset: 2px;
}

html[data-theme="dark"] .cat-portal-hub-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
}

html[data-theme="dark"] .cat-portal-hub-btn:hover,
html[data-theme="dark"] .cat-portal-hub-wrap.is-open .cat-portal-hub-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.cat-portal-hub-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 244px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  box-shadow: 0 14px 36px -12px rgba(9, 9, 11, 0.18), 0 2px 6px rgba(9, 9, 11, 0.06);
  z-index: 1200;
  transform-origin: top right;
  animation: cat-ph-pop 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-portal-hub-menu[hidden] {
  display: none !important;
}

html[data-theme="dark"] .cat-portal-hub-menu {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.6);
}

@keyframes cat-ph-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cat-ph-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #ececf0;
  display: grid;
  gap: 2px;
}

html[data-theme="dark"] .cat-ph-head {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.cat-ph-head strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #111114;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-ph-head span {
  font-size: 11.5px;
  color: #71717a;
}

html[data-theme="dark"] .cat-ph-head strong {
  color: #f4f4f5;
}

html[data-theme="dark"] .cat-ph-head span {
  color: #a1a1aa;
}

.cat-ph-section {
  padding: 5px 0;
  display: grid;
  gap: 2px;
}

.cat-ph-section + .cat-ph-section {
  border-top: 1px solid #ececf0;
}

html[data-theme="dark"] .cat-ph-section + .cat-ph-section {
  border-top-color: rgba(255, 255, 255, 0.09);
}

.cat-ph-label {
  padding: 4px 10px 3px;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
}

.cat-ph-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #18181b;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.cat-ph-item svg {
  flex-shrink: 0;
  color: #52525b;
}

.cat-ph-item:hover {
  background: #f4f4f5;
  color: #09090b;
}

html[data-theme="dark"] .cat-ph-item {
  color: #e4e4e7;
}

html[data-theme="dark"] .cat-ph-item svg {
  color: #a1a1aa;
}

html[data-theme="dark"] .cat-ph-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
