/* Retractable side panel */
.side-panel {
  position: fixed;
  top: 56px;
  right: -var(--sidebar-width);
  right: 0;
  width: var(--sidebar-width);
  height: calc(100vh - 56px);
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-panel-header h3 {
  font-size: 1rem;
  font-family: var(--font-body);
}

.side-panel .btn-close-panel {
  background: none;
  font-size: 1.2rem;
  color: var(--color-gray-400);
  padding: 4px 8px;
}

/* Prompt form */
.prompt-form {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-100);
}

.prompt-form textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
}

.prompt-form select {
  width: 100%;
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
}

.prompt-form .form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Prompt history */
.prompt-history {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.prompt-history-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-gray-400);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  padding: 0 var(--space-sm);
}

.prompt-card {
  background: var(--color-offwhite);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
}

.prompt-card .prompt-text {
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.prompt-card .prompt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--color-gray-400);
}

.prompt-card .prompt-section-ref {
  font-size: 0.7rem;
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 640px) {
  .side-panel {
    width: 100%;
  }

  body.panel-open .main-content {
    margin-right: 0;
  }

  .prompt-form {
    padding: var(--space-md);
  }

  .prompt-form textarea {
    min-height: 80px;
  }
}
