/**
 * Chat Component Styles
 * Clean, centered design with rich markdown support
 */

/* Chat Container */
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-white);
  overflow: hidden; /* CRITICAL: Contain scroll to prevent page-level scrolling */
}

.chat__messages {
  flex: 1 1 0; /* Grow, shrink, and start from 0 basis */
  min-height: 0; /* CRITICAL: Allow flex child to shrink below content size */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain; /* CRITICAL: Prevent scroll chaining to parent */
  padding: var(--spacing-6) 0;
}

.chat__messages--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Messages wrapper for max-width centering */
.chat__messages-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-6);
}

/* Override shared MessageList scroll — parent .chat__messages handles scrolling */
.chat__messages .rui-message-list {
  overflow-y: visible;
  padding: 0;
}

/* Welcome Screen */
.chat__welcome {
  text-align: center;
  max-width: 400px;
}

.chat__welcome-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-2xl);
  color: var(--color-white);
  margin: 0 auto var(--spacing-6);
}

.chat__welcome-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin: 0 0 var(--spacing-2);
}

.chat__welcome-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-gray-500);
  margin: 0;
}

/* Message Base */
.message {
  display: flex;
  margin-bottom: var(--spacing-6);
}

/* User Message - Bubble style, right aligned */
.message--user {
  justify-content: flex-end;
}

.message--user .message__content {
  max-width: 80%;
  padding: var(--spacing-3) var(--spacing-4);
  background-color: var(--color-gray-100);
  color: var(--color-gray-800);
  border-radius: var(--radius-2xl);
  border-bottom-right-radius: var(--radius-sm);
}

.message--user .message__text {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.message--user .message__time {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  margin-top: var(--spacing-1);
  text-align: right;
}

.message--user .message__avatar {
  order: 1;
  margin-left: var(--spacing-3);
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(--color-gray-400);
  color: var(--color-white);
}

/* Assistant Message - Clean, no bubble, left aligned */
.message--assistant {
  justify-content: flex-start;
  flex-direction: column;
}

.message--assistant .message__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
}

.message--assistant .message__avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background-color: var(--color-gray-100);
  color: var(--color-gray-600);
}

.message--assistant .message__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
}

.message--assistant .message__content {
  width: 100%;
  padding-left: calc(28px + var(--spacing-2));
}

.message--assistant .message__text {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-800);
}

.message--assistant .message__time {
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
  margin-top: var(--spacing-3);
  padding-left: calc(28px + var(--spacing-2));
}

.message--assistant .message__actions {
  display: flex;
  gap: var(--spacing-2);
  margin-top: var(--spacing-3);
  padding-left: calc(28px + var(--spacing-2));
}

.message--assistant .message__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-gray-400);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.message--assistant .message__action-btn:hover {
  background-color: var(--color-gray-100);
  color: var(--color-gray-600);
}

/* System Message */
.message--system {
  justify-content: center;
}

.message--system .message__content {
  background-color: var(--color-gray-100);
  color: var(--color-gray-600);
  font-size: var(--font-size-sm);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-full);
}

/* Streaming Indicator */
.message__streaming-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

/* Error Message */
.message__error {
  display: flex;
  align-items: flex-start;
  font-size: var(--font-size-sm);
  padding: var(--spacing-3);
  border-radius: var(--radius-lg);
}

.message__error svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Tool Call Indicator */
.message__tool-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin: var(--spacing-3) 0;
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-gray-50);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-primary);
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.message__tool-indicator-icon {
  color: var(--color-primary);
}

.message__tool-indicator-text {
  font-family: var(--font-family-mono);
}

/* Chat Input */
.chat__input {
  flex-shrink: 0; /* Never shrink the input area */
  padding: var(--spacing-4) var(--spacing-6);
  background-color: var(--color-white);
  border-top: 1px solid var(--color-gray-100);
}

.chat__input-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.chat__input-form {
  display: flex;
  gap: var(--spacing-3);
  align-items: flex-end;
  padding: var(--spacing-3);
  background-color: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-2xl);
  transition: all var(--transition-fast);
}

.chat__input-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.chat__input-field {
  flex: 1;
  min-height: 24px;
  max-height: 200px;
  padding: 0;
  font-size: var(--font-size-base);
  font-family: inherit;
  line-height: var(--line-height-normal);
  border: none;
  background: transparent;
  resize: none;
}

.chat__input-field:focus {
  outline: none;
}

