/* ============================================
   TMUX CONFIG GENERATOR — Styles
   ============================================ */

/* --- Page layout --- */
.tmux-gen {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-3xl);
  min-height: 100vh;
}

.tmux-gen__header {
  margin-bottom: var(--space-2xl);
}

.tmux-gen__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.tmux-gen__back:hover {
  color: var(--accent-gold);
}

.tmux-gen__header h1 {
  margin-bottom: var(--space-sm);
}

.tmux-gen__subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 60ch;
}

.tmux-gen__subtitle code {
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  color: var(--accent-gold-light);
  font-size: 0.9em;
}

/* --- Two-column layout --- */
.tmux-gen__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* --- Options panel --- */
.tmux-gen__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.tmux-gen__section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  transition: border-color var(--transition-fast);
}

.tmux-gen__section:hover {
  border-color: var(--border-medium);
}

.tmux-gen__legend {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  padding: 0 var(--space-sm);
}

.tmux-gen__field {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tmux-gen__hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* --- Radio buttons --- */
.tmux-gen__radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.tmux-gen__radio-label:hover {
  color: var(--text-primary);
}

.tmux-gen__radio-label input[type="radio"] {
  display: none;
}

.tmux-gen__radio-custom {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition-fast);
}

.tmux-gen__radio-label input[type="radio"]:checked ~ .tmux-gen__radio-custom {
  border-color: var(--accent-gold);
}

.tmux-gen__radio-label input[type="radio"]:checked ~ .tmux-gen__radio-custom::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.tmux-gen__radio-label code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-tertiary);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--accent-gold-light);
}

/* --- Checkboxes --- */
.tmux-gen__checkboxes {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.tmux-gen__check-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.tmux-gen__check-label:hover {
  color: var(--text-primary);
}

.tmux-gen__check-label input[type="checkbox"] {
  display: none;
}

.tmux-gen__check-custom {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-fast);
}

.tmux-gen__check-label input[type="checkbox"]:checked ~ .tmux-gen__check-custom {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.tmux-gen__check-label input[type="checkbox"]:checked ~ .tmux-gen__check-custom::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid var(--bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tmux-gen__check-label code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-tertiary);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--accent-gold-light);
}

/* --- Select dropdowns --- */
.tmux-gen__select-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.tmux-gen__select-label select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: 0.45rem 2rem 0.45rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23c9a84c' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  min-width: 160px;
}

.tmux-gen__select-label select:hover,
.tmux-gen__select-label select:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-gold-dim);
}

.tmux-gen__select-label select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* --- Generate button --- */
.tmux-gen__generate {
  align-self: flex-start;
  margin-top: var(--space-sm);
}

/* --- Output panel --- */
.tmux-gen__output {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
}

.tmux-gen__output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.tmux-gen__output-header h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tmux-gen__output-header h3 code {
  color: var(--accent-gold);
  font-size: 0.9em;
}

.tmux-gen__copy-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  background: var(--accent-gold-dim);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-sm);
  color: var(--accent-gold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tmux-gen__copy-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.tmux-gen__copy-btn.copied {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}

.tmux-gen__code {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: none;
  border-radius: 0;
}

.tmux-gen__code code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .tmux-gen__layout {
    grid-template-columns: 1fr;
  }

  .tmux-gen__output {
    position: static;
    max-height: 60vh;
  }
}

@media (max-width: 768px) {
  .tmux-gen__select-label {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .tmux-gen__select-label select {
    width: 100%;
  }
}
