body {
  overflow: hidden !important;
}

.dashboard-wrapper {
  display: flex;
  height: 100vh;
}

/* SIDEBAR */

.dashboard-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e6e8ec;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.sidebar-header {
  padding: 12px 8px;
}

.sidebar-header h3 {
  color: #71717a;
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0.06px;
}

.project-list {
  /* overflow-y: auto; */
  height: calc(100vh - 148px);
}

.project-item {
  padding: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.07px;
  border-radius: 4px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item:hover {
  background: #e6faeb;
  color: #155d27;
}

.project-item.active {
  background: #e6faeb;
  color: #155d27;
}

/* CONTENT */

.dashboard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
}

.chat-messages {
  height: calc(100vh - 180px);
  /* flex: 1; */
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 1rem 0;
}

.message {
  max-width: 65%;
  padding: 12px;
  border-radius: 8px;
  color: #18181b;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  margin: 0px;
}

.message.user {
  align-self: flex-end;
  background: rgb(239, 244, 248);
}

.message.assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e6e8ec;
}

.message.assistant a {
  color: #3b82f6;
  text-decoration: underline;
}

/* INPUT */

.post-requirement-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 60px;
  max-height: 140px;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #f8fafc;
  transition: height 0.2s ease-in-out;
  font-family: "Poppins", sans-serif;
}

.post-requirement-section:focus-within .requirement-input-highlight,
.post-requirement-section:active .requirement-input-highlight,
.post-requirement-section:focus .requirement-input-highlight,
.post-requirement-section:hover .requirement-input-highlight {
  display: block;
}

.requirement-input {
  flex: 1;
  padding: 0;
  border: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #11181c;
  padding: 8px;
  font-family: "Poppins", sans-serif;
  z-index: 1;
}

.requirement-input:focus {
  outline: none;
}

.requirement-input::placeholder {
  color: #9aa5b1;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
}

.requirement-input-highlight {
  display: none;
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 0;
  border-radius: 8px;
  background: linear-gradient(322deg, #e81cff 6.25%, #40c9ff 93.75%);
  width: 100%;
  height: 100%;
  padding: 1px;
  border: 0px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.dashboard-chat-btn {
  align-self: flex-end;
  width: fit-content;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  z-index: 1;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.07px;
  border-radius: 5px;
  background: #3f3f46;
}

.flexable-deliverables-container {
  padding: 12px;
}

.deliverables-profile-info img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.flexable-deliverables-list-section {
  height: fit-content;
}

.spinner-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.empty-chat-state {
  height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-chat-illustration img {
  width: 160px;
  opacity: 0.85;
  margin-bottom: 16px;
}

.empty-chat-text {
  font-size: 14px;
  color: #6b7280; /* subtle gray */
  font-weight: 400;
}

.dashboard-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dashboard-chat-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}
.dashboard-chat-btn.loading .send-icon {
  display: none;
}

.dashboard-chat-btn.loading .send-loader {
  display: block;
}

/* hide loader by default */
.send-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* toggle states */
.dashboard-chat-btn.loading .send-icon {
  display: none;
}

.dashboard-chat-btn.loading .send-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#analyzingMessage {
  margin: 8px 0px;
  color: #94a6b3;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

@media screen and (max-width: 768px) {
  .post-requirement-section {
    min-height: 50px;
    max-height: 120px;
    margin: 0 auto;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
  }
}

/* ===== Base Layout ===== */
.dashboard-wrapper {
  display: flex;
  height: calc((var(--vh, 1vh) * 100) - 64px);
}

.dashboard-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid #eee;
}

.dashboard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== Hamburger Button ===== */
.project-sidebar-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 10px;
}

/* ===== Overlay ===== */
.sidebar-overlay {
  display: none;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .project-sidebar-toggle {
    display: block;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100%;
    width: 80%;
    max-width: 320px;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  }

  .dashboard-sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .dashboard-content {
    width: 100%;
  }
}
