#main .page-heading.comunication-page__heading {
  background: #f5f7fb;
  left: 0;
  padding: 1.5rem 2rem 1rem;
  right: 0;
  z-index: 20;
}

.comunication-page__title-row,
.comunication-page__title-copy,
.comunication-page__header-actions {
  align-items: center;
  display: flex;
}

.comunication-page__title-row {
  gap: 1rem;
  justify-content: space-between;
}

.comunication-page__title-copy {
  gap: 0.75rem;
  min-width: 0;
}

.comunication-page__title-copy > div {
  min-width: 0;
  width: 100%;
}

.comunication-page__title-copy h3 {
  letter-spacing: 0;
  margin-bottom: 0.15rem;
}

.comunication-page__title-copy p {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-page__header-actions {
  flex: 0 0 auto;
  gap: 0.75rem;
}

#main.comunication-page .page-content {
  margin-top: 0;
  padding-top: 5.8rem;
}

.comunication-workspace {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(31, 45, 61, 0.04);
  display: grid;
  grid-template-columns: minmax(320px, 356px) minmax(0, 1fr);
  height: calc(100vh - 8.4rem);
  min-height: 620px;
  overflow: hidden;
}

.comunication-directory {
  background: #fff;
  border-right: 1px solid #e4e8ef;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.comunication-directory__top {
  border-bottom: 1px solid #edf0f4;
  padding: 1rem;
}

.comunication-segmented {
  background: #f0f2f5;
  border-radius: 7px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
}

.comunication-segmented button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #6c757d;
  display: inline-flex;
  font-weight: 600;
  gap: 0.45rem;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
}

/* Tabs stay outside the global button rule and keep their own icon baseline. */
.comunication-segmented button > i.bi {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 1;
  margin: 0;
}

.comunication-segmented button > i.bi::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
}

.comunication-segmented button:hover,
.comunication-segmented button:focus-visible {
  color: #435ebe;
}

.comunication-segmented button:focus-visible,
.comunication-search input:focus-visible,
.comunication-search button:focus-visible,
.comunication-directory-item:focus-visible,
.comunication-channel-picker button:focus-visible,
.comunication-icon-button:focus-visible,
.comunication-directory__footer button:focus-visible,
.comunication-member-picker__footer button:focus-visible {
  outline: 3px solid rgba(67, 94, 190, 0.25);
  outline-offset: 1px;
}

.comunication-segmented button.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 41, 55, 0.08);
  color: #25396f;
}

.comunication-segmented small {
  background: #e3e7ee;
  border-radius: 999px;
  color: #6c757d;
  font-size: 0.68rem;
  line-height: 1;
  min-width: 1.7rem;
  padding: 0.25rem 0.35rem;
  text-align: center;
}

.comunication-segmented small.is-loading {
  color: transparent;
  position: relative;
}

.comunication-segmented small.is-loading::after {
  color: #9aa2af;
  content: '–';
  inset: 0;
  padding: 0.25rem 0.35rem;
  position: absolute;
}

.comunication-segmented button.active small {
  background: #eef1ff;
  color: #435ebe;
}

.comunication-search {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 0.85rem;
  min-height: 42px;
  padding: 0 0.35rem 0 0.75rem;
}

.comunication-search:focus-within {
  border-color: #aeb9df;
  box-shadow: 0 0 0 3px rgba(67, 94, 190, 0.14);
}

.comunication-search > i {
  color: #8b94a5;
}

.comunication-search input {
  background: transparent;
  border: 0;
  color: #25396f;
  min-width: 0;
  outline: 0;
  padding: 0.55rem 0.65rem;
}

.comunication-search button,
.comunication-directory__footer button,
.comunication-member-picker__footer button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #435ebe;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.comunication-search button:hover,
.comunication-directory__footer button:hover,
.comunication-member-picker__footer button:hover {
  background: #eef1ff;
}

.comunication-search button:disabled,
.comunication-directory__footer button:disabled,
.comunication-member-picker__footer button:disabled {
  color: #b8bec8;
}

