/* ==========================================================================
   Citation Tabs Component
   ========================================================================== */

.citation-tabs {
  margin: 2em 0;
}

.citation-tabs__header {
  display: flex;
  border-bottom: 2px solid #e9e9e9;
  margin-bottom: 1em;
}

.citation-tab {
  background: none;
  border: none;
  padding: 0.75em 1.5em;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.citation-tab:hover {
  color: #333;
  background-color: #f8f8f8;
}

.citation-tab.active {
  color: #2c3e50;
  border-bottom-color: #2c3e50;
  background-color: #f8f8f8;
}

.citation-tabs__content {
  position: relative;
}

.citation-tab-content {
  display: none;
}

.citation-tab-content.active {
  display: block;
}

.citation-content {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1.5em;
  position: relative;
  font-family: 'Courier New', monospace;
  font-size: 0.8em;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #333;
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  .citation-content {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
}

.copy-button {
  position: absolute;
  top: 1em;
  right: 1em;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.6em;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s ease;
  width: 2.5em;
  height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-button:hover {
  background-color: #34495e;
}

.copy-icon {
  margin: 0;
  font-size: 1.1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .citation-tabs__header {
    flex-direction: column;
  }
  
  .citation-tab {
    text-align: left;
    border-bottom: 1px solid #e9e9e9;
  }
  
  .citation-tab.active {
    border-bottom-color: #2c3e50;
  }
  
  .citation-content {
    padding: 1em;
    font-size: 0.8em;
  }
  
  .copy-button {
    position: static;
    margin-top: 1em;
    width: 100%;
  }
}
