!*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
@layer properties;
.visible {
  visibility: visible;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.relative {
  position: relative;
}
.static {
  position: static;
}
.isolate {
  isolation: isolate;
}
.z-20 {
  z-index: 20;
}
.z-30 {
  z-index: 30;
}
.z-40 {
  z-index: 40;
}
.z-50 {
  z-index: 50;
}
.col-span-2 {
  grid-column: span 2 / span 2;
}
."!container {
  width: 100% !important;
}
.container {
  width: 100%;
}
.mx-auto {
  margin-inline: auto;
}
.-mb-px {
  margin-bottom: -1px;
}
.block {
  display: block;
}
.contents {
  display: contents;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.inline {
  display: inline;
}
.inline-block {
  display: inline-block;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.h-full {
  height: 100%;
}
.h-screen {
  height: 100vh;
}
.max-h-\[85vh\] {
  max-height: 85vh;
}
.w-full {
  width: 100%;
}
.max-w-\[90vw\] {
  max-width: 90vw;
}
.min-w-full {
  min-width: 100%;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.flex-grow {
  flex-grow: 1;
}
.translate-x-\[120\%\] {
  --tw-translate-x: 120%;
  translate: var(--tw-translate-x) var(--tw-translate-y);
}
.-rotate-\[15deg\] {
  rotate: calc(15deg * -1);
}
.rotate-90 {
  rotate: 90deg;
}
.rotate-180 {
  rotate: 180deg;
}
.transform {
  transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
}
.cursor-default {
  cursor: default;
}
.cursor-pointer {
  cursor: pointer;
}
.resize {
  resize: both;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.divide-y {
  :where(& > :not(:last-child)) {
    --tw-divide-y-reverse: 0;
    border-bottom-style: var(--tw-border-style);
    border-top-style: var(--tw-border-style);
    border-top-width: calc(1px * var(--tw-divide-y-reverse));
    border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
  }
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-auto {
  overflow-x: auto;
}
.overflow-y-auto {
  overflow-y: auto;
}
.rounded-full {
  border-radius: calc(infinity * 1px);
}
.border {
  border-style: var(--tw-border-style);
  border-width: 1px;
}
.border-2 {
  border-style: var(--tw-border-style);
  border-width: 2px;
}
.border-t {
  border-top-style: var(--tw-border-style);
  border-top-width: 1px;
}
.border-b {
  border-bottom-style: var(--tw-border-style);
  border-bottom-width: 1px;
}
.border-b-2 {
  border-bottom-style: var(--tw-border-style);
  border-bottom-width: 2px;
}
.border-transparent {
  border-color: transparent;
}
.object-contain {
  object-fit: contain;
}
.object-cover {
  object-fit: cover;
}
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.whitespace-nowrap {
  white-space: nowrap;
}
.lowercase {
  text-transform: lowercase;
}
.uppercase {
  text-transform: uppercase;
}
.opacity-0 {
  opacity: 0%;
}
.opacity-25 {
  opacity: 25%;
}
.opacity-50 {
  opacity: 50%;
}
.opacity-75 {
  opacity: 75%;
}
.opacity-80 {
  opacity: 80%;
}
.ring-2 {
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}
.ring-offset-1 {
  --tw-ring-offset-width: 1px;
  --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
}
.outline {
  outline-style: var(--tw-outline-style);
  outline-width: 1px;
}
.filter {
  filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
}
.transition {
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
  transition-timing-function: var(--tw-ease, ease);
  transition-duration: var(--tw-duration, 0s);
}
.transition-colors {
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
  transition-timing-function: var(--tw-ease, ease);
  transition-duration: var(--tw-duration, 0s);
}
.transition-opacity {
  transition-property: opacity;
  transition-timing-function: var(--tw-ease, ease);
  transition-duration: var(--tw-duration, 0s);
}
.transition-transform {
  transition-property: transform, translate, scale, rotate;
  transition-timing-function: var(--tw-ease, ease);
  transition-duration: var(--tw-duration, 0s);
}
.duration-300 {
  --tw-duration: 300ms;
  transition-duration: 300ms;
}
.group-hover\:opacity-100 {
  &:is(:where(.group):hover *) {
    @media (hover: hover) {
      opacity: 100%;
    }
  }
}
.after\:absolute {
  &::after {
    content: var(--tw-content);
    position: absolute;
  }
}
.after\:left-\[2px\] {
  &::after {
    content: var(--tw-content);
    left: 2px;
  }
}
.after\:rounded-full {
  &::after {
    content: var(--tw-content);
    border-radius: calc(infinity * 1px);
  }
}
.after\:border {
  &::after {
    content: var(--tw-content);
    border-style: var(--tw-border-style);
    border-width: 1px;
  }
}
.after\:transition-all {
  &::after {
    content: var(--tw-content);
    transition-property: all;
    transition-timing-function: var(--tw-ease, ease);
    transition-duration: var(--tw-duration, 0s);
  }
}
.after\:content-\[\'\] {
  &::after {
    --tw-content: '';
    content: var(--tw-content);
  }
}
.peer-checked\:after\:translate-x-full {
  &:is(:where(.peer):checked ~ *) {
    &::after {
      content: var(--tw-content);
      --tw-translate-x: 100%;
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
  }
}
.hover\:scale-110 {
  &:hover {
    @media (hover: hover) {
      --tw-scale-x: 110%;
      --tw-scale-y: 110%;
      --tw-scale-z: 110%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
  }
}
.hover\:underline {
  &:hover {
    @media (hover: hover) {
      text-decoration-line: underline;
    }
  }
}
.focus\:ring-2 {
  &:focus {
    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
}
.focus\:ring-offset-2 {
  &:focus {
    --tw-ring-offset-width: 2px;
    --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  }
}
.focus\:outline-none {
  &:focus {
    --tw-outline-style: none;
    outline-style: none;
  }
}
.disabled\:cursor-not-allowed {
  &:disabled {
    cursor: not-allowed;
  }
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
body {
  background-color: #f0f0f0;
}
.chat-container {
  height: 100%;
  max-width: 1280px;
  margin: auto;
  box-shadow: 0 0 25px rgba(0,0,0,0.1);
  display: flex;
  overflow: hidden;
  background-color: white;
  position: relative;
}
.sidebar {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid #e5e7eb;
  background-color: white;
}
.main-chat-wrapper {
  position: relative;
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #efeae2;
}
.detail-panel {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
  border-left: 1px solid #e5e7eb;
}
.panel, .main-chat, .detail-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
  z-index: 10;
}
.panel:not(.active), .main-chat:not(.active), .detail-content:not(.active) {
  transform: translateX(100%);
  z-index: 1;
  pointer-events: none;
}
.panel.active, .main-chat.active, .detail-content.active {
  transform: translateX(0);
  z-index: 20;
}
#panel-contacts {
  position: relative;
  transform: none;
  z-index: 5;
}
#placeholder-area {
  position: relative;
  z-index: 5;
}
.chat-container.mode-mobile .sidebar {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
}
.chat-container.mode-mobile .main-chat-wrapper {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}
.chat-container.mode-mobile .detail-panel {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 120;
  pointer-events: none;
  border-left: none;
}
.chat-container.mode-mobile .detail-panel .detail-content.active {
  pointer-events: all;
}
.chat-container.mode-mobile.main-view-active .sidebar {
  transform: translateX(-100%);
}
.chat-container.mode-mobile.main-view-active .main-chat-wrapper {
  transform: translateX(0);
  z-index: 110;
}
.chat-container.mode-mobile .main-chat-wrapper .panel {
  z-index: 30;
}
#main-chat-area .header-avatar-wrapper + div {
  margin-left: 0.75rem;
}
.chat-container.mode-mobile #back-to-contacts-btn {
  display: block;
}
.chat-container.mode-mobile #profile-close-btn {
  display: none;
}
.chat-container.mode-tablet .sidebar {
  flex-basis: 50%;
}
.chat-container.mode-tablet .main-chat-wrapper {
  flex-basis: 50%;
}
.chat-container.mode-tablet .detail-panel {
  flex-basis: 50%;
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
  border-left: none;
}
.chat-container.mode-tablet .detail-panel .detail-content.active {
  pointer-events: all;
}
.chat-container.mode-tablet .panel {
  z-index: 20;
}
.chat-container.mode-tablet .main-chat {
  z-index: 10;
}
.chat-container.mode-tablet .main-chat-wrapper .panel {
  z-index: 20;
}
.chat-container.mode-tablet #back-to-contacts-btn {
  display: none;
}
.chat-container.mode-tablet #profile-close-btn {
  display: none;
}
.chat-container.mode-desktop .sidebar {
  flex-basis: 30%;
  max-width: 380px;
  min-width: 300px;
}
.chat-container.mode-desktop .main-chat-wrapper {
  flex-basis: 70%;
  transition: flex-basis 0.3s ease-in-out;
}
.chat-container.mode-desktop .detail-panel {
  flex-basis: 0;
  min-width: 0;
  transition: flex-basis 0.3s ease-in-out, min-width 0.3s ease-in-out;
  overflow: hidden;
}
.chat-container.mode-desktop.detail-view-open .main-chat-wrapper {
  flex-basis: 40%;
}
.chat-container.mode-desktop.detail-view-open .detail-panel {
  flex-basis: 30%;
  min-width: 320px;
}
.chat-container.mode-desktop .panel {
  z-index: 20;
}
.chat-container.mode-desktop .main-chat-wrapper .panel {
  display: none;
}
.chat-container.mode-desktop #back-to-contacts-btn {
  display: none;
}
.chat-container.mode-desktop #profile-close-btn {
  display: none;
}
#account-switcher {
  padding: 5px 4px;
  margin: -5px 0;
  overflow-x: auto;
  overflow-y: visible;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#account-switcher::-webkit-scrollbar {
  display: none;
}
.account-switcher-btn {
  margin-right: 0.75rem !important;
  padding: 0;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  filter: grayscale(60%);
  opacity: 0.7;
  transform: scale(1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.account-switcher-btn:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.account-switcher-btn.ring-2 {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 0 0 2px white, 0 0 0 4px #3b82f6, 0 2px 8px rgba(59, 130, 246, 0.4);
}
.account-switcher-btn .unread-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: #ef4444;
  color: white;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: bold;
  height: 1rem;
  width: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  z-index: 10;
}
.contact-item.active {
  background-color: #e0f2fe;
  border-left: 4px solid #3b82f6;
  padding-left: calc(0.75rem - 4px);
}
.contact-item {
  border-left: 4px solid transparent;
  padding-left: 0.75rem;
}
.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 2rem; /* Increased side padding */
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #efeae2;
  background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
  background-blend-mode: overlay;
}
#message-list {
  margin-top: auto;
}
.avatar-circle {
  position: relative;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-avatar-wrapper {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-avatar-wrapper .avatar-circle {
  width: 100%;
  height: 100%;
}
.avatar-timer-overlay {
  position: absolute;
  bottom: -1px;
  right: -1px;
  z-index: 10;
  background-color: white;
  color: #4CAF50;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px white;
  transform: translate(15%, 15%);
}
.contact-item .avatar-timer-overlay {
  width: 14px;
  height: 14px;
}
.header-avatar-wrapper .avatar-timer-overlay, #profile-avatar-container .avatar-timer-overlay {
  width: 20px;
  height: 20px;
  bottom: 0px;
  right: 0px;
  transform: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.message-wrapper {
  margin-bottom: 0.2rem;
  padding: 0 2px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  position: relative;
}
.message {
  max-width: 90%;
  min-width: 80px;
  padding: 6px 7px 20px 9px; /* Increased bottom padding for timestamp */
  position: relative;
  display: block;
  word-break: break-word;
  font-size: 0.9rem;
  border-radius: 7.5px;
  filter: drop-shadow(0 1px 0.5px rgba(0, 0, 0, 0.13));
  margin-bottom: 2px;
}

@media (min-width: 768px) {
  .message {
    max-width: 65%;
  }
}
.message-wrapper.sent {
  justify-content: flex-end;
}
.message-wrapper.received {
  justify-content: flex-start;
}
.message.sent {
  background-color: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 0;
  margin-right: 5px;
  margin-left: auto;
}
.message.received {
  background-color: #ffffff;
  color: #111b21;
  border-top-left-radius: 0;
  margin-left: 5px;
  margin-right: auto;
}
.message.sent::before {
    content: "";
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #d9fdd3;
    border-right: 8px solid transparent;
}
.message.received::before {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #ffffff;
    border-left: 8px solid transparent;
}
.message.system {
  align-self: center;
  background-color: #e5e7eb;
  color: #4b5563;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  margin: 0.5rem auto;
  text-align: center;
  line-height: 1.4;
  box-shadow: none;
  white-space: normal;
  word-break: normal;
}
.message-content-wrapper {
  display: flow-root;
}
.message-text-content {
  min-height: 1.1rem;
  line-height: 1.3;
  word-break: break-word;
}
.time-status-container {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1;
  white-space: nowrap;
  position: absolute;
  bottom: 3px;
  right: 10px;
  pointer-events: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.message-image-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  width: 300px;
  max-width: 100%;
  height: 280px;
  background-color: #f0f0f0;
}
.message-image-content {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.message.sent .message-image-container {
  border-radius: 8px;
}
.message.received .message-image-container {
  border-radius: 8px;
}
.message-image-container .time-status-container {
  position: absolute;
  bottom: 4px;
  right: 7px;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 0.65rem;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: none;
  margin-top: 0;
}
.message-image-container .message-status-icon svg {
  color: white;
}
.message-image-container .message-status-icon.read svg {
  color: #53bdeb !important;
}
.message-status-icon svg {
  height: 0.8rem;
  width: 0.8rem;
}
.message-status-icon .text-blue-500 {
  color: #3b82f6 !important;
}
.message-edited-indicator {
  font-style: italic;
  margin-left: 4px;
}
.quoted-message-wrapper {
  margin-bottom: 0.1rem;
  padding-top: 0.2rem;
  cursor: pointer;
}
.quoted-message {
  background: rgba(0,0,0,0.05);
  border-left: 3px solid #34d399;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}
.quoted-message .author {
  font-weight: bold;
  font-size: 0.75rem;
}
.quoted-message .text {
  font-size: 0.75rem;
  opacity: 0.8;
}
.message.highlight {
  animation: highlight-anim 1.5s ease-out;
}
@keyframes highlight-anim {
  0% {
    background-color: #a7f3d0;
  }
  100% {
    background-color: inherit;
  }
}
.swipe-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.swipe-reply-icon {
  color: #6b7280;
  font-size: 1.5rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.message-wrapper.sent .swipe-reply-icon {
  right: 10px;
}
.message-wrapper.received .swipe-reply-icon {
  left: 10px;
}
.message.system a {
  text-decoration: underline;
  color: #3b82f6;
}
.sticky-date-header {
  position: sticky;
  top: 10px;
  z-index: 10;
  text-align: center;
  margin-bottom: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}
.sticky-date-header.visible {
  opacity: 1;
  visibility: visible;
}
.sticky-date-header span {
  background-color: rgba(229, 231, 235, 0.9);
  color: #4b5563;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}
.date-separator {
  text-align: center;
  margin: 1rem 0;
}
.date-separator span {
  background-color: rgba(229, 231, 235, 0.8);
  color: #4b5563;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}
#main-chat-area header {
  background-color: #f0f2f5;
  border-bottom: 1px solid #d1d7db;
}
#main-chat-area footer {
  background-color: #f0f2f5;
  padding: 5px 16px;
}
#message-form {
    background-color: #f0f2f5;
}
#message-input {
    border-radius: 20px;
    padding: 9px 12px;
    background-color: #ffffff;
    border: none;
}
.last-message {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#message-context-menu, #chat-list-context-menu {
  z-index: 1000;
}
#delete-chat-modal-confirm-btn:disabled {
  background-color: #fca5a5;
  cursor: not-allowed;
}
#chat-search-input, #user-search-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%239ca3af'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 1rem 1rem;
  padding-left: 2.25rem;
}
.header-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
.permission-warning-banner {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #FFFBE6;
  border-bottom: 1px solid #E0E0E0;
  color: #5D4037;
}
.permission-warning-icon {
  margin-right: 12px;
  font-size: 24px;
}
.permission-warning-text {
  flex-grow: 1;
}
.permission-warning-text strong {
  font-weight: bold;
  display: block;
  color: #000;
}
.permission-warning-text p {
  margin: 4px 0 0 0;
  font-size: 0.9em;
  line-height: 1.4;
}
.permission-warning-text a {
  color: #007BFF;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}
.permission-prompt-banner {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #E0F2FE;
  border-bottom: 1px solid #E0E0E0;
  color: #014361;
}
.permission-prompt-icon {
  margin-right: 12px;
  font-size: 24px;
  flex-shrink: 0;
}
.permission-prompt-text {
  flex-grow: 1;
}
.permission-prompt-text strong {
  font-weight: bold;
  display: block;
  color: #000;
}
.permission-prompt-text p {
  margin: 4px 0 0 0;
  font-size: 0.9em;
  line-height: 1.4;
}
.permission-prompt-action {
  flex-shrink: 0;
  margin-left: 12px;
}
.permission-prompt-button {
  background-color: #3b82f6;
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.permission-prompt-button:hover {
  background-color: #2563eb;
}
#permission-focus-overlay {
  z-index: 1999;
}
.panel-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  font-weight: 500;
  color: #3b82f6;
  cursor: pointer;
  transition: background-color 0.2s;
}
.panel-footer-link:hover {
  background-color: #f9fafb;
}
.invite-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
}
.invite-item-code {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  word-break: break-all;
  margin-bottom: 0.5rem;
}
.invite-item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
}
.invite-item-actions {
  display: flex;
  align-items: center;
}
.copy-invite-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  font-weight: 500;
  padding: 4px;
  border-radius: 4px;
}
.copy-invite-btn:hover {
  background-color: #eff6ff;
}
.copy-invite-btn svg {
  width: 1rem;
  height: 1rem;
  margin-right: 4px;
}
.modern-footer {
  background-color: #3b82f6;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-top: none;
  padding: 1.1rem;
}
.modern-footer:hover {
  background-color: #2563eb;
}
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0px);
  }
}
.alias-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 2px dashed #9ca3af;
  background-color: #f9fafb;
  opacity: 0.7;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.alias-add-btn:hover {
  opacity: 1;
  border-color: #3b82f6;
  background-color: #eff6ff;
}
.alias-add-btn .plus-icon {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background-color: #3b82f6;
  color: white;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
}
.alias-delete-overlay {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background-color: #ef4444;
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  border: 2px solid white;
  z-index: 10;
  opacity: 0; /* This is important! */
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none; /* Prevent clicks when invisible */
}
#account-switcher.alias-delete-mode .account-switcher-btn[data-is-alias="true"] .alias-delete-overlay {
  opacity: 1;
  transform: scale(1);
  pointer-events: all; /* Enable clicks when visible */
}
#account-switcher.alias-delete-mode .alias-add-btn {
  display: none;
}
.timer-option-btn {
  background-color: #f3f4f6;
  color: #1f2937;
  font-weight: 500;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
  border: 1px solid #e5e7eb;
}
.timer-option-btn:hover {
  background-color: #e5e7eb;
  transform: translateY(-2px);
}
.timer-option-btn:active {
  transform: translateY(0);
}
@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modern-dropdown {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  animation: fade-in-scale 0.1s ease-out forwards;
  transform-origin: top left;
  border: 1px solid #f3f4f6;
}
.modern-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}
.modern-dropdown a:hover {
  background-color: #f9fafb;
}
[data-tooltip] {
  position: relative;
  cursor: pointer;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background-color: #1f2937;
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 2000;
}
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
}
@media (max-width: 480px) {
  #timer-options-grid {
    grid-template-columns: 1fr;
  }
  .timer-option-btn.col-span-2 {
    grid-column: span 1 / span 1;
  }
}
.contact-index-letter {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3b82f6;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 1rem;
}
.contact-index-item {
  transition: background-color 0.2s ease;
}
@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}
@property --tw-divide-y-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-inset-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-ring-color {
  syntax: "*";
  inherits: false;
}
@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false;
}
@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-ring-inset {
  syntax: "*";
  inherits: false;
}
@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}
@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-outline-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-blur {
  syntax: "*";
  inherits: false;
}
@property --tw-brightness {
  syntax: "*";
  inherits: false;
}
@property --tw-contrast {
  syntax: "*";
  inherits: false;
}
@property --tw-grayscale {
  syntax: "*";
  inherits: false;
}
@property --tw-hue-rotate {
  syntax: "*";
  inherits: false;
}
@property --tw-invert {
  syntax: "*";
  inherits: false;
}
@property --tw-opacity {
  syntax: "*";
  inherits: false;
}
@property --tw-saturate {
  syntax: "*";
  inherits: false;
}
@property --tw-sepia {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false;
}
@property --tw-duration {
  syntax: "*";
  inherits: false;
}
@property --tw-content {
  syntax: "*";
  initial-value: "";
  inherits: false;
}
@property --tw-scale-x {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@property --tw-scale-y {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@property --tw-scale-z {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@layer properties {
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
    *, ::before, ::after, ::backdrop {
      --tw-translate-x: 0;
      --tw-translate-y: 0;
      --tw-translate-z: 0;
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-divide-y-reverse: 0;
      --tw-border-style: solid;
      --tw-shadow: 0 0 #0000;
      --tw-shadow-color: initial;
      --tw-shadow-alpha: 100%;
      --tw-inset-shadow: 0 0 #0000;
      --tw-inset-shadow-color: initial;
      --tw-inset-shadow-alpha: 100%;
      --tw-ring-color: initial;
      --tw-ring-shadow: 0 0 #0000;
      --tw-inset-ring-color: initial;
      --tw-inset-ring-shadow: 0 0 #0000;
      --tw-ring-inset: initial;
      --tw-ring-offset-width: 0px;
      --tw-ring-offset-color: #fff;
      --tw-ring-offset-shadow: 0 0 #0000;
      --tw-outline-style: solid;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
      --tw-duration: initial;
      --tw-content: "";
      --tw-scale-x: 1;
      --tw-scale-y: 1;
      --tw-scale-z: 1;
    }
  }
}

/* --- Typing Indicator --- */
.typing-indicator {
    background-color: white;
    width: auto;
    padding: 10px 15px;
    border-radius: 12px;
    display: inline-block;
    margin-left: 8px;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}
.typing-dots span {
    height: 7px;
    width: 7px;
    background-color: #9ca3af;
    border-radius: 50%;
    display: inline-block;
    margin: 0 1px;
    animation: dot-bounce 1.3s infinite ease-in-out;
}
.typing-dots span:nth-child(2) {
    animation-delay: -1.1s;
}
.typing-dots span:nth-child(3) {
    animation-delay: -0.9s;
}
@keyframes dot-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Modern Image Message Styles */
.modern-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px; /* Slightly less than message bubble */
    background-color: transparent;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.modern-message-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
}

/* If caption exists, remove bottom radius from image */
.modern-image-wrapper:has(.image-caption) .modern-message-image {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.image-caption {
    padding: 6px 8px 8px 8px;
    color: inherit;
    font-size: 0.95rem;
    line-height: 1.3;
}

.image-meta-overlay {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    z-index: 10;
}

.image-meta-overlay span {
    color: white !important;
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 500;
}

.image-meta-overlay svg {
    width: 11px;
    height: 11px;
    color: white !important;
}

/* Specific padding for image messages to create the border effect */
.message:has(.modern-image-wrapper) {
    padding: 3px !important; /* Very tight padding */
    background-color: #fff; /* Default received color */
}

.message.sent:has(.modern-image-wrapper) {
    background-color: #d9fdd3; /* Sent color */
}

/* Hide legacy container */
.message-image-container {
    display: none; 
}
.swipe-icon-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    z-index: -1;
}

.swipe-reply-icon {
    background-color: #3b82f6; /* blue-500 */
    border-radius: 9999px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* Additional WhatsApp Styles */
.panel header, .detail-panel header {
  background-color: #f0f2f5;
  border-bottom: 1px solid #d1d7db;
}

.voice-message-container {
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.voice-message-container .progress-bg {
    flex-grow: 1;
}

/* Trash Can Animation Styles */
#voice-trash-lid {
    transform-origin: bottom right;
}

#voice-trash-lid.lid-open {
    transform: rotate(-45deg) translateY(-2px);
}

.mic-drop-animation {
    animation: micDropIntoTrash 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

 @keyframes micDropIntoTrash {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    20% {
        /* Kurzes "Hochwerfen" */
        transform: translateX(-10px) translateY(-10px) scale(0.9);
    }
    100% {
        /* Zielposition relativ zum Button (muss eventuell per JS dynamisch angepasst werden, aber hier grob nach links unten/mitte zur Mülltonne) */
        transform: translateX(-150px) translateY(20px) scale(0.1);
        opacity: 0;
    }
}


/* --- VOICE ANIMATION & CAPSULE STYLES --- */

/* 1. Emoji Button Trash Mode */
.emoji-btn-trash-mode {
    position: relative !important;
    z-index: 30 !important; /* Über dem Overlay */
    background-color: transparent !important;
}
.emoji-btn-trash-mode .emoji-icon-svg {
    display: none !important;
}
.emoji-btn-trash-mode .trash-icon-parts {
    display: flex !important;
}

/* 2. Mülltonnen-Deckel */
#voice-trash-lid {
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}
.trash-lid-open {
    transform: rotate(-45deg);
}

/* 3. Mic Drop Animation (Flugbahn nach links) */
.mic-drop-animation {
    position: relative !important;
    z-index: 100 !important; /* Höchste Ebene, muss über Input Box liegen */
    animation: micDropIntoTrash 0.75s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
    --mic-drop-dest-x: -320px; /* Fallback */
    --mic-drop-dest-y: -10px; /* Fallback */
}

 @keyframes micDropIntoTrash {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    20% {
        transform: translate(-15px, -25px) scale(1.1);
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--mic-drop-dest-x), var(--mic-drop-dest-y)) scale(0);
        opacity: 0;
    }
}