.chat__input-field::placeholder {
  color: var(--color-gray-400);
}

.chat__input-field:disabled {
  cursor: not-allowed;
}

.chat__send-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat__send-btn:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}

.chat__send-btn:disabled {
  background-color: var(--color-gray-300);
  cursor: not-allowed;
}

.chat__send-btn--danger {
  background-color: var(--color-danger);
}

.chat__send-btn--danger:hover:not(:disabled) {
  background-color: #dc2626;
}

/* Voiceover toggle button */
.chat__voice-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-gray-500);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat__voice-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.chat__voice-btn--active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: var(--color-primary-bg, rgba(239, 68, 68, 0.08));
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: var(--spacing-1);
  padding: var(--spacing-2);
}

.typing-indicator__dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-gray-400);
  border-radius: var(--radius-full);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator__dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Status indicator for finished tasks */
.message__status {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-2);
  font-size: var(--font-size-sm);
  color: var(--color-success);
}

.message__status-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   Tool Call Display
   ============================================ */

.tool-call {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
  padding: var(--spacing-3);
  margin: var(--spacing-3) 0;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-gray-300);
  font-size: var(--font-size-sm);
}

.tool-call--running {
  border-left-color: var(--color-primary);
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.05) 0%, var(--color-gray-50) 100%);
}

.tool-call--complete {
  border-left-color: var(--color-success);
}

.tool-call--error {
  border-left-color: var(--color-danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, var(--color-gray-50) 100%);
}

.tool-call__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  flex-wrap: wrap;
}

.tool-call__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  color: white;
  flex-shrink: 0;
}

.tool-call__category {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-call__name {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-800);
}

.tool-call__status {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-left: auto;
}

.tool-call__status-icon {
  color: var(--color-gray-500);
}

.tool-call__status-icon--spin {
  animation: spin 1s linear infinite;
  color: var(--color-primary);
}

.tool-call__status-icon--success {
  color: var(--color-success);
}

.tool-call__status-icon--error {
  color: var(--color-danger);
}

.tool-call__duration {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
}

.tool-call__description {
  color: var(--color-gray-600);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: calc(20px + var(--spacing-2));
}

.tool-call__error {
  color: var(--color-danger);
  font-size: var(--font-size-xs);
  padding-left: calc(20px + var(--spacing-2));
}

/* Inline Tool Call (for embedding in text) */
.inline-tool-call {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  padding: 2px var(--spacing-2);
  margin: var(--spacing-1) 0;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  vertical-align: middle;
}

.inline-tool-call--running {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, var(--color-gray-100) 100%);
}

.inline-tool-call--error {
  background: rgba(239, 68, 68, 0.1);
}

.inline-tool-call__badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  color: white;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
}

.inline-tool-call__category {
  font-size: 9px;
}

.inline-tool-call__name {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
}

.inline-tool-call__description {
  color: var(--color-gray-500);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-tool-call__spinner {
  animation: spin 1s linear infinite;
  color: var(--color-primary);
}

/* Tool calls container in messages */
.message__tool-calls {
  margin-bottom: var(--spacing-3);
}

/* ============================================
   Chat Container with Internals Panel
   ============================================ */

.chat-container {
  display: flex;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.chat {
  position: relative;
  transition: width 0.2s ease;
  /* CRITICAL: These must be here to maintain flex layout */
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0; /* Allow flex child to shrink below content size */
  overflow: hidden;
}

/* Internals toggle button */
.chat__internals-toggle {
  position: absolute;
  top: var(--spacing-4);
  right: var(--spacing-4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.chat__internals-toggle:hover {
  background-color: var(--color-gray-50);
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}

.chat__internals-toggle--active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.chat__internals-toggle--active:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
}

/* ============================================
   Internals Panel
   ============================================ */

.internals-panel {
  position: relative;
  height: 100%;
  background-color: var(--color-gray-50);
  border-left: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.internals-panel__resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.15s;
}

.internals-panel__resize-handle:hover,
.internals-panel__resize-handle:active {
  background: var(--color-primary);
}

.internals-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-3) var(--spacing-4);
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  flex-shrink: 0;
}

.internals-panel__title {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
}

.internals-panel__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.internals-panel__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.internals-panel__action-btn:hover {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
}

.internals-panel__action-btn.active {
  color: var(--color-primary);
}

.internals-panel__action-btn .spinning {
  animation: spin 2s linear infinite;
}

.internals-panel__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-2);
}