.comunication-directory__body {
  overflow-y: auto;
  padding: 0.4rem 0.5rem;
  scrollbar-gutter: stable;
}

.comunication-directory-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #25396f;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 40px minmax(0, 1fr) 30px;
  min-height: 68px;
  padding: 0.55rem 0.65rem;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.comunication-directory-item + .comunication-directory-item {
  margin-top: 0.15rem;
}

.comunication-directory-item:hover {
  background: #f6f7fa;
  border-color: #edf0f4;
}

.comunication-directory-item.active {
  background: #eef1ff;
  border-color: #d9e0fa;
  box-shadow: inset 3px 0 0 #435ebe;
}

.comunication-avatar {
  align-items: center;
  background: #e9edfa;
  border-radius: 50%;
  color: #435ebe;
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 0.8rem;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  overflow: hidden;
  width: 40px;
}

.comunication-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.comunication-avatar--list {
  background: #e8f7f1;
  color: #198754;
  font-size: 1rem;
}

.comunication-directory-item__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.comunication-directory-item__copy strong,
.comunication-directory-item__copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-directory-item__copy strong {
  color: #25396f;
  font-size: 0.88rem;
}

.comunication-directory-item__copy > span {
  color: #7c8492;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.comunication-channel-labels {
  display: flex;
  gap: 0.55rem;
  min-width: 0;
}

.comunication-channel-labels span {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  gap: 0.25rem;
  min-width: 0;
}

.comunication-channel-labels .bi-whatsapp {
  color: #198754;
}

.comunication-channel-labels .bi-envelope {
  color: #435ebe;
}

.comunication-list-meta {
  align-items: center;
  display: flex;
  gap: 0.45rem;
  min-width: 0;
}

.comunication-list-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-list-status {
  border-radius: 4px;
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.22rem 0.35rem;
}

.comunication-list-status--active {
  background: #e8f7ef;
  color: #157347;
}

.comunication-list-status--inactive {
  background: #fdebed;
  color: #b02a37;
}

.comunication-directory-item__arrow {
  align-items: center;
  color: #b2b8c2;
  display: inline-flex;
  font-size: 0.75rem;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.comunication-directory-item__arrow i {
  align-items: center;
  display: inline-flex;
  line-height: 1;
}

.comunication-directory-item :is(.comunication-avatar, .comunication-directory-item__arrow) > i.bi::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
}

.comunication-directory__footer,
.comunication-member-picker__footer {
  align-items: center;
  border-top: 1px solid #edf0f4;
  color: #7c8492;
  display: flex;
  font-size: 0.75rem;
  justify-content: space-between;
  min-height: 50px;
  padding: 0.5rem 1rem;
}

.comunication-directory__footer > div,
.comunication-member-picker__footer {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.comunication-contact-skeleton {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 0.75rem;
}

.comunication-contact-skeleton > span,
.comunication-contact-skeleton i {
  animation: comunication-pulse 1.4s ease-in-out infinite;
  background: #edf0f4;
  display: block;
}

.comunication-contact-skeleton > span {
  border-radius: 50%;
  height: 44px;
  width: 44px;
}

.comunication-contact-skeleton div {
  display: grid;
  gap: 0.5rem;
}

.comunication-contact-skeleton i {
  border-radius: 4px;
  height: 10px;
  width: 75%;
}

.comunication-contact-skeleton i:last-child {
  width: 48%;
}

@keyframes comunication-pulse {
  50% { opacity: 0.45; }
}

.comunication-detail {
  background: #fafbfc;
  min-width: 0;
  overflow: hidden;
}

.comunication-detail__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.comunication-target-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e4e8ef;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  min-height: 78px;
  padding: 0.85rem 1.25rem;
}

.comunication-target-header > .comunication-avatar {
  height: 40px;
  width: 40px;
}

