/* Documentation Panel Styles */

/* Doc Icon Button */
.doc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-cream);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.doc-icon-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.05);
}

.doc-icon-btn i {
  font-size: 14px;
}

/* Documentation Panel (Offcanvas) */
.docs-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  max-width: 90vw;
  height: 100vh;
  background: #f8f7f4;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.docs-panel.open {
  right: 0;
}

.docs-panel-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1055;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.docs-panel-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Panel Header */
.docs-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.docs-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-panel-title i {
  color: var(--primary);
}

.docs-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.docs-panel-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

/* Panel Content */
.docs-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f7f4;
}

/* Wiki-style Content */
.docs-section {
  margin-bottom: 24px;
}

.docs-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.docs-section-title i {
  color: var(--primary);
}

.docs-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Feature List */
.docs-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.docs-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.docs-feature-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docs-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.docs-feature-content {
  flex: 1;
}

.docs-feature-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.docs-feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Quick Actions */
.docs-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.docs-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.docs-quick-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.docs-quick-action i {
  font-size: 1.25rem;
}

.docs-quick-action span {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

/* Tips Box */
.docs-tip-box {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
  border-left: 3px solid #10b981;
  margin-bottom: 16px;
}

.docs-tip-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}

.docs-tip-box.info {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--primary);
}

.docs-tip-icon {
  color: #10b981;
  font-size: 1rem;
  flex-shrink: 0;
}

.docs-tip-box.warning .docs-tip-icon {
  color: #f59e0b;
}

.docs-tip-box.info .docs-tip-icon {
  color: var(--primary);
}

.docs-tip-content {
  flex: 1;
}

.docs-tip-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.docs-tip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Keyboard Shortcuts */
.docs-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.docs-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Related Links */
.docs-related {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.docs-related-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(59, 130, 246, 0.03);
}

.docs-related-link i {
  color: var(--text-muted);
}

.docs-related-link:hover i {
  color: var(--primary);
}

/* Panel Footer */
.docs-panel-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  text-align: center;
}

.docs-panel-footer a {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
}

.docs-panel-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 576px) {
  .docs-panel {
    width: 100%;
    right: -100%;
  }

  .docs-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes docsSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.docs-panel.open .docs-panel-content > * {
  animation: docsSlideIn 0.3s ease forwards;
}

.docs-panel.open .docs-section:nth-child(2) {
  animation-delay: 0.05s;
}

.docs-panel.open .docs-section:nth-child(3) {
  animation-delay: 0.1s;
}

.docs-panel.open .docs-section:nth-child(4) {
  animation-delay: 0.15s;
}
