.saghome-floating-note-menu,
.saghome-floating-note-toggle {
  display: none !important;
}

.sagcqw-portal-nav {
  --sagcqw-blue: #176bff;
  --sagcqw-coral: #ff514d;
  position: fixed;
  z-index: 9000;
  top: 50%;
  right: 0;
  display: grid;
  box-sizing: border-box;
  width: 228px;
  overflow: hidden;
  gap: 4px;
  border: 1px solid #cadbf0;
  border-radius: 18px 0 0 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 38px rgba(33, 78, 136, .14);
  font-family: Arial, Helvetica, sans-serif;
  transform: translate(178px, -50%);
  transition: transform 320ms ease-in-out, opacity 240ms ease-in-out, background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.sagcqw-portal-nav * { box-sizing: border-box; }

.sagcqw-portal-nav:hover,
.sagcqw-portal-nav:focus-within {
  transform: translate(0, -50%);
  border-color: #cadbf0;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 52px rgba(33, 78, 136, .2);
}

.sagcqw-portal-nav a,
.sagcqw-portal-nav button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  padding: 0 16px;
  color: #284e9a;
  font: 700 13px/1 Arial, Helvetica, sans-serif;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.sagcqw-portal-nav .sagcqw-icon {
  display: inline-block;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  animation: sagcqw-nav-icon-drift 5.2s ease-in-out infinite;
  transition: transform 320ms ease-in-out, color 180ms ease;
}

.sagcqw-portal-nav .sagcqw-icon-house { -webkit-mask-image: url('icons/house.svg'); mask-image: url('icons/house.svg'); }
.sagcqw-portal-nav .sagcqw-icon-search { -webkit-mask-image: url('icons/magnifying-glass.svg'); mask-image: url('icons/magnifying-glass.svg'); }
.sagcqw-portal-nav .sagcqw-icon-studio { -webkit-mask-image: url('icons/file-text.svg'); mask-image: url('icons/file-text.svg'); }
.sagcqw-portal-nav .sagcqw-icon-profile { -webkit-mask-image: url('icons/user-circle.svg'); mask-image: url('icons/user-circle.svg'); }
.sagcqw-portal-nav .sagcqw-icon-support { -webkit-mask-image: url('icons/headset.svg'); mask-image: url('icons/headset.svg'); }

.sagcqw-portal-nav > :nth-child(2) .sagcqw-icon { animation-delay: -.9s; }
.sagcqw-portal-nav > :nth-child(3) .sagcqw-icon { animation-delay: -1.8s; }
.sagcqw-portal-nav > :nth-child(4) .sagcqw-icon { animation-delay: -2.7s; }
.sagcqw-portal-nav > :nth-child(5) .sagcqw-icon { animation-delay: -3.6s; }

.sagcqw-portal-nav a > span:not(.sagcqw-icon),
.sagcqw-portal-nav button > span:not(.sagcqw-icon) {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 180ms ease, transform 320ms ease-in-out;
}

.sagcqw-portal-nav > .is-active {
  background: #e9f3ff;
  box-shadow: 0 12px 30px rgba(33, 78, 136, .14);
}

.sagcqw-portal-nav:hover .sagcqw-icon,
.sagcqw-portal-nav:focus-within .sagcqw-icon,
.sagcqw-portal-nav:hover a > span:not(.sagcqw-icon),
.sagcqw-portal-nav:hover button > span:not(.sagcqw-icon),
.sagcqw-portal-nav:focus-within a > span:not(.sagcqw-icon),
.sagcqw-portal-nav:focus-within button > span:not(.sagcqw-icon) {
  opacity: 1;
  transform: translateX(0);
}

.sagcqw-portal-nav:hover .sagcqw-icon,
.sagcqw-portal-nav:focus-within .sagcqw-icon { animation: none; }
.sagcqw-portal-nav a:hover,
.sagcqw-portal-nav button:hover { background: #f1f7ff; transform: translateX(-2px); }
.sagcqw-portal-nav .is-active { color: var(--sagcqw-blue); }
.sagcqw-portal-nav:hover .is-active,
.sagcqw-portal-nav:focus-within .is-active { background: #e9f3ff; box-shadow: none; }
.sagcqw-portal-nav .is-active::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--sagcqw-coral);
  content: '';
}

.sagcqw-nav-label-mobile { display: none; }

body.sagwc-chat-open .sagcqw-portal-nav {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(100% + 28px), -50%);
}