.internals-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--spacing-6);
  text-align: center;
  color: var(--color-gray-500);
}

/* Internals Sections */
.internals-section {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-2);
  overflow: hidden;
}

.internals-section__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3);
  cursor: pointer;
  user-select: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
  transition: background 0.15s;
}

.internals-section__header:hover {
  background-color: var(--color-gray-50);
}

.internals-section__badge {
  margin-left: auto;
  padding: 2px var(--spacing-2);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-600);
}

.internals-section__body {
  padding: 0 var(--spacing-3) var(--spacing-3);
}

/* Context Meter */
.context-meter {
  margin-bottom: var(--spacing-3);
}

.context-meter__bar {
  height: 8px;
  background-color: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--spacing-1);
}

.context-meter__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.context-meter__fill--low {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.context-meter__fill--medium {
  background: linear-gradient(90deg, #eab308, #fde047);
}

.context-meter__fill--high {
  background: linear-gradient(90deg, #ef4444, #fca5a5);
}

.context-meter__label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  text-align: right;
}

/* Internals Stats */
.internals-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-3);
}

.internals-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.internals-stat__label {
  font-size: 10px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.internals-stat__value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
}

/* Memory Entries */
.memory-entries {
  max-height: 200px;
  overflow-y: auto;
}

.memory-entry {
  padding: var(--spacing-2);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-1);
  cursor: pointer;
  transition: background 0.15s;
  background-color: var(--color-gray-50);
}

.memory-entry:hover {
  background-color: var(--color-gray-100);
}

.memory-entry--expanded {
  background-color: var(--color-gray-100);
}

.memory-entry__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2);
  margin-bottom: 2px;
}

.memory-entry__key {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-entry__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  flex-shrink: 0;
}

.memory-entry__scope {
  font-size: 9px;
}

.memory-entry__desc {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-entry__details {
  margin-top: var(--spacing-2);
  padding-top: var(--spacing-2);
  border-top: 1px solid var(--color-gray-200);
}

.memory-entry__size {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
}

.memory-entry__value {
  margin-top: var(--spacing-2);
  padding: var(--spacing-2);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-md);
  font-family: var(--font-family-mono);
  font-size: 10px;
  max-height: 100px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Tools List */
.tools-list {
  max-height: 200px;
  overflow-y: auto;
}

.tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-2);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-1);
  background-color: var(--color-gray-50);
}

.tool-item--disabled {
  opacity: 0.5;
}

.tool-item__name {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-item__stats {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  flex-shrink: 0;
}

.tool-item__count {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
}

.tool-item__status {
  font-size: 9px;
}

/* Tool Calls List */
.tool-calls-list {
  max-height: 300px;
  overflow-y: auto;
}

.tool-call-item {
  padding: var(--spacing-2);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-2);
  background-color: var(--color-gray-50);
  border-left: 3px solid var(--color-success);
}

.tool-call-item--error {
  border-left-color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.05);
}

.tool-call-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.tool-call-item__name {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-800);
}

.tool-call-item__duration {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
}

.tool-call-item__time {
  font-size: 10px;
  color: var(--color-gray-400);
  margin-bottom: var(--spacing-1);
}

.tool-call-item__args {
  max-height: 60px;
  overflow: auto;
}

.tool-call-item__args pre {
  margin: 0;
  padding: var(--spacing-1);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-family-mono);
  font-size: 10px;
  white-space: pre-wrap;
  word-break: break-all;
}

.tool-call-item__error {
  margin-top: var(--spacing-1);
  padding: var(--spacing-1) var(--spacing-2);
  background-color: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Code Block for System Prompt / Persistent Instructions */
.internals-code-block {
  margin: 0;
  padding: var(--spacing-3);
  background-color: var(--color-gray-900);
  border-radius: var(--radius-md);
  font-family: var(--font-family-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-gray-200);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

/* Full Context Modal */
.context-modal .modal-dialog {
  max-width: 900px;
}

.context-modal__content {
  max-height: 90vh;
}

.context-modal__body {
  max-height: calc(90vh - 130px);
  overflow-y: auto;
  padding: 0;
  background-color: var(--color-gray-50);
}

.context-components {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
}

.context-component {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
}

.context-component__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-3) var(--spacing-4);
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
}

.context-component__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
}

.context-component__content {
  margin: 0;
  padding: var(--spacing-4);
  font-family: var(--font-family-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--color-gray-700);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--color-gray-900);
  color: var(--color-gray-200);
}