.comunication-back-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #435ebe;
  display: none !important;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.comunication-target-header__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comunication-target-header__copy > strong {
  color: #25396f;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-target-header__copy > span {
  color: #7c8492;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 0.7rem;
  margin-top: 0.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.comunication-target-header__copy > span > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.comunication-target-header__metrics {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.comunication-target-header__metrics span {
  align-items: center;
  background: #f1f3f7;
  border-radius: 5px;
  color: #657080;
  display: inline-flex;
  font-size: 0.75rem;
  gap: 0.3rem;
  min-height: 30px;
  padding: 0.35rem 0.55rem;
}

.comunication-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  color: #657080;
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.comunication-icon-button:hover {
  background: #f1f3f7;
  color: #435ebe;
}

.comunication-list-detail-error {
  align-items: center;
  background: #fff3f2;
  border-bottom: 1px solid #f4cfcc;
  color: #b02a37;
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
  padding: 0.4rem 1.25rem;
}

.comunication-history {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  scrollbar-gutter: stable;
}

.comunication-history__heading,
.comunication-composer__heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  min-width: 0;
}

.comunication-history__heading > div,
.comunication-composer__heading > div {
  display: flex;
  flex-direction: column;
}

.comunication-history__heading strong,
.comunication-composer__heading strong {
  color: #25396f;
  font-size: 0.86rem;
}

.comunication-history__heading span,
.comunication-composer__heading span {
  color: #8b94a5;
  font-size: 0.72rem;
}

.comunication-pending-key,
.comunication-queue-label {
  align-items: center;
  background: #fff4d6;
  border-radius: 5px;
  color: #8a6400 !important;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
}

.comunication-history__loading {
  align-items: center;
  color: #7c8492;
  display: flex;
  font-size: 0.8rem;
  gap: 0.5rem;
  justify-content: center;
  padding: 2rem;
}

.comunication-history__list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.comunication-message {
  align-self: flex-end;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 7px 7px 2px 7px;
  box-shadow: 0 2px 7px rgba(31, 41, 55, 0.04);
  max-width: min(680px, 92%);
  min-width: 0;
  padding: 0.75rem 0.9rem;
  width: max-content;
}

.comunication-message__meta,
.comunication-message footer {
  align-items: center;
  color: #89919e;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 0.65rem;
  justify-content: space-between;
}

.comunication-message__meta-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

.comunication-message__options {
  flex: 0 0 auto;
  margin-left: auto;
}

.comunication-message__options .comunication-icon-button {
  height: 28px;
  padding: 0;
  width: 28px;
}

.comunication-message__options .dropdown-menu {
  min-width: 8.5rem;
}

.comunication-message__options .dropdown-menu.show {
  inset: auto !important;
  margin-top: 0.35rem;
  position: static !important;
  transform: none !important;
}

.comunication-message__status {
  align-items: center;
  color: #8a6400;
  display: inline-flex;
  gap: 0.3rem;
}

.comunication-message__schedule {
  align-items: center;
  color: #566070;
  display: inline-flex;
  font-size: 0.7rem;
  gap: 0.35rem;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.comunication-message > strong {
  color: #25396f;
  display: block;
  font-size: 0.82rem;
  margin-top: 0.6rem;
  overflow-wrap: anywhere;
}

.comunication-message p {
  color: #4f5868;
  font-size: 0.84rem;
  margin: 0.45rem 0 0.7rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.comunication-message p * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comunication-message footer {
  justify-content: flex-start;
}

.comunication-message footer span {
  align-items: center;
  display: inline-flex;
  gap: 0.25rem;
}

.comunication-message__delete-error {
  align-items: center;
  color: #a53d48;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.73rem;
  gap: 0.35rem;
  margin-top: 0.65rem;
  overflow-wrap: anywhere;
}

.comunication-message__delete-error .btn {
  font-size: inherit;
  padding: 0;
}

.comunication-history__more {
  align-self: center;
}

.comunication-composer {
  background: #fff;
  border-top: 1px solid #e4e8ef;
  flex: 0 0 auto;
  padding: 0.9rem 1.25rem 1rem;
}

.comunication-channel-picker {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.comunication-channel-picker button {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  color: #657080;
  display: inline-flex;
  gap: 0.4rem;
  min-height: 38px;
  min-width: 0;
  padding: 0.4rem 0.7rem;
}

.comunication-channel-picker button small {
  color: #9aa2af;
  font-size: 0.65rem;
}

.comunication-channel-picker button.active {
  background: #eef1ff;
  border-color: #7d8ed0;
  color: #33499a;
}

.comunication-channel-picker button:disabled {
  background: #f5f6f8;
  color: #aab0ba;
  cursor: not-allowed;
}

.comunication-field {
  display: block;
  margin-bottom: 0.7rem;
}

.comunication-field > span {
  color: #566070;
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.comunication-field b {
  color: #dc3545;
}

.comunication-field .form-control {
  border-color: #dfe3e8;
  font-size: 0.82rem;
}

.comunication-field textarea {
  max-height: 150px;
  min-height: 76px;
  resize: vertical;
}

.comunication-schedule-picker {
  background: #f7f8fb;
  border: 1px solid #e4e8ef;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  padding: 0.65rem;
}

.comunication-schedule-picker__heading,
.comunication-schedule-picker__modes,
.comunication-composer__action-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.comunication-schedule-picker__heading {
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comunication-schedule-picker__heading strong {
  color: #566070;
  font-size: 0.74rem;
}

.comunication-schedule-picker__heading span,
.comunication-schedule-picker__field small,
.comunication-schedule-picker__editing-note {
  color: #7c8492;
  font-size: 0.7rem;
}

.comunication-schedule-picker__modes {
  margin-bottom: 0.55rem;
}

.comunication-schedule-picker__modes button {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  color: #657080;
  display: inline-flex;
  font-size: 0.74rem;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.3rem 0.55rem;
}

.comunication-schedule-picker__modes button.active {
  background: #eef1ff;
  border-color: #7d8ed0;
  color: #33499a;
}

.comunication-schedule-picker__modes button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.comunication-schedule-picker__field {
  margin-bottom: 0;
}

.comunication-schedule-picker__field small {
  display: block;
  margin-top: 0.3rem;
}

.comunication-schedule-picker__editing-note,
.comunication-confirmation__schedule {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  overflow-wrap: anywhere;
}

.comunication-schedule-picker__editing-note {
  margin-top: 0.55rem;
}

.comunication-confirmation__schedule {
  color: #566070;
  font-size: 0.76rem;
}

.comunication-image-attachment {
  border: 1px dashed #cdd4df;
  border-radius: 6px;
  margin: -0.05rem 0 0.75rem;
  padding: 0.65rem;
}

.comunication-image-attachment__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
}

.comunication-image-attachment__actions > span {
  color: #7c8492;
  font-size: 0.7rem;
}

.comunication-image-attachment__preview {
  align-items: center;
  background: #f7f8fb;
  border: 1px solid #e4e8ef;
  border-radius: 5px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 52px minmax(0, 1fr) 32px;
  margin-top: 0.65rem;
  min-width: 0;
  padding: 0.45rem;
}

.comunication-image-attachment__preview > img,
.comunication-image-attachment__placeholder {
  background: #e9edf4;
  border-radius: 4px;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.comunication-image-attachment__placeholder {
  align-items: center;
  color: #657080;
  display: inline-flex;
  justify-content: center;
}

.comunication-image-attachment__preview > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comunication-image-attachment__preview strong {
  color: #25396f;
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-image-attachment__preview > div > span {
  color: #7c8492;
  font-size: 0.69rem;
  overflow-wrap: anywhere;
}

.comunication-image-attachment__preview .btn-link {
  align-self: flex-start;
  font-size: 0.7rem;
  min-height: 24px;
  padding: 0.1rem 0;
}

.comunication-message__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.45rem 0 0.7rem;
}

.comunication-message__attachments a {
  align-items: center;
  background: #f7f8fb;
  border: 1px solid #e4e8ef;
  border-radius: 5px;
  color: #4f5868;
  display: inline-flex;
  gap: 0.4rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.35rem;
  text-decoration: none;
}

.comunication-message__attachments a:hover {
  border-color: #7d8ed0;
  color: #33499a;
}

.comunication-message__attachments img {
  border-radius: 3px;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.comunication-message__attachments span,
.comunication-confirmation__attachment span {
  align-items: center;
  display: inline-flex;
  font-size: 0.7rem;
  gap: 0.35rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.comunication-composer__actions,
.comunication-confirmation__actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-width: 0;
}

.comunication-composer__actions > span {
  color: #9aa2af;
  font-size: 0.68rem;
}

.comunication-composer__action-buttons {
  justify-content: flex-end;
}

.comunication-feedback {
  align-items: flex-start;
  border-radius: 6px;
  display: flex;
  font-size: 0.78rem;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  overflow-wrap: anywhere;
}

.comunication-feedback--error {
  background: #fff1f0;
  color: #b02a37;
}

.comunication-feedback--success {
  background: #eaf8f1;
  color: #146c43;
}

.comunication-feedback > div {
  display: flex;
  flex-direction: column;
}

.comunication-feedback span {
  font-size: 0.72rem;
}

.comunication-confirmation {
  background: #f7f8fb;
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  padding: 0.8rem;
}

.comunication-confirmation__title {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.comunication-confirmation__title > i {
  color: #435ebe;
  font-size: 1.1rem;
}

.comunication-confirmation__title > div {
  display: flex;
  flex-direction: column;
}

.comunication-confirmation__title span,
.comunication-confirmation > p {
  color: #7c8492;
  font-size: 0.7rem;
}

.comunication-delivery-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.4rem;
}

.comunication-delivery-summary span {
  align-items: center;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 5px;
  color: #657080;
  display: inline-flex;
  font-size: 0.72rem;
  gap: 0.3rem;
  padding: 0.4rem 0.55rem;
}

.comunication-confirmation__attachment {
  align-items: center;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 5px;
  color: #657080;
  display: flex;
  gap: 0.5rem;
  margin: 0.65rem 0;
  min-width: 0;
  padding: 0.4rem;
}

.comunication-confirmation__attachment img {
  border-radius: 3px;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.comunication-confirmation > p {
  margin-bottom: 0.65rem;
}

.comunication-readonly {
  align-items: center;
  background: #f3f5f8;
  border-top: 1px solid #e4e8ef;
  color: #657080;
  display: flex;
  font-size: 0.78rem;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
}

.comunication-state {
  align-items: center;
  color: #7c8492;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.comunication-state h3,
.comunication-state strong {
  color: #25396f;
}

.comunication-state p {
  font-size: 0.8rem;
  margin: 0.35rem 0 0.8rem;
  max-width: 420px;
}

.comunication-state--selection {
  height: 100%;
  padding: 2rem;
}

.comunication-state__illustration {
  align-items: center;
  background: #eef1ff;
  border-radius: 50%;
  color: #435ebe;
  display: inline-flex;
  font-size: 1.75rem;
  height: 72px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 72px;
}

.comunication-state--compact {
  min-height: 260px;
  padding: 1.5rem;
}

.comunication-state--compact > i,
.comunication-state--history > i {
  color: #8b94a5;
  font-size: 1.4rem;
  margin-bottom: 0.45rem;
}

.comunication-state--history {
  min-height: 150px;
  padding: 1rem;
}

.comunication-state--member-picker {
  min-height: 230px;
  padding: 1.25rem;
}

.comunication-state--member-picker > i {
  color: #8b94a5;
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.comunication-access-denied {
  align-items: center;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  color: #7c8492;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.comunication-access-denied > i {
  color: #dc3545;
  font-size: 2rem;
}

.comunication-access-denied h3 {
  color: #25396f;
  margin-top: 0.7rem;
}

.comunication-dialog-backdrop {
  background: rgba(14, 20, 33, 0.5);
  inset: 0;
  position: fixed;
  z-index: 1040;
}

.comunication-list-editor {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(14, 20, 33, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: min(780px, calc(100vh - 3rem));
  left: 50%;
  max-width: 900px;
  overflow: hidden;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 3rem);
  z-index: 1050;
}

.comunication-list-editor > header,
.comunication-list-editor__actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.comunication-list-editor > header {
  border-bottom: 1px solid #e4e8ef;
}

.comunication-list-editor > header h3 {
  color: #25396f;
  font-size: 1.1rem;
  margin: 0;
}

.comunication-list-editor > header p {
  color: #7c8492;
  font-size: 0.76rem;
  margin: 0.15rem 0 0;
}

.comunication-list-editor__body {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  min-height: 0;
  overflow: hidden;
}

.comunication-list-editor__fields {
  border-right: 1px solid #e4e8ef;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.comunication-list-editor__active {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
  padding-left: 0;
}

.comunication-list-editor__active .form-check-input {
  float: none;
  margin: 0;
}

.comunication-selected-members {
  border-top: 1px solid #edf0f4;
  padding-top: 0.8rem;
}

.comunication-selected-members > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.comunication-selected-members > div:first-child span {
  background: #eef1ff;
  border-radius: 999px;
  color: #435ebe;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
}

.comunication-selected-members > p {
  color: #8b94a5;
  font-size: 0.75rem;
  margin-top: 0.65rem;
}

.comunication-selected-members__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  max-width: 100%;
}

.comunication-selected-members__list > span {
  align-items: center;
  background: #f1f3f7;
  border-radius: 5px;
  color: #566070;
  display: inline-flex;
  font-size: 0.7rem;
  gap: 0.25rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.3rem 0.35rem 0.3rem 0.5rem;
}

.comunication-selected-members__list button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #657080;
  display: inline-flex;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  padding: 0;
}

.comunication-member-picker {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 1rem 1.25rem 0;
}

.comunication-member-picker__heading > div {
  display: flex;
  flex-direction: column;
}

.comunication-member-picker__heading span {
  color: #8b94a5;
  font-size: 0.7rem;
}

.comunication-member-picker__list {
  margin: 0 -0.4rem;
  overflow-y: auto;
  padding: 0.5rem 0.4rem;
  scrollbar-gutter: stable;
}

.comunication-member-option {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 36px minmax(0, 1fr);
  min-height: 54px;
  padding: 0.45rem;
}

.comunication-member-option:hover {
  background: #f6f7fa;
}

.comunication-member-option > input {
  flex-shrink: 0;
}

.comunication-member-option .comunication-avatar {
  flex-basis: 36px;
  height: 36px;
  width: 36px;
}

.comunication-member-option > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comunication-member-option strong {
  color: #25396f;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comunication-member-option small {
  color: #7c8492;
  display: flex;
  gap: 0.45rem;
}

.comunication-member-picker__footer {
  margin: 0 -1.25rem;
  justify-content: center;
}

.comunication-list-editor__error {
  margin: 0.75rem 1.25rem 0;
}

.comunication-list-editor__actions {
  border-top: 1px solid #e4e8ef;
  justify-content: flex-end;
}

body.theme-dark #main .page-heading.comunication-page__heading {
  background: #151521;
}

body.theme-dark .comunication-page__title-copy h3,
body.theme-dark .comunication-directory-item__copy strong,
body.theme-dark .comunication-target-header__copy > strong,
body.theme-dark .comunication-history__heading strong,
body.theme-dark .comunication-composer__heading strong,
body.theme-dark .comunication-message > strong,
body.theme-dark .comunication-state h3,
body.theme-dark .comunication-state strong,
body.theme-dark .comunication-list-editor > header h3,
body.theme-dark .comunication-member-option strong {
  color: #f3f4f7;
}

body.theme-dark .comunication-workspace,
body.theme-dark .comunication-directory,
body.theme-dark .comunication-target-header,
body.theme-dark .comunication-composer,
body.theme-dark .comunication-message,
body.theme-dark .comunication-list-editor,
body.theme-dark .comunication-search,
body.theme-dark .comunication-access-denied {
  background: #1e1e2d;
  border-color: #343447;
}

body.theme-dark .comunication-detail {
  background: #181824;
}

body.theme-dark .comunication-directory,
body.theme-dark .comunication-directory__top,
body.theme-dark .comunication-directory__footer,
body.theme-dark .comunication-target-header,
body.theme-dark .comunication-composer,
body.theme-dark .comunication-readonly,
body.theme-dark .comunication-list-editor > header,
body.theme-dark .comunication-list-editor__fields,
body.theme-dark .comunication-list-editor__actions,
body.theme-dark .comunication-member-picker__footer {
  border-color: #343447;
}

body.theme-dark .comunication-segmented,
body.theme-dark .comunication-readonly,
body.theme-dark .comunication-channel-picker button:disabled,
body.theme-dark .comunication-confirmation,
body.theme-dark .comunication-selected-members__list > span,
body.theme-dark .comunication-image-attachment__preview,
body.theme-dark .comunication-message__attachments a,
body.theme-dark .comunication-confirmation__attachment {
  background: #272738;
}

body.theme-dark .comunication-schedule-picker,
body.theme-dark .comunication-schedule-picker__modes button {
  background: #272738;
  border-color: #3b3b4f;
}

body.theme-dark .comunication-schedule-picker__modes button.active {
  background: #303653;
  border-color: #697ab8;
  color: #f3f4f7;
}

body.theme-dark .comunication-segmented button.active,
body.theme-dark .comunication-delivery-summary span {
  background: #343447;
  color: #f3f4f7;
}

body.theme-dark .comunication-directory-item:hover,
body.theme-dark .comunication-member-option:hover {
  background: #272738;
}

body.theme-dark .comunication-directory-item.active,
body.theme-dark .comunication-channel-picker button.active {
  background: #303653;
}

body.theme-dark .comunication-directory-item.active {
  border-color: #424c78;
}

body.theme-dark .comunication-list-status--active {
  background: #1d3a31;
  color: #72d6a8;
}

body.theme-dark .comunication-list-status--inactive {
  background: #3a252b;
  color: #f0a0aa;
}

body.theme-dark .comunication-search input,
body.theme-dark .comunication-field .form-control {
  color: #f3f4f7;
}

body.theme-dark .comunication-search:focus-within {
  border-color: #697ab8;
  box-shadow: 0 0 0 3px rgba(125, 142, 208, 0.2);
}

body.theme-dark .comunication-field .form-control {
  background: #181824;
  border-color: #3b3b4f;
}

body.theme-dark .comunication-target-header__metrics span,
body.theme-dark .comunication-channel-picker button {
  background: #272738;
  border-color: #3b3b4f;
}

body.theme-dark .comunication-message p,
body.theme-dark .comunication-field > span,
body.theme-dark .comunication-delivery-summary span,
body.theme-dark .comunication-image-attachment__actions > span,
body.theme-dark .comunication-image-attachment__preview > div > span,
body.theme-dark .comunication-message__attachments a,
body.theme-dark .comunication-confirmation__attachment {
  color: #c2c5cd;
}

body.theme-dark .comunication-message__schedule,
body.theme-dark .comunication-schedule-picker__heading strong,
body.theme-dark .comunication-confirmation__schedule {
  color: #c2c5cd;
}

body.theme-dark .comunication-message__delete-error {
  color: #f0a0aa;
}

body.theme-dark .comunication-image-attachment,
body.theme-dark .comunication-image-attachment__preview,
body.theme-dark .comunication-message__attachments a,
body.theme-dark .comunication-confirmation__attachment {
  border-color: #3b3b4f;
}

body.theme-dark .comunication-image-attachment__preview strong {
  color: #f3f4f7;
}

body.theme-dark .comunication-image-attachment__placeholder {
  background: #343447;
  color: #c2c5cd;
}

body.theme-dark .comunication-contact-skeleton > span,
body.theme-dark .comunication-contact-skeleton i {
  background: #303043;
}

body.theme-dark .comunication-list-detail-error,
body.theme-dark .comunication-feedback--error {
  background: #3a252b;
}

body.theme-dark .comunication-feedback--success {
  background: #1d3a31;
  color: #d1fae5;
}

@media (max-width: 1199px) {
  #main .page-heading.comunication-page__heading {
    left: 0;
  }
}

@media (max-width: 900px) {
  #main.comunication-page .page-content {
    padding-top: 6.2rem;
  }

  .comunication-workspace {
    display: block;
    height: calc(100vh - 9rem);
    min-height: 560px;
    position: relative;
  }

  .comunication-directory,
  .comunication-detail {
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
  }

  .comunication-directory {
    border-right: 0;
  }

  .comunication-directory--mobile-hidden {
    display: none;
  }

  .comunication-detail {
    display: none;
  }

  .comunication-detail--mobile-visible {
    display: block;
  }

  .comunication-back-button {
    display: inline-flex !important;
  }

  .comunication-target-header {
    grid-template-columns: 36px 40px minmax(0, 1fr) auto auto;
    padding: 0.7rem 0.8rem;
  }

  .comunication-target-header__metrics {
    grid-column: 3 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .comunication-target-header .comunication-avatar {
    flex-basis: 40px;
    height: 40px;
    width: 40px;
  }

  .comunication-list-editor__body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .comunication-list-editor__fields {
    border-bottom: 1px solid #e4e8ef;
    border-right: 0;
    overflow: visible;
  }

  .comunication-member-picker {
    min-height: 380px;
  }
}

@media (max-width: 575px) {
  #main .page-heading.comunication-page__heading {
    padding: 1rem;
  }

  body:not(.theme-dark) #main .page-heading.comunication-page__heading .page-title h3 {
    color: #25396f;
  }

  body:not(.theme-dark) #main .page-heading.comunication-page__heading .page-title p {
    color: #6c757d !important;
    opacity: 1;
  }

  body:not(.theme-dark) #main .page-heading.comunication-page__heading .header-menu-responsive i {
    color: #25396f !important;
  }

  .comunication-page__title-copy h3 {
    font-size: 1.25rem;
  }

  .comunication-page__title-copy p {
    font-size: 0.72rem;
  }

  .comunication-page__header-actions .btn span {
    display: none;
  }

  .comunication-page__header-actions .btn {
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
  }

  #main.comunication-page .page-content {
    padding: 5.6rem 0 0;
  }

  .comunication-workspace {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    height: calc(100vh - 5.6rem);
    min-height: 520px;
  }

  .comunication-target-header__metrics {
    display: none;
  }

  .comunication-target-header {
    grid-template-columns: 36px 40px minmax(0, 1fr) auto;
  }

  .comunication-history,
  .comunication-composer {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .comunication-directory__top {
    padding: 0.8rem;
  }

  .comunication-directory__body {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .comunication-directory-item {
    padding-left: 0.55rem;
    padding-right: 0.5rem;
  }

  .comunication-message {
    max-width: 96%;
  }

  .comunication-history__heading > div span,
  .comunication-composer__heading > div span,
  .comunication-pending-key,
  .comunication-queue-label {
    display: none;
  }

  .comunication-channel-picker button {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .comunication-channel-picker button small {
    display: none;
  }

  .comunication-image-attachment__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .comunication-list-editor {
    border-radius: 0;
    height: 100dvh;
    max-height: none;
    width: 100%;
  }

  .comunication-list-editor__body {
    min-height: 0;
  }

  .comunication-list-editor > header,
  .comunication-list-editor__actions,
  .comunication-list-editor__fields,
  .comunication-member-picker {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .comunication-list-editor__actions {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .comunication-list-editor__actions .btn {
    min-height: 40px;
  }

  .comunication-confirmation__actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 0.35rem;
  }
}
