:root {
  --catlo-ink: #172033;
  --catlo-muted: #667085;
  --catlo-line: #e4e7ec;
  --catlo-brand: #176b5b;
  --catlo-brand-soft: #eaf6f2;
  --catlo-alert: #c43232;
  --catlo-chat-dark: #172033;
  --catlo-chat-incoming: #344054;
}

.catlo-floating-chat [hidden],
.catlo-shared-badge[hidden] {
  display: none !important;
}

.catlo-visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.catlo-header-communication {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 5px;
  min-height: 42px;
  padding: 0 7px;
  text-decoration: none;
}

.catlo-header-communication:hover {
  background: #edf7f4;
  border-radius: 9px;
  color: var(--catlo-brand);
  text-decoration: none;
}

.catlo-shared-badge {
  align-items: center;
  background: var(--catlo-alert);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  min-height: 19px;
  min-width: 19px;
  padding: 1px 5px;
}

.catlo-directory,
.catlo-notification-center {
  box-sizing: border-box;
  color: var(--catlo-ink);
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px 18px 64px;
}

.catlo-directory__header,
.catlo-notification-center__header {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.catlo-directory__header p,
.catlo-notification-center__header p {
  color: var(--catlo-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.catlo-directory h1,
.catlo-notification-center h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0;
}

.catlo-directory__search {
  box-sizing: border-box;
  display: block;
  flex: 0 1 380px;
  float: none;
  margin: 0;
  max-width: 380px;
  min-width: 0;
  width: 100%;
}

.catlo-directory__search label {
  color: var(--catlo-muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.catlo-directory__search div {
  box-sizing: border-box;
  clear: none;
  display: grid;
  float: none;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  position: static;
  width: 100%;
}

.catlo-directory__search input {
  border: 1px solid #b8c0cc;
  border-radius: 9px;
  box-sizing: border-box;
  float: none;

  height: 42px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.catlo-directory__search button,
.catlo-directory__actions button,
.catlo-notification-center__header button {
  background: var(--catlo-brand);
  border: 1px solid var(--catlo-brand);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;

  font-weight: 600;
  min-height: 40px;
  padding: 8px 13px;
}

.catlo-directory__search button {
  box-sizing: border-box;
  border-radius: 9px;
  clear: none;
  float: none;
  height: 42px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  position: static;
  white-space: nowrap;
}

.catlo-directory__tabs,
.catlo-notification-center__tabs {
  border-bottom: 1px solid var(--catlo-line);
  display: flex;
  gap: 4px;
  margin: 26px 0 24px;
  overflow-x: auto;
}

.catlo-directory__tabs a,
.catlo-notification-center__tabs a {
  border-bottom: 3px solid transparent;
  color: var(--catlo-muted);
  padding: 10px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.catlo-directory__tabs a[aria-current="page"],
.catlo-notification-center__tabs a[aria-current="page"] {
  border-bottom-color: var(--catlo-brand);
  color: var(--catlo-brand);
  font-weight: 700;
}

.catlo-directory__tabs a:hover,
.catlo-notification-center__tabs a:hover {
  background: #f2f8f6;
  color: var(--catlo-brand);
  text-decoration: none;
}

.catlo-directory__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 16px 0 30px;
  padding: 0;
}

.catlo-directory__grid > li {
  align-items: center;
  background: #fff;
  border: 1px solid var(--catlo-line);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 13px;
}

.catlo-directory__grid > li.is-highlighted {
  border-color: var(--catlo-brand);
  box-shadow: 0 0 0 3px var(--catlo-brand-soft);
}

.catlo-directory__identity {
  align-items: center;
  color: inherit;
  display: flex;
  flex: 1 1 180px;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
}

.catlo-directory__identity:hover {
  color: var(--catlo-brand);
  text-decoration: none;
}

.catlo-directory__identity img {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 56px;
  object-fit: cover;
  width: 56px;
}

.catlo-directory__identity span {
  min-width: 0;
}

.catlo-directory__identity strong,
.catlo-directory__identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catlo-directory__identity small {
  color: var(--catlo-muted);
  margin-top: 3px;
}

.catlo-directory__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.catlo-directory__actions form {
  margin: 0;
}

.catlo-directory__friend-state {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  min-height: 40px;
  padding: 8px 10px;
  white-space: nowrap;
}

.catlo-directory__friend-state > span {
  color: var(--catlo-brand);
}

.catlo-directory-more {
  position: relative;
}

.catlo-directory__actions .catlo-directory-more__toggle {
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
  font-size: 20px;
  min-width: 40px;
  padding: 6px 9px;
}

.catlo-directory__actions .catlo-directory-more__toggle:hover,
.catlo-directory__actions
  .catlo-directory-more__toggle[aria-expanded="true"] {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #172033;
}

.catlo-directory-more__menu {
  background: #fff;
  border: 1px solid #d8e1ea;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgb(15 23 42 / 16%);
  min-width: 190px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 30;
}

.catlo-directory-more__menu[hidden] {
  display: none;
}

.catlo-directory-more__menu a,
.catlo-directory-more__menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #334155;
  display: flex;

  font-size: 14px;
  font-weight: 600;
  justify-content: flex-start;
  min-height: 40px;
  padding: 8px 9px;
  text-decoration: none;
  width: 100%;
}

.catlo-directory-more__menu a:hover {
  background: #f1f7f5;
  color: #125849;
  text-decoration: none;
}

.catlo-directory-more__destructive {
  border-top: 1px solid #e2e8f0;
  margin-top: 6px;
  padding-top: 6px;
}

.catlo-directory-more__destructive button,
.catlo-directory-more__destructive button:hover {
  background: #fff1f0;
  color: #991b1b;
}

.catlo-directory__actions form + form button {
  background: #fff;
  color: var(--catlo-brand);
}

.catlo-directory__search button:hover,
.catlo-directory__actions button:hover,
.catlo-notification-center__header button:hover {
  background: #125849;
  border-color: #125849;
}

.catlo-directory__actions form + form button:hover {
  background: var(--catlo-brand-soft);
  border-color: #9dcfc2;
}

.catlo-directory__empty,
.catlo-notification-center__empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 36px 22px;
  text-align: center;
}

.catlo-directory__pagination,
.catlo-notification-center__pagination {
  text-align: center;
}

.catlo-directory__pagination a,
.catlo-notification-center__pagination a {
  border: 1px solid var(--catlo-brand);
  border-radius: 9px;
  color: var(--catlo-brand);
  display: inline-block;
  padding: 10px 18px;
  text-decoration: none;
}

.catlo-directory__pagination a:hover,
.catlo-notification-center__pagination a:hover {
  background: var(--catlo-brand-soft);
  border-color: #9dcfc2;
  color: #125849;
  text-decoration: none;
}

.catlo-floating-chat {
  bottom: 20px;
  color: var(--catlo-ink);
  position: fixed;
  right: 22px;
  z-index: 2200;
}

.catlo-floating-chat__launcher {
  align-items: center;
  background: var(--catlo-brand);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgb(23 32 51 / 25%);
  color: #fff;
  cursor: pointer;
  display: flex;

  font-weight: 700;
  gap: 8px;
  min-height: 50px;
  padding: 0 17px;
  transition:
    background-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.catlo-floating-chat__launcher:hover {
  background: #125849;
  box-shadow: 0 10px 26px rgb(23 32 51 / 29%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.catlo-floating-chat__launcher--login {
  box-sizing: border-box;
  text-decoration: none;
}

.catlo-floating-chat__launcher:focus-visible {
  outline: 3px solid rgb(22 117 96 / 32%);
  outline-offset: 3px;
}

.catlo-floating-chat__panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 16px;
  bottom: 64px;
  box-sizing: border-box;
  box-shadow: 0 18px 48px rgb(23 32 51 / 24%);
  clear: none;
  display: flex;
  float: none;
  flex-direction: column;
  height: min(520px, calc(100vh - 104px));
  margin: 0;
  max-height: calc(100vh - 104px);
  overflow: hidden;
  padding: 0;
  position: absolute;
  right: 0;
  width: min(352px, calc(100vw - 28px));
}

.catlo-floating-chat__panel[data-view="inbox"],
.catlo-floating-chat__panel[data-view="status"] {
  height: auto;
}

.catlo-floating-chat__panel[data-view="inbox"] .catlo-floating-chat__content {
  flex: 0 1 auto;
  max-height: min(356px, calc(100vh - 210px));
}

.catlo-floating-chat__header {
  align-items: center;
  background: var(--catlo-chat-dark);
  border-bottom: 1px solid #2d394d;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 54px;
  padding: 6px 8px;
}

.catlo-floating-chat__header > div {
  display: grid;
  flex: 1;
  min-width: 0;
}

.catlo-floating-chat__header strong,
.catlo-floating-chat__header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catlo-floating-chat__header strong {
  font-size: 15px;
  line-height: 20px;
}

.catlo-floating-chat__header small {
  color: #b9c2d0;
  font-size: 12px;
  line-height: 16px;
}

.catlo-floating-chat__header button {
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #d7dde7;
  cursor: pointer;
  font-size: 21px;
  height: 40px;
  padding: 0;
  transition: background-color .15s ease, color .15s ease;
  width: 40px;
}

.catlo-floating-chat__header button:hover {
  background: #29364a;
  color: #fff;
}

.catlo-floating-chat__content,
.catlo-floating-history {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #aab4c2 transparent;
  scrollbar-width: thin;
}

.catlo-floating-inbox,
.catlo-floating-history ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catlo-floating-inbox [data-preview-conversation-link] {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f0f2f5;
  color: inherit;
  cursor: pointer;
  display: flex;

  gap: 9px;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.catlo-floating-inbox [data-preview-conversation-link]:hover {
  background: #f1f7f5;
  color: var(--catlo-brand);
}

.catlo-floating-avatar {
  align-items: center;
  background: var(--catlo-brand-soft);
  border-radius: 50%;
  color: var(--catlo-brand);
  display: flex;
  flex: 0 0 38px;
  font-size: 14px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
}

.catlo-floating-avatar--header {
  background: #dff3eb;
  color: #125849;
  height: 38px;
  width: 38px;
}

.catlo-floating-inbox__body {
  display: grid;
  flex: 1;
  min-width: 0;
}

.catlo-floating-inbox__topline {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.catlo-floating-inbox__topline strong {
  flex: 1 1 auto;
  min-width: 0;
}

.catlo-floating-inbox__topline time {
  color: var(--catlo-muted);
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
}

.catlo-floating-inbox__body strong,
.catlo-floating-inbox__body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catlo-floating-inbox__source {
  color: var(--catlo-brand);
  font-weight: 600;
}

.catlo-floating-inbox__body small {
  color: var(--catlo-muted);
  font-size: 12px;
  line-height: 16px;
  margin-top: 1px;
}

.catlo-floating-chat__empty {
  padding: 24px 18px;
  text-align: center;
}

.catlo-floating-chat__footer,
.catlo-floating-chat__full-link {
  border-top: 1px solid var(--catlo-line);
  display: block;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 18px;
  padding: 8px 10px;
  text-align: center;
}

.catlo-floating-chat__footer a,
.catlo-floating-chat__full-link {
  color: var(--catlo-brand);
  text-decoration: none;
}

.catlo-floating-chat__footer a:hover,
.catlo-floating-chat__full-link:hover {
  color: #125849;
  text-decoration: none;
}

[data-floating-conversation] {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.catlo-floating-chat__listing {
  background: #f8fafc;
  border-bottom: 1px solid var(--catlo-line);
  display: grid;
  padding: 6px 10px;
}

.catlo-floating-chat__listing small,
.catlo-floating-chat__offline {
  color: var(--catlo-muted);
  font-size: 12px;
}

.catlo-floating-chat__offline {
  background: #fff7ed;
  line-height: 16px;
  padding: 6px 10px;
}

.catlo-floating-history {
  background: #edf1f4;
  padding: 10px;
}

.catlo-floating-history li {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin: 0 0 7px;
}

.catlo-floating-history li.is-own {
  align-items: flex-end;
}

.catlo-floating-history li + li.is-own,
.catlo-floating-history li:not(.is-own) + li:not(.is-own) {
  margin-top: -3px;
}

.catlo-floating-bubble {
  background: var(--catlo-chat-incoming);
  border-radius: 5px 14px 14px;
  box-shadow: 0 1px 2px rgb(23 32 51 / 9%);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  max-width: 76%;
  overflow: hidden;
  padding: 7px 10px;
  white-space: normal;
  overflow-wrap: break-word;
}

.catlo-floating-history li.is-own .catlo-floating-bubble {
  background: var(--catlo-brand);
  border-radius: 14px 5px 14px 14px;
}

.catlo-floating-bubble p {
  display: block;
  line-height: inherit;
  margin: 0;
  white-space: pre-wrap;
  width: auto;
}

.catlo-floating-bubble img {
  border-radius: 8px;
  display: block;
  margin-top: 6px;
  max-height: 220px;
  max-width: 100%;
}

.catlo-floating-history li > small {
  color: var(--catlo-muted);
  font-size: 11px;
  line-height: 15px;
  margin-top: 2px;
}

.catlo-floating-history li > small:empty {
  display: none;
}

.catlo-floating-composer {
  align-items: end;
  background: #fff;
  border-top: 1px solid var(--catlo-line);
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  margin: 0;
  padding: 7px;
}

.catlo-floating-composer--text-only {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.catlo-floating-composer--disabled {
  display: block;
  padding: 10px;
  text-align: center;
}

.catlo-floating-composer--disabled p {
  color: var(--catlo-muted);
  margin: 0;
}

.catlo-floating-composer > button {
  align-items: center;
  align-self: end;
  background: transparent;
  border: 0;
  border-radius: 11px;
  box-sizing: border-box;
  color: var(--catlo-brand);
  cursor: pointer;
  display: inline-flex;

  font-size: 24px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-decoration: none;
  width: 44px;
}

.catlo-floating-composer > button:hover:not(:disabled),
.catlo-floating-composer > button:focus-visible {
  background: var(--catlo-brand-soft);
  color: #125849;
  text-decoration: none;
}

.catlo-floating-composer > button:disabled {
  color: #a8b2bf;
  cursor: not-allowed;
}

.catlo-floating-composer > button svg {
  fill: currentcolor;
  height: 21px;
  width: 21px;
}

.catlo-floating-composer__field {
  min-width: 0;
}

.catlo-floating-composer textarea {
  border: 1px solid #b8c0cc;
  border-radius: 10px;
  box-sizing: border-box;
  display: block;
  float: none;

  font-size: 14px;
  height: 44px;
  line-height: 20px;
  margin: 0;
  max-height: 116px;
  min-height: 44px;
  overflow-y: auto;
  padding: 11px 10px;
  resize: none;
  width: 100%;
}

.catlo-floating-composer textarea:focus {
  border-color: var(--catlo-brand);
  box-shadow: 0 0 0 3px rgb(23 107 91 / 13%);
  outline: 0;
}

.catlo-floating-previews {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px;
}

.catlo-floating-preview {
  flex: 0 0 auto;
  position: relative;
}

.catlo-floating-preview img {
  border-radius: 6px;
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.catlo-floating-preview button {
  background: #fff;
  border: 1px solid var(--catlo-line);
  border-radius: 50%;
  cursor: pointer;
  height: 21px;
  padding: 0;
  position: absolute;
  right: -5px;
  top: -5px;
  width: 21px;
}

.catlo-floating-preview small {
  display: block;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catlo-floating-upload-status {
  color: #475569;
  font-size: 12px;
  grid-column: 1 / -1;
  margin: 0;
}

.catlo-chat-lightbox {
  background: transparent;
  border: 0;
  max-height: 94vh;
  max-width: 94vw;
  padding: 0;
}

.catlo-chat-lightbox::backdrop {
  background: rgb(15 23 42 / 80%);
}

.catlo-chat-lightbox img {
  display: block;
  max-height: 90vh;
  max-width: 90vw;
}

.catlo-chat-lightbox button {
  background: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 36px;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 36px;
}

.catlo-floating-chat a:hover,
.catlo-directory a:hover,
.catlo-notification-center a:hover,
.catlo-notification a:hover,
.catlo-social-panel a:hover,
.catlo-social-list a:hover,
.catlo-chat-shell a:hover,
.catlo-account-container .catlo-account-breadcrumb a:hover,
.catlo-account-container .catlo-account-danger a:hover,
.catlo-account-container .catlo-account-nav-item:hover,
.catlo-account-container .catlo-security-action:hover {
  text-decoration: none;
}

.catlo-account-container .catlo-account-breadcrumb a:hover {
  color: #066d8c;
}

.catlo-account-container .catlo-account-danger a:hover {
  background: #fff1f0;
  border-radius: 6px;
  color: #991b1b;
}

.catlo-header-communication:focus-visible,
.catlo-floating-chat button:focus-visible,
.catlo-floating-chat a:focus-visible,
.catlo-directory a:focus-visible,
.catlo-directory button:focus-visible,
.catlo-directory input:focus-visible,
.catlo-notification-center a:focus-visible,
.catlo-notification-center button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .catlo-directory__grid {
    grid-template-columns: 1fr;
  }

  .catlo-directory__header,
  .catlo-notification-center__header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .catlo-floating-chat {
    bottom: 14px;
    right: 14px;
  }

  .catlo-floating-chat__label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .catlo-floating-chat__launcher {
    height: 52px;
    justify-content: center;
    padding: 0;
    width: 52px;
  }

  .catlo-floating-chat__panel {
    border: 0;
    border-radius: 0;
    bottom: 0;
    height: 100dvh;
    position: fixed;
    right: 0;
    width: 100vw;
  }

  .catlo-floating-chat__panel[data-view] {
    height: 100dvh;
    max-height: none;
  }

  .catlo-floating-chat__panel[data-view="inbox"]
    .catlo-floating-chat__content {
    flex: 1 1 auto;
    max-height: none;
  }

  body:has(.catlo-floating-chat__panel:not([hidden])) {
    overflow: hidden;
  }

  .catlo-directory__grid > li {
    align-items: stretch;
    flex-direction: column;
  }

  .catlo-directory__actions,
  .catlo-directory__actions form {
    width: 100%;
  }

  .catlo-directory__actions .catlo-chat-entry,
  .catlo-directory__actions .catlo-chat-entry button {
    width: 100%;
  }

  .catlo-directory-more__menu {
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    max-height: min(70dvh, 420px);
    overflow-y: auto;
    position: fixed;
    right: 12px;
    top: auto;
    width: auto;
    z-index: 10020;
  }
}

@media (max-width: 520px) {
  .catlo-directory__search {
    flex-basis: auto;
    max-width: none;
  }

  .catlo-directory__search div {
    grid-template-columns: minmax(0, 1fr);
  }

  .catlo-directory__search button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catlo-floating-chat *,
  .catlo-directory *,
  .catlo-notification-center * {
    scroll-behavior: auto !important;
  }
}