/* Token Breakdown */
.token-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.token-breakdown-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-1) 0;
  font-size: var(--font-size-xs);
}

.token-breakdown-item__name {
  flex: 0 0 140px;
  color: var(--color-gray-700);
  font-weight: var(--font-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-breakdown-item__bar {
  flex: 1;
  height: 6px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.token-breakdown-item__bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light, var(--color-primary)));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.token-breakdown-item__value {
  flex: 0 0 110px;
  text-align: right;
  color: var(--color-gray-600);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-family-mono);
  font-size: 10px;
}

/* ============================================
   Chat Tab Bar
   ============================================ */

.chat-tabs {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-1);
  padding: var(--spacing-2) var(--spacing-3) 0;
  background-color: var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-200);
  overflow-x: auto;
  flex-shrink: 0;
}

/* Hide scrollbar but allow scrolling */
.chat-tabs::-webkit-scrollbar {
  height: 0;
  display: none;
}

.chat-tabs__list {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  min-width: 0;
  flex: 1;
}

/* Individual Tab */
.chat-tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 100px;
  max-width: 200px;
  flex-shrink: 0;
}

.chat-tab:hover {
  border-color: var(--color-gray-300);
  background-color: var(--color-gray-50);
}

.chat-tab:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.chat-tab--active {
  background-color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-tab--active:hover {
  background-color: var(--color-white);
  border-color: var(--color-primary);
}

.chat-tab--loading {
  opacity: 0.8;
}

.chat-tab__spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.chat-tab__spinner .spin {
  animation: spin 1s linear infinite;
}

.chat-tab__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.chat-tab--active .chat-tab__title {
  color: var(--color-gray-900);
}

.chat-tab__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-gray-400);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.chat-tab__close:hover {
  background-color: var(--color-gray-200);
  color: var(--color-gray-700);
}

.chat-tab--active .chat-tab__close:hover {
  background-color: var(--color-gray-100);
}

/* Toolbar Actions Container */
.chat-tabs__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-left: auto;
  flex-shrink: 0;
}

/* New Tab Button */
.chat-tabs__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: 1px dashed var(--color-gray-300);
  border-radius: var(--radius-lg);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-tabs__add:hover {
  background-color: var(--color-white);
  border-color: var(--color-primary);
  border-style: solid;
  color: var(--color-primary);
}

.chat-tabs__add:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.chat-tabs__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toolbar Action Button (internals toggle, etc.) */
.chat-tabs__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-tabs__action:hover {
  background-color: var(--color-gray-50);
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}

.chat-tabs__action:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.chat-tabs__action--active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.chat-tabs__action--active:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
}

.chat-tabs__action--stop {
  color: var(--color-danger, #dc3545);
}

.chat-tabs__action--stop:hover {
  background-color: var(--color-danger, #dc3545);
  color: var(--color-white);
}

/* New Tab Modal - Agent List */
.new-tab-modal__agent-list {
  max-height: 400px;
  overflow-y: auto;
}

.new-tab-modal__agent-list .list-group-item {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.new-tab-modal__agent-list .list-group-item:hover:not(.active) {
  background-color: var(--color-gray-50);
}

/* Plan Fixed Position (above messages when there's an active plan) */
.chat__plan-fixed {
  flex-shrink: 0;
  padding: var(--spacing-4) var(--spacing-6);
  border-bottom: 1px solid var(--color-gray-100);
  background-color: var(--color-white);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   Sidebar Panel (replaces Internals Panel)
   ============================================ */

.sidebar-panel {
  position: relative;
  height: 100%;
  background-color: var(--color-gray-50);
  border-left: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-panel__resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.15s;
}

.sidebar-panel__resize-handle:hover,
.sidebar-panel__resize-handle:active {
  background: var(--color-primary);
}

.sidebar-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  flex-shrink: 0;
  gap: var(--spacing-2);
}

.sidebar-panel__tabs {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  flex: 1;
}

.sidebar-panel__tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-panel__tab:hover {
  background-color: var(--color-gray-100);
  color: var(--color-gray-800);
}

.sidebar-panel__tab--active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.sidebar-panel__tab--active:hover {
  background-color: var(--color-primary-light);
}

.sidebar-panel__notification-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--color-danger);
  border-radius: var(--radius-full);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.sidebar-panel__close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-panel__close-btn:hover {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
}

.sidebar-panel__content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow content to shrink in flex context */
}

/* ============================================
   Internals Content (Look Inside tab)
   ============================================ */

.internals-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.internals-content__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-2) var(--spacing-3);
  border-bottom: 1px solid var(--color-gray-200);
  background-color: var(--color-white);
}

