/* --------------------------------- primeng -------------------------------- */
:root {
  --primary-color: #3B82F6;
  --primary-color-text: #ffffff;
  --surface-border: #e2e8f0;
  --surface-0: #ffffff;
  --surface-100: #f1f5f9;
}

.p-inputtext {
  font-family: var(--font-family);
  font-feature-settings: var(--font-feature-settings, normal);
  font-size: 1rem;
  color: var(--surface-900);
  background: transparent;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, outline-color 0.2s;
  appearance: none;
  border-radius: 6px;
  width: 100%;
  margin-right: 5px;
}



/* --------------------------------- styles --------------------------------- */

html {
  font-size: 14px;
  scroll-behavior: smooth;
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
}

:root {
  --msg-message: #969eaa;
  --msg-date: #c0c7d2;
  --input-bg: #f4f4f7;
}

.p-dialog .p-dialog-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 1rem;
}

.p-dialog .p-dialog-header .p-dialog-title {
  width: 100%;
  text-align: center;
  font-size: 1.125rem;
}

.p-dialog-header-icons {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1rem;
}



/* ---------------------------- message --------------------------- */

.material-symbols-rounded {
  cursor: pointer;
}

.wrapper {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-border);
}

.header-account {
  display: flex;
  align-items: center;
  width: 340px;
  padding: 16px;
  border-right: 1px solid var(--surface-border);
}

.header-username {
  font-weight: 600;
  font-size: 1.25rem;
  flex: 1;
  margin-left: 15px;
}

.header-title {
  font-weight: 600;
  font-size: 1.25rem;
  padding: 20px;
  flex: 1;
  border-right: 1px solid var(--surface-border);
}

.header-title-small {
  font-size: 0.875rem;
  color: var(--msg-date);
  display: block;
  margin-top: 0.25rem;
}

.header-setting {
  padding: 16px;
  color: red;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  cursor: pointer;
  width: 340px;
}

.container {
  flex: 1;
  width: 100%;
  display: flex;
  overflow: hidden;
}



/* ------------------------------ conversation ------------------------------ */

.conversation-area {
  border-right: 1px solid var(--surface-border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 340px;
  min-width: 340px;
  padding: 16px 0;
}



/* ---------------------------------- chat ---------------------------------- */

.chat-area {
  display: flex;
  flex-direction: column;
  overflow: auto;
  flex-grow: 1;
  scroll-behavior: smooth;
}

.chat-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--surface-border);
  width: 100%;
  // max-width: calc(100% - 40px);
  padding: 10px 20px;
  background-color: var(--surface-0);
  position: sticky;
  bottom: 0;
  left: 0;
}

.chat-footer .other-list {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
}

.chat-footer .send-button {
  rotate: -45deg;
  color: var(--primary-color);
  font-size: 1.75rem;
}

.chat-footer .send-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.chat-footer .emoji {
  position: relative;
}





/* --------------------------------- detail --------------------------------- */

.detail-area {
  border-left: 1px solid var(--surface-border);
  margin-left: auto;
  padding: 30px 30px 0 30px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  width: 340px;
}

.detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.detail-group-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.detail-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--msg-date);
}

.detail-members {
  flex: 1;
}

.detail-members-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 10px;
}

.detail-member-title {
  font-size: 1rem;
  font-weight: 600;
}

.detail-member-add {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--msg-date);
}

.detail-members-list {
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.detail-member {
  display: flex;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
}

.detail-member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.detail-member-detail {
  flex: 1;
  margin-left: 15px;
}

.detail-member-subtitle {
  font-size: 0.875rem;
  color: var(--msg-date);
}

.edit-member-dialog ::ng-deep {
  .p-dialog-content {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
  }

  button {
    outline: none;
    border: none;
    border-bottom: 1px solid var(--surface-border);
    padding: 12px;
    background-color: var(--surface-0);
    cursor: pointer;
  }

  button:last-child {
    border-bottom: none;
  }
}

.leave-group p {
  font-size: 1rem;
  font-weight: 600;
  color: red;
  display: flex;
  align-items: center;
  justify-content: end;
  cursor: pointer;
  padding-bottom: 1rem;
}

.theme {
  margin-top: 2rem;
}

.theme-mode,
.theme-color {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-button {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  margin: auto;
}

/* search */
p-dialog ::ng-deep {
  .p-dialog-content {
    display: flex;
    flex-direction: column;
  }
} 



/* --------------------------------- avatar --------------------------------- */

.online {
  position: relative;
}

.online:before {
  content: "";
  position: absolute;
  background-color: #23be7e;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  border: 2px solid var(--surface-0);
  right: 2px;
  bottom: 2px;
}