/* Inter Font */
@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 700;
}

.container {
  max-width: 1280px !important;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header .container {
  max-width: 1280px !important;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-link {
  color: #333;
  font-weight: 700;
  padding: 0.5rem 1rem;
  font-family: "Inter", sans-serif;
}

.nav-link:hover {
  color: #007bff;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-menu {
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: "Inter", sans-serif;
}

.chat-container {
  height: calc(100vh - 56px);
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.chat-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-top: 50px;
  height: 0;
  padding: 0 1rem;
  padding-bottom: 120px;
  /* Hide scrollbar for webkit browsers (Chrome, Safari, Edge) */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.chat-messages::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* Message wrapper styling for proper alignment */
.message-wrapper {
  width: 100%;
  display: flex;
  margin-bottom: 1rem;
}

.message-wrapper.sent {
  justify-content: flex-end;
}

.message-wrapper.received {
  justify-content: flex-start;
}

.message-sent {
  max-width: 50%;
  background-color: #e74c14;
  color: white;
  border-radius: 12px;
  padding: 12px 1rem;
  font-family: "Proxima Nova", sans-serif;
  font-weight: 400;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

.message-received {
  max-width: 50%;
  background-color: #eeeeee;
  border-radius: 12px;
  padding: 12px 1rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Link styling in chat messages */
.message-sent a,
.message-received a {
  color: #007bff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.message-sent a:hover,
.message-received a:hover {
  color: #0056b3;
  text-decoration: none;
}

.message-sent a:visited,
.message-received a:visited {
  color: #6f42c1;
}

.message-sent a:active,
.message-received a:active {
  color: #e74c14;
}

/* Bubble styling for chat messages */
.bubble {
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Link styling in bubble */
.bubble a {
  color: #007bff !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  transition: color 0.2s ease;
}

.bubble a:hover {
  color: #0056b3 !important;
  text-decoration: none !important;
}

.bubble a:visited {
  color: #6f42c1 !important;
}

.bubble a:active {
  color: #e74c14 !important;
}

/* Image container alignment */
.message-wrapper.sent .message-image-container {
  max-width: 50%;
}

.message-wrapper.received .message-image-container {
  max-width: 50%;
}

/* Options container alignment .message-wrapper.sent .message-options {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 50%;
}

.message-wrapper.received .message-options {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  right: 0px;
  flex-wrap: wrap;
  max-width: 50%;
} */

/* Thanh nhập chat cuối trang giống mẫu */
.chat-input {
  background-color: white;
  max-height: 120px;
  flex-shrink: 0;
  padding: 12px 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  z-index: 10;
  display: flex;
  justify-content: center;
}

#messageForm {
  width: 100%;
  max-width: 1200px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-grow: 1;
}

.input-group .form-control {
  padding-left: 80px;
  padding-right: 48px;
  height: 64px;
  font-size: 1.25rem;
  border-radius: 16px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  box-shadow: none;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
  font-size: 1.2rem;
  padding: 8px;
  z-index: 2;
}

.input-icon.upload {
  left: 8px;
  width: 40px;
  height: 40px;
}

.input-icon.delete {
  right: 8px;
  width: 40px;
  height: 40px;
}

.send-btn {
  font-weight: 700;
  background-color: #e74c14;
  border: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: none;
}

.send-btn i {
  font-size: 2rem;
}

.expand-menu {
  font-size: 1.5rem;
  color: #333;
  padding: 0.5rem;
  cursor: pointer;
}

.expand-menu:hover {
  color: #007bff;
}

.dropdown-item {
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.dropdown-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.dropdown-item img {
  width: 24px;
  height: 24px;
}

.chat-header h5 {
  font-weight: 700;
}

.chat-header small {
  font-weight: 700;
}

.navbar-brand {
  font-weight: 700;
}

.dropdown-toggle {
  font-weight: 700;
}

.textarea-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.image-preview-inline {
  position: absolute;
  top: 8px;
  left: 56px;
  right: 56px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  border: 1px solid #dee2e6;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-image-inline {
  width: 100%;
  height: 40px;
  object-fit: cover;
  display: block;
}

.btn-close-inline {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 12px;
}

.btn-close-inline:hover {
  background: rgba(0, 0, 0, 0.9);
}

.btn-close-inline i {
  color: white;
  font-size: 10px;
}

#messageInput {
  padding-top: 12px;
  padding-bottom: 12px;
}

#messageInput.has-preview {
  padding-top: 56px;
}

#messageInput:focus {
  outline: none !important;
  box-shadow: none !important;
  z-index: 0;
  border-color: #dee2e6;
}

.option-btn {
  border: 2px solid rgb(233, 236, 239);
  font-family: "Proxima Nova", sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 25px;
  padding: 8px 20px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: none;
  min-width: 60px;
  text-align: center;
  background-color: #ffffff;
  color: #333333;
}

/* RTL support for Arabic text */
.option-btn[dir="rtl"],
.option-btn[lang="ar"] {
  direction: rtl;
  text-align: right;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.option-btn:last-child {
  margin-right: 0;
}

.option-btn:hover,
.option-btn.selected,
.option-btn.active {
  background-color: #e74c14;
  color: #fff;
  border-color: #e74c14;
  font-weight: 700;
}

.option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
  font-weight: normal;
}

.option-btn:disabled.selected {
  background-color: #e74c14;
  color: #fff;
  border-color: #e74c14;
  opacity: 1;
  font-weight: 700;
}

/* Image Preview Container Styles */
.image-preview-container {
  position: relative;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 1000;
  max-width: 100px;
  height: 60px;
}

.preview-wrapper {
  position: relative;
}

.preview-image {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.btn-close-preview {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: white;
  font-size: 16px;
}

.btn-close-preview:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Message images styling */
.message-sent img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-received img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-image-container img {
  display: block;
}

.btn-refresh {
  background-color: #e74c14;
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  height: 40px;
}

/* Hamburger Menu Styles */
.hamburger-menu {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.hamburger-menu:hover {
  color: #e74c14;
}

.hamburger-menu:focus {
  outline: none;
  box-shadow: none;
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
  min-width: 200px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  margin-top: 8px;
  right: 0 !important;
  left: auto !important;
  position: absolute !important;
  top: 100% !important;
  z-index: 1050;
}

.mobile-menu-dropdown.show {
  display: block !important;
}

.dropdown.d-lg-none {
  position: relative;
}

.mobile-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #2F3757;
  transition: background-color 0.2s ease;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  gap: 12px;
}

.mobile-menu-item:hover {
  background-color: #f8f9fa;
  color: #333;
}

.mobile-menu-item i {
  font-size: 18px;
  color: #666;
}

.mobile-menu-item i {
  font-size: 18px;
  color: #666;
}

.language-option {
  border: 2px solid rgb(233, 236, 239);
  font-family: "Proxima Nova", sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 25px;
  padding: 8px 20px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: none;
  min-width: 60px;
  text-align: center;
}

.language-option:last-child {
  margin-right: 0;
}

.language-option:hover,
.language-option.selected,
.language-option.active {
  background: #e74c14;
  color: #fff;
  border-color: #e74c14;
}

.language-option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.language-option:disabled.selected {
  background: #e74c14;
  color: #fff;
  border-color: #e74c14;
  opacity: 1;
}

.language-option img,
.language-option .flag {
  width: 36px;
  height: 36px;
  margin-right: 12px;
  vertical-align: middle;
}

.input-container {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #fff;
  align-items: center;
}

#image-preview-container {
  position: relative;
  margin-right: 10px;
}

.image-preview {
  max-width: 50px;
  max-height: 50px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.remove-image-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

#message-input {
  flex-grow: 1;
  border: 1px solid #ddd;
}

.message.user {
  align-self: flex-end;
  background-color: #007bff;
  color: white;
}

.chat-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
}

.message p {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
}