.internals-content__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.internals-content__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-2);
}

/* ============================================
   Dynamic UI Panel
   ============================================ */

.dynamic-ui-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0; /* Allow shrinking in flex context */
  padding: var(--spacing-3);
  overflow: hidden; /* Prevent scrolling - let content fill */
}

.dynamic-ui-panel--empty {
  align-items: center;
  justify-content: center;
}

.dynamic-ui-panel__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 280px;
  padding: var(--spacing-6);
}

.dynamic-ui-panel__empty-icon {
  color: var(--color-gray-300);
  margin-bottom: var(--spacing-4);
}

.dynamic-ui-panel__empty-state h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-700);
  margin: 0 0 var(--spacing-2);
}

.dynamic-ui-panel__empty-state p {
  font-size: var(--font-size-sm);
  margin: 0;
}

.dynamic-ui-panel__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-2);
  border-bottom: 1px solid var(--color-gray-200);
}

.dynamic-ui-panel__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  flex: 1;
  min-height: 0; /* Allow shrinking */
}

/* Dynamic UI Elements */
.dynamic-ui__text {
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

.dynamic-ui__text--muted {
  color: var(--color-gray-500);
}

.dynamic-ui__text--small {
  font-size: var(--font-size-xs);
}

.dynamic-ui__heading {
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
  margin: 0;
}

h1.dynamic-ui__heading {
  font-size: var(--font-size-2xl);
}

h2.dynamic-ui__heading {
  font-size: var(--font-size-xl);
}

h3.dynamic-ui__heading {
  font-size: var(--font-size-lg);
}

h4.dynamic-ui__heading {
  font-size: var(--font-size-base);
}

.dynamic-ui__input-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

.dynamic-ui__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
}

.dynamic-ui__input {
  font-size: var(--font-size-sm);
}

.dynamic-ui__select-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

.dynamic-ui__select {
  font-size: var(--font-size-sm);
}

.dynamic-ui__button {
  /* Uses Bootstrap button styles */
}

.dynamic-ui__progress-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

.dynamic-ui__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.dynamic-ui__progress {
  height: 8px;
}

.dynamic-ui__alert {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-2);
  font-size: var(--font-size-sm);
  margin: 0;
}

.dynamic-ui__alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.dynamic-ui__code-block {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dynamic-ui__code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-gray-800);
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
}

.dynamic-ui__code-language {
  text-transform: uppercase;
  font-weight: var(--font-weight-medium);
}

.dynamic-ui__code {
  margin: 0;
  padding: var(--spacing-3);
  background-color: var(--color-gray-900);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  color: var(--color-gray-200);
  overflow-x: auto;
}

.dynamic-ui__code code {
  background: none;
  padding: 0;
  color: inherit;
}

.dynamic-ui__divider {
  border: none;
  border-top: 1px solid var(--color-gray-200);
  margin: var(--spacing-2) 0;
}

.dynamic-ui__spacer {
  height: var(--spacing-4);
}

.dynamic-ui__image-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.dynamic-ui__image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.dynamic-ui__image-caption {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  text-align: center;
}

.dynamic-ui__list {
  margin: 0;
  padding-left: var(--spacing-5);
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
}

.dynamic-ui__list li {
  margin-bottom: var(--spacing-1);
}

.dynamic-ui__table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
}

.dynamic-ui__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.dynamic-ui__table th {
  background-color: var(--color-gray-100);
  padding: var(--spacing-2) var(--spacing-3);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-700);
  border-bottom: 1px solid var(--color-gray-200);
}

.dynamic-ui__table td {
  padding: var(--spacing-2) var(--spacing-3);
  border-bottom: 1px solid var(--color-gray-100);
  color: var(--color-gray-600);
}

.dynamic-ui__table tr:last-child td {
  border-bottom: none;
}

.dynamic-ui__link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
}

.dynamic-ui__link:hover {
  text-decoration: underline;
}

.dynamic-ui__badge {
  font-size: var(--font-size-xs);
}

.dynamic-ui__card {
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-white);
}

.dynamic-ui__card-header {
  padding: var(--spacing-3);
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-800);
}