.sagcqw-catalog-search[hidden] { display: none !important; }

.sagcqw-catalog-search {
  position: fixed;
  z-index: 8999;
  top: 50%;
  right: 244px;
  box-sizing: border-box;
  width: min(390px, calc(100vw - 96px));
  border: 1px solid #cadbf0;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  padding: 18px;
  box-shadow: 0 24px 58px rgba(33, 78, 136, .2);
  color: #10264c;
  font-family: Arial, Helvetica, sans-serif;
  transform: translateY(-50%);
  animation: sagcqw-catalog-search-in 220ms ease-out both;
}

body.sagcqw-search-open .sagcqw-portal-nav { transform: translate(0, -50%); }

.sagcqw-catalog-search .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.sagcqw-catalog-search * { box-sizing: border-box; }

.sagcqw-catalog-search-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sagcqw-catalog-search-heading > div { display: grid; gap: 4px; }
.sagcqw-catalog-search-kicker {
  color: #60728a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sagcqw-catalog-search-heading strong { font-size: 18px; line-height: 1.25; }
.sagcqw-catalog-search-heading > button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #d8e4f2;
  border-radius: 50%;
  background: #f5f9ff;
  color: #284e9a;
  font: 400 24px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.sagcqw-catalog-search-heading > button:hover,
.sagcqw-catalog-search-heading > button:focus-visible { border-color: #176bff; background: #e9f3ff; }

.sagcqw-catalog-search-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #aec7e6;
  border-radius: 14px;
  background: #f8fbff;
  padding: 6px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.sagcqw-catalog-search-form:focus-within {
  border-color: #176bff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 107, 255, .12);
}
.sagcqw-catalog-search-form .sagcqw-icon {
  width: 22px;
  height: 22px;
  margin-left: 7px;
  background: #284e9a;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.sagcqw-catalog-search-form .sagcqw-icon-search {
  -webkit-mask-image: url('icons/magnifying-glass.svg');
  mask-image: url('icons/magnifying-glass.svg');
}
.sagcqw-catalog-search-form input[type='search'] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #10264c;
  font: 400 15px/1.4 Arial, Helvetica, sans-serif;
}
.sagcqw-catalog-search-form input[type='search']::-webkit-search-cancel-button { cursor: pointer; }
.sagcqw-catalog-search-form button[type='submit'] {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #176bff;
  padding: 0 16px;
  color: #fff;
  font: 700 13px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.sagcqw-catalog-search-form button[type='submit']:hover,
.sagcqw-catalog-search-form button[type='submit']:focus-visible { background: #0f55cf; }
.sagcqw-catalog-search-status {
  min-height: 18px;
  margin: 8px 4px 0;
  color: #60728a;
  font-size: 12px;
  line-height: 1.45;
}
.sagcqw-catalog-search-results {
  max-height: min(344px, 48vh);
  margin: 2px -2px -4px;
  overflow-y: auto;
  border-top: 1px solid #e1eaf5;
  padding: 6px 2px 0;
  scrollbar-width: thin;
  scrollbar-color: #a9bfdc transparent;
}
.sagcqw-catalog-search-results[hidden] { display: none !important; }
.sagcqw-catalog-search-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 64px;
  border-radius: 12px;
  padding: 8px;
  color: #10264c;
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.sagcqw-catalog-search-result:hover,
.sagcqw-catalog-search-result:focus-visible,
.sagcqw-catalog-search-result.is-active {
  outline: 0;
  background: #edf5ff;
  box-shadow: inset 3px 0 #176bff;
  color: #10264c;
  transform: translateX(2px);
}
.sagcqw-catalog-search-result-media {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #d6e3f2;
  border-radius: 10px;
  background: #fff;
}
.sagcqw-catalog-search-result-media img { width: 100%; height: 100%; object-fit: contain; }
.sagcqw-catalog-search-result-media .sagcqw-icon {
  width: 23px;
  height: 23px;
  background: currentColor;
  color: #176bff;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.sagcqw-catalog-search-result-media .sagcqw-icon-studio {
  -webkit-mask-image: url('icons/file-text.svg');
  mask-image: url('icons/file-text.svg');
}
.sagcqw-catalog-search-result-copy { display: grid; min-width: 0; gap: 4px; }
.sagcqw-catalog-search-result-copy strong,
.sagcqw-catalog-search-result-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sagcqw-catalog-search-result-copy strong { color: #10264c; font-size: 13px; line-height: 1.25; }
.sagcqw-catalog-search-result-copy span { color: #60728a; font-size: 11px; line-height: 1.3; }
.sagcqw-portal-nav [data-sagcqw-open-search][aria-expanded='true'] { background: #e9f3ff; color: #176bff; }

@keyframes sagcqw-catalog-search-in {
  from { opacity: 0; transform: translate(18px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

@keyframes sagcqw-nav-icon-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

@media (max-width: 1200px) {
  .sagcqw-portal-nav {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(100%, 590px);
    min-height: calc(76px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
    gap: 0;
    border: 1px solid #cadbf0;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .98);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -12px 32px rgba(33, 78, 136, .12);
    margin-inline: auto;
    transform: none;
  }

  .sagcqw-portal-nav:hover,
  .sagcqw-portal-nav:focus-within { transform: none; }

  .sagcqw-portal-nav a,
  .sagcqw-portal-nav button {
    min-width: 0;
    min-height: 76px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    padding: 8px 3px 6px;
    font-size: 11px;
    opacity: 1;
    pointer-events: auto;
  }

  .sagcqw-portal-nav a:hover,
  .sagcqw-portal-nav button:hover { transform: none; }
  .sagcqw-portal-nav .is-active::before { top: 0; right: 18px; bottom: auto; left: 18px; width: auto; height: 3px; }
  .sagcqw-portal-nav > .is-active { box-shadow: none; }
  .sagcqw-portal-nav .sagcqw-icon { width: 26px; height: 26px; }
  .sagcqw-portal-nav .sagcqw-icon,
  .sagcqw-portal-nav a > span:not(.sagcqw-icon),
  .sagcqw-portal-nav button > span:not(.sagcqw-icon) {
    opacity: 1;
    transform: none;
  }
  .sagcqw-portal-nav .sagcqw-icon { animation: none; }
  .sagcqw-nav-label-desktop { display: none; }
  .sagcqw-nav-label-mobile { display: inline; }

  body.sagwc-chat-open .sagcqw-portal-nav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .sagcqw-catalog-search {
    top: auto;
    right: 50%;
    bottom: 90px;
    width: min(560px, calc(100vw - 28px));
    transform: translateX(50%);
    animation-name: sagcqw-catalog-search-in-mobile;
  }
  body.sagcqw-search-open .sagcqw-portal-nav { transform: none; }
}

@keyframes sagcqw-catalog-search-in-mobile {
  from { opacity: 0; transform: translate(50%, 16px); }
  to { opacity: 1; transform: translate(50%, 0); }
}

@media (max-width: 520px) {
  .sagcqw-portal-nav { width: 100%; }
  .sagcqw-portal-nav a,
  .sagcqw-portal-nav button {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    line-height: 1;
  }
  .sagcqw-catalog-search { width: calc(100vw - 24px); padding: 15px; }
  .sagcqw-catalog-search-heading strong { font-size: 17px; }
  .sagcqw-catalog-search-form { grid-template-columns: auto minmax(0, 1fr); }
  .sagcqw-catalog-search-form button[type='submit'] { grid-column: 1 / -1; width: 100%; }
  .sagcqw-catalog-search-results { max-height: min(280px, 34vh); }
}

@media (prefers-reduced-motion: reduce) {
  .sagcqw-portal-nav,
  .sagcqw-portal-nav a,
  .sagcqw-portal-nav button,
  .sagcqw-portal-nav .sagcqw-icon {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .sagcqw-catalog-search { animation: none !important; }
}
