/* Paper Card - Base styles for cards and paper details */
.card, .paper-details {
    position: fixed;
    left: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 1000;
}

/* Common title styles */
.card .title, .paper-details .paper-title {
    font-family: cyber;
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Common meta styles */
.card .meta, .paper-details .paper-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Common tag styles */
.card .tags, .paper-details .paper-tags {
    margin-bottom: 15px;
}

.card .tag, .paper-details .paper-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
    font-size: 12px;
}

/* Common content styles */
.card .content, .paper-details .paper-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Paper-details specific styles */
.paper-details .paper-meta {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.paper-details .meta-content {
    flex: 1;
}

.paper-details .bookmark-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    font-size: 1.2em;
}

.paper-details .bookmark-btn:hover {
    color: #333;
}

.paper-details .bookmark-btn.active {
    color: #4CAF50;
}

/* Legend */
#legend {
}

#legend .legend_item {
    cursor: pointer;
    display: block;
    padding: 5px;
}

#legend .legend_item.expanded {
    font-weight: bold;
}

.swatch {
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.label {
    display: inline-block;
}

.legend_expansion {
    background-color: black;
    color: white;
    padding: 10px;
    border-radius: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Constellation */
#constellation {
    max-height: calc(100% - 100px);
    overflow-y: scroll;
}

#constellation p {
    margin: 0 0 20px;
    font-size: 10pt;
}

#constellation input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#constellation button {
    width: 100%;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#constellation button:hover {
    background: #45a049;
}

#const_legend .legend_item {
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#const_legend .link {
    text-decoration: underline;
    cursor: pointer;
    color: #666;
}

#const_legend .lab {
    flex-grow: 1;
}

/* Paper Info */
#paper_info {
    color: black;
    background-color: rgb(255, 255, 255);
    font-size: 13px;
    z-index: 2;
    position: relative;
    padding: 2px;
    width: 30%;
    text-align: center;
    margin: auto;
    border-radius: 15px;
    padding: 10px;
    position: absolute;
    top: 60px;
    left: 35%;
}

#paper_info a {
    color: black;
    text-decoration: underline;
}

.meta-content a {
    color: var(--accent-color) !important;
}

/* Sidebar */
#sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f8f8f8;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
}

.right-sidebar.collapsed {
    transform: translateX(100%);
}

.right-sidebar .sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f8f8f8;
}

.right-sidebar .tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.right-sidebar .tab-btn i {
    font-size: 16px;
}

.right-sidebar .tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.right-sidebar .tab-btn.active {
    background: white;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
  }

.right-sidebar .tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.right-sidebar .tab-content.active {
    display: block;
}

/* Update existing panel styles to work within the new sidebar */
.right-sidebar #legend {
    height: 100%;
    overflow-y: auto;
}

.right-sidebar #constellation p {
    margin: 0 0 20px;
    font-size: 10pt;
}

.right-sidebar #constellation input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.right-sidebar #constellation button {
    width: 100%;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
}

.right-sidebar #constellation button:hover {
    background: #45a049;
}

.right-sidebar #const_legend .legend_item {
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-sidebar #const_legend .link {
    text-decoration: underline;
    cursor: pointer;
    color: #666;
}

.right-sidebar #const_legend .lab {
    flex-grow: 1;
}

/* History and Saved Items */
.right-sidebar .history-item,
.right-sidebar .saved-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.right-sidebar .history-item:hover,
.right-sidebar .saved-item:hover {
    background: #f8f8f8;
}

.right-sidebar .history-content,
.right-sidebar .saved-content {
    flex: 1;
}

.right-sidebar .history-title,
.right-sidebar .saved-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.right-sidebar .history-meta,
.right-sidebar .saved-meta {
    font-size: 12px;
    color: #666;
}

.right-sidebar .history-actions,
.right-sidebar .saved-actions {
    display: flex;
    gap: 8px;
}

.right-sidebar .delete-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.right-sidebar .delete-btn:hover {
    opacity: 1;
}

.right-sidebar .empty-state {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    padding: 4px;
    border-bottom: 1px solid #eee;
}

.mode-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.mode-btn.active {
    background: #f5f5f5;
    color: #333;
    font-weight: 500;
}

.mode-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Swatches Container */
.swatches-container {
    margin-top: 10px;
} 