/* 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;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 80px);
    margin-top: 80px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .container {
    padding: 0 0.5rem;
  }

  .header .container {
    padding: 0 0.5rem;
  }
}

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

.chat-messages {
  flex: 1;
  overflow-y: auto;
  height: 0;
  padding: 1.5rem 1rem 0 1rem;
  /* 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: "Inter", 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;
}

/* 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-start;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 50%;
}

.chat-input {
  background-color: white;
  max-height: 120px;
  flex-shrink: 0;
  padding: 12px 0;
}

.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;
}

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

.input-group .form-control {
  padding-left: 48px;
  padding-right: 48px;
}

.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;
}

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

.input-icon:hover {
  color: #e74c14;
}

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

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

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

.option-btn {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  padding: 8px 20px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  text-align: center;
}

.option-btn:hover {
  background-color: #e74c14;
  color: white;
  border-color: #e74c14;
}

.option-btn.selected {
  background-color: #e74c14;
  color: white;
  box-shadow: 0 4px 8px rgba(231, 76, 20, 0.3);
}

/* 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;
}

/* Navigation buttons styling */
.btn-outline-primary {
  border: 2px solid #e74c14;
  color: #e74c14;
  background: transparent;
  border-radius: 40px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  height: 40px;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background-color: #e74c14;
  color: #fff;
  border-color: #e74c14;
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
  background: transparent;
  border-radius: 40px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  height: 40px;
  transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
  border-color: #6c757d;
}

/* 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;
}