/**
 * IntervAI Pro - Interactive Workspace Styles (Code, Whiteboard, STAR Coach, Console)
 */

.interview-right-workspace {
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
}

/* Workspace Navigation Bar */
.ws-top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-glass);
}

.ws-tabs-list {
  display: flex;
  gap: 0.35rem;
}

.ws-tab-btn {
  padding: 0.5rem 0.95rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.ws-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.ws-tab-btn.active {
  color: var(--color-sky);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.ws-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Workspace Panes */
.ws-content-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ws-pane {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.ws-pane.active {
  display: flex;
  flex-direction: column;
}

/* --- TAB 1: CODE EDITOR & TEST CONSOLE --- */
.code-editor-layout {
  display: grid;
  grid-template-rows: 1fr 200px;
  height: 100%;
}

.code-editor-container {
  display: flex;
  position: relative;
  background: #0d1117;
  overflow: hidden;
}

.code-line-numbers {
  width: 44px;
  padding: 1rem 0;
  text-align: right;
  padding-right: 0.65rem;
  color: #4b5563;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  user-select: none;
  background: #090d16;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.code-textarea {
  flex: 1;
  background: transparent;
  color: #f3f4f6;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 1rem;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  tab-size: 2;
  overflow-y: auto;
}

/* Test Console Output Area */
.test-console-panel {
  background: #0b0f19;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
}

.console-body {
  flex: 1;
  padding: 0.85rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.console-placeholder {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-summary {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-summary-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.test-summary-fail {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.complexity-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.test-case-row {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.tc-pass { border-left: 3px solid var(--color-emerald); }
.tc-fail { border-left: 3px solid var(--color-rose); }

.tc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.tc-badge {
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
}

.tc-pass .tc-badge { background: var(--color-emerald); color: #000; font-weight: 700; }
.tc-fail .tc-badge { background: var(--color-rose); color: #fff; font-weight: 700; }

.tc-details {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

/* --- TAB 2: SYSTEM DESIGN WHITEBOARD --- */
.whiteboard-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.whiteboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tool-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 0.35rem;
}

.tool-chip {
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.tool-chip:hover {
  border-color: var(--color-sky);
  transform: translateY(-1px);
}

.whiteboard-canvas-wrapper {
  flex: 1;
  position: relative;
  background: #090d16;
  overflow: hidden;
}

#systemDesignCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.whiteboard-instructions-overlay {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  pointer-events: none;
}

/* --- TAB 3: STAR BEHAVIORAL FRAMEWORK --- */
.star-coach-layout {
  padding: 1.5rem;
  overflow-y: auto;
}

.star-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.star-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.star-letter-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.star-s { background: rgba(99, 102, 241, 0.2); color: var(--color-primary); border: 1px solid var(--color-primary); }
.star-t { background: rgba(6, 182, 212, 0.2); color: var(--color-cyan); border: 1px solid var(--color-cyan); }
.star-a { background: rgba(16, 185, 129, 0.2); color: var(--color-emerald); border: 1px solid var(--color-emerald); }
.star-r { background: rgba(245, 158, 11, 0.2); color: var(--color-amber); border: 1px solid var(--color-amber); }

.star-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.star-prompt {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.star-textarea {
  width: 100%;
  height: 90px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: none;
  outline: none;
}

.star-textarea:focus {
  border-color: var(--color-primary);
}

/* --- TAB 4: PROBLEM DESCRIPTION --- */
.problem-desc-layout {
  padding: 1.5rem;
  overflow-y: auto;
  line-height: 1.6;
}

.problem-desc-layout h2, .problem-desc-layout h3 {
  font-family: var(--font-heading);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.problem-desc-layout ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
