/* shared-components.css - Baseline Semantic Design System Components */

.ds-surface {
  background: var(--ds-surface-base);
  color: var(--ds-text-primary);
  border-radius: var(--ds-radius-lg);
  transition: background var(--ds-duration-normal) var(--ds-ease-standard),
              color var(--ds-duration-normal) var(--ds-ease-standard);
}

.ds-surface-raised {
  background: var(--ds-surface-raised);
  box-shadow: var(--ds-elevation-sm);
  border-radius: var(--ds-radius-lg);
}

/* Typography Base */
.ds-text-primary {
  color: var(--ds-text-primary);
}

.ds-text-secondary {
  color: var(--ds-text-secondary);
}

.ds-text-muted {
  color: var(--ds-text-muted);
}

/* Button Primitives */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-spacing-2);
  padding: var(--ds-spacing-2) var(--ds-spacing-4);
  border-radius: var(--ds-radius-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color var(--ds-duration-fast) var(--ds-ease-standard),
              transform var(--ds-duration-fast) var(--ds-ease-standard);
}

.ds-btn:active {
  transform: scale(0.96);
}

.ds-btn-primary {
  background: var(--ds-accent-primary);
  color: var(--ds-accent-foreground);
}

.ds-btn-primary:hover {
  background: var(--ds-accent-hover);
}

.ds-btn-primary:active {
  background: var(--ds-accent-active);
}

.ds-btn-ghost {
  background: transparent;
  color: var(--ds-accent-primary);
}

.ds-btn-ghost:hover {
  background: var(--ds-state-hover);
}

.ds-btn-ghost:active {
  background: var(--ds-state-pressed);
}

/* Input Primitives */
.ds-input {
  width: 100%;
  padding: var(--ds-spacing-3) var(--ds-spacing-4);
  border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border-subtle);
  background: var(--ds-surface-input);
  color: var(--ds-text-primary);
  transition: border-color var(--ds-duration-fast) var(--ds-ease-standard),
              box-shadow var(--ds-duration-fast) var(--ds-ease-standard);
}

.ds-input:focus {
  border-color: var(--ds-accent-primary);
  box-shadow: 0 0 0 4px var(--ds-state-focus);
  outline: none;
}

/* Layout Utilities */
.ds-flex-row {
  display: flex;
  align-items: center;
}

.ds-flex-column {
  display: flex;
  flex-direction: column;
}

.ds-gap-2 {
  gap: var(--ds-spacing-2);
}

.ds-gap-3 {
  gap: var(--ds-spacing-3);
}

/* Desktop Responsive Layout Frame (Provisional) */
.ds-desktop-app-frame {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--ds-surface-base);
}

.ds-desktop-list-pane {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%; /* Default mobile behavior */
  transition: width var(--ds-duration-normal) var(--ds-ease-standard);
  border-left: 1px solid var(--ds-border-subtle);
}

.ds-desktop-chat-pane {
  display: none; /* Hidden on mobile */
  flex: 1;
  min-width: 0; /* Prevents flex overflow */
  position: relative;
  transition: width var(--ds-duration-normal) var(--ds-ease-standard);
}

.ds-desktop-context-pane {
  display: none;
  flex-shrink: 0;
  border-right: 1px solid var(--ds-border-subtle);
  transition: width var(--ds-duration-normal) var(--ds-ease-standard);
}

/* Provisional Breakpoints */
@media (min-width: 768px) {
  .ds-desktop-list-pane {
    width: 320px;
    max-width: 400px;
  }
  .ds-desktop-chat-pane {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 1100px) {
  .ds-desktop-list-pane {
    width: 360px;
  }
  /* When context pane is active */
  .ds-app-has-context-pane .ds-desktop-context-pane {
    display: flex;
    flex-direction: column;
    width: 320px;
  }
}