.dynamic-ui__card-body {
  padding: var(--spacing-3);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

/* Browser View Host */
.browser-view-host {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-white);
  flex: 1;
  height: 100%;
  min-height: 0; /* Allow shrinking in flex context */
}

.browser-view-host__toolbar {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
}

.browser-view-host__nav-buttons {
  display: flex;
  gap: var(--spacing-1);
}

.browser-view-host__nav-buttons .btn {
  padding: var(--spacing-1) var(--spacing-2);
}

.browser-view-host__url-form {
  flex: 1;
}

.browser-view-host__url-input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 0 var(--spacing-2);
}

.browser-view-host__url-icon {
  color: var(--color-gray-400);
  flex-shrink: 0;
}

.browser-view-host__url-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: var(--font-size-sm);
  padding: var(--spacing-1) var(--spacing-2);
}

.browser-view-host__url-input:focus {
  outline: none;
  box-shadow: none;
}

.browser-view-host__loading-spinner {
  color: var(--color-primary);
  flex-shrink: 0;
}

.browser-view-host__title {
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-view-host__error {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-danger-light, #fee2e2);
  color: var(--color-danger, #dc2626);
  font-size: var(--font-size-sm);
}

.browser-view-host__overlay-notice {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-warning-light, #fef3c7);
  color: var(--color-warning-dark, #b45309);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-warning, #f59e0b);
}

.browser-view-host__overlay-notice strong {
  text-transform: capitalize;
}

.browser-view-host__overlay-buttons {
  opacity: 0.8;
  font-style: italic;
}

.browser-view-host__container {
  position: relative;
  flex: 1;
  min-height: 300px; /* Minimum reasonable height */
  background-color: var(--color-gray-100);
}

.browser-view-host__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-3);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

.dynamic-ui__browser-error {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3);
  background-color: var(--color-warning-light, #fef3c7);
  color: var(--color-warning-dark, #b45309);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

/* Spinning animation for reload button */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 1s linear infinite;
}

/* Context Display Panel — now provided by @everworker/react-ui/styles/context-display */
/* Everworker Desktop-specific overrides for the shared cdp-* classes */

/* Map Everworker Desktop CSS variables to cdp variables */
.cdp-panel {
  --cdp-border-color: var(--color-gray-200);
  --cdp-bg: white;
  --cdp-bg-subtle: var(--color-gray-50);
  --cdp-text: var(--color-gray-800);
  --cdp-text-muted: var(--color-gray-500);
  --cdp-text-faint: var(--color-gray-400);
  --cdp-primary: var(--color-primary);
  --cdp-primary-hover: var(--color-primary-hover);
  --cdp-primary-light: var(--color-primary-light);
  --cdp-radius: var(--border-radius-md);
  --cdp-radius-sm: var(--border-radius-sm);
  --cdp-font-sm: var(--font-size-sm);
  --cdp-font-xs: var(--font-size-xs);
  --cdp-spacing-1: var(--spacing-1);
  --cdp-spacing-2: var(--spacing-2);
  --cdp-spacing-3: var(--spacing-3);
  border-bottom: 1px solid var(--color-gray-200);
}

.cdp-panel--maximized {
  border-bottom: none;
}

/* When a context card is maximized, prevent double scrollbars on the parent */
.sidebar-panel__content:has(.cdp-panel--maximized) {
  overflow-y: hidden;
}

/* ============ Routines Panel ============ */

.routines-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.routines-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-gray-200);
  min-height: 36px;
}

.routines-panel__list {
  flex: 1;
  overflow-y: auto;
}

.routines-panel__item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-gray-100);
  cursor: pointer;
  transition: background-color 0.1s;
}

.routines-panel__item:hover {
  background-color: var(--color-gray-50);
}

.routines-panel__detail {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.routines-panel__execution-banner {
  padding: 8px 12px;
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  cursor: pointer;
}

.routines-panel__execution-banner:hover {
  background: var(--color-gray-100);
}

.routines-panel__tasks {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px;
}

.routines-panel__task-card {
  padding: 8px;
  border-bottom: 1px solid var(--color-gray-100);
}

.routines-panel__steps {
  border-top: 1px solid var(--color-gray-200);
  padding-top: 8px;
  max-height: 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.routines-panel__step-log {
  overflow-y: auto;
  padding: 0 12px;
  flex: 1;
}

.routines-panel__step {
  display: flex;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid var(--color-gray-50);
}

/* Spin animation for loader icon */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}
