.elementor-994 .elementor-element.elementor-element-fcc9f77{--display:flex;--flex-direction:row;--container-widget-width:initial;--container-widget-height:100%;--container-widget-flex-grow:1;--container-widget-align-self:stretch;--flex-wrap-mobile:wrap;--gap:0px 0px;--row-gap:0px;--column-gap:0px;}.elementor-994 .elementor-element.elementor-element-fcc9f77.e-con{--flex-grow:0;--flex-shrink:0;}.elementor-994 .elementor-element.elementor-element-8a88841{--display:flex;--min-height:100vh;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--justify-content:flex-start;--margin-top:0px;--margin-bottom:0px;--margin-left:0px;--margin-right:0px;--padding-top:0px;--padding-bottom:0px;--padding-left:0px;--padding-right:0px;}.elementor-994 .elementor-element.elementor-element-8a88841.e-con{--flex-grow:0;--flex-shrink:0;}.elementor-994 .elementor-element.elementor-element-7fcfc92 > .elementor-widget-container{margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;}@media(min-width:768px){.elementor-994 .elementor-element.elementor-element-fcc9f77{--width:95.003%;}.elementor-994 .elementor-element.elementor-element-8a88841{--width:100%;}}/* Start custom CSS for html, class: .elementor-element-7fcfc92 */:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --surface-color: #ffffff;
  --background-color: #f8fafc;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--background-color);
}

.project-sidebar {
  background-color: var(--surface-color);
  height: 100rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border-right: 1px solid var(--border-color);
}

.current-workspace {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.current-workspace h2 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.create-project {
  margin-bottom: 1.5rem;
}

.btn-primary {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.project-list {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.project-list::-webkit-scrollbar {
  width: 6px;
}

.project-list::-webkit-scrollbar-track {
  background: var(--background-color);
  border-radius: var(--radius-sm);
}

.project-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

.project-item {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.project-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.project-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-expand, .btn-switch, .btn-delete {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 2rem;
  height: 2rem;
  margin-left: 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-expand svg, .btn-switch svg, .btn-delete svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.btn-expand svg { fill: var(--primary-color); }
.btn-switch svg { fill: var(--success-color); }
.btn-delete svg { fill: var(--danger-color); }

.btn-expand:hover, .btn-switch:hover, .btn-delete:hover {
  background-color: var(--background-color);
}

.project-header.active .btn-expand svg {
  transform: rotate(180deg);
}

.project-content {
  padding: 1rem 0 0 0;
  display: none;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.file-list li {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--background-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.file-list li:hover {
  background: #eef2ff;
}

.file-list li a {
  flex: 1;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}

.tooltip-container {
  position: relative;
}

.tooltip {
    position: absolute;
    padding: 0.5rem 0.75rem;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 9999;
    /* New positioning logic */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none; /* Prevents tooltip from interfering with hover */
}

/* Add dynamic positioning classes */
.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Position tooltip above by default */
.tooltip-container .tooltip {
    bottom: 120%;
}

@media (max-height: 100px) {
    .tooltip-container .tooltip {
        bottom: auto;
        top: 120%;
    }
}

/* Adjust tooltip position when close to screen edges */
@media (max-width: 768px) {
    .tooltip-container .tooltip {
        /* Ensure tooltip doesn't overflow on small screens */
        max-width: 200px;
        white-space: normal;
        text-align: center;
        
        /* Adjust position for small screens */
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Handle left edge */
    .tooltip-container:first-child .tooltip {
        left: 0;
        transform: translateX(0);
    }
    
    /* Handle right edge */
    .tooltip-container:last-child .tooltip {
        left: auto;
        right: 0;
        transform: translateX(0);
    }
}


.project-item.current-workspace {
  border: 2px solid var(--primary-color);
  background-color: #eef2ff;
  position: relative;
}

.project-item.current-workspace::before {
  content: "Current";
  position: absolute;
  top: -0.75rem;
  right: 1rem;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.source-item:hover {
  background: #eef2ff;
}

.source-type {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  min-width: 80px;
  text-align: center;
}

.source-type.scholarly {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.source-type.general {
  background-color: #f1f5f9;
  color: #475569;
}

@media (max-width: 768px) {
  .project-sidebar {
    width: 100%;
    padding: 1rem;
  }
  
  .source-type {
    min-width: 60px;
    font-size: 0.7rem;
  }
  
  .project-item {
    padding: 0.75rem;
  }
}

.btn-cite {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    vertical-align: middle;
    margin-left: 4px;
}

.btn-cite:hover {
    opacity: 1;
}

.btn-cite svg {
    width: 30px;
    height: 30px;
    color: #0066cc;
}

.tooltip-container {
    position: relative;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.reference-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-recommend {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.btn-recommend:hover {
    opacity: 1;
}

.btn-recommend svg {
    width: 30px;
    height: 30px;
    color: #2ecc71;
}

.search-container {
    margin: 10px;
    padding: 0 5px;
}

.search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.project-item.hidden {
    display: none !important;
}

.project-content {
    display: none;
}

.project-header.active + .project-content {
    display: block;
}

.reference-item a.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.reference-item a.highlight:hover {
    background-color: #ffe69c;
}

.project-title.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.project-title.highlight:hover {
    background-color: #ffe69c;
}/* End custom CSS */