/* 4. Recording Button State */
#voice-record-btn {
    transition: transform 0.2s, background-color 0.2s;
    transform-origin: center;
}
#voice-record-btn.recording {
    transform: scale(1.5);
    background-color: #ef4444 !important; /* Rot */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    z-index: 100;
}

/* 5. Input Kapsel */
.input-capsule {
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.1);
}

/* 6. Emoji Drawer */
.emoji-btn-item {
    font-size: 1.5rem;
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
}
.emoji-btn-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fix for Send/Record button display issues */
.translate-x-0\.5 {
    translate: 0.125rem 0;
}
.scale-100 {
    scale: 1;
}

/* Ensure buttons don't collapse on mobile */
#message-send-btn, #voice-record-btn {
    flex-shrink: 0;
}

/* Mobile-specific fixes for recording interface */
#recording-overlay {
    /* Ensure proper padding and layout on mobile */
    padding-left: 8px !important;
    padding-right: 8px !important;
}

#recording-cancel-hint {
    /* Make sure the cancellation hint is readable on small screens */
    font-size: 0.75rem !important; /* Smaller text for small screens */
    padding: 0 4px;
}

@media (max-width: 480px) {
    #recording-cancel-hint {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #recording-status-wrapper {
        margin-right: 0.25rem !important;
    }

    #recording-overlay span {
        font-size: 0.75rem;
    }
}

/* Fix for proper alignment of send/record buttons on mobile */
footer .flex-shrink-0.w-12.h-12 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make sure the input area doesn't get obscured on mobile devices */
.input-capsule {
    min-height: 48px; /* Slightly larger on mobile for better touch targets */
}

@media (max-width: 768px) {
    .input-capsule {
        min-height: 50px;
    }

    #message-input {
        padding: 10px 12px;
    }
}
