/* Maha Training — hands-on prompt lab (/mahatraining/hands-on-prompt) */

.maha-hands-on-page .maha-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ho-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.ho-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ho-topbar-brand h1 {
  margin: 0;
  font-size: 1.15rem;
}

.ho-tagline {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.ho-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
}

.ho-back-link:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.ho-topbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.ho-tool-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ho-select-compact {
  min-width: 9rem;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.ho-btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.ho-shell {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(220px, 280px) 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ho-modules,
.ho-prompts {
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ho-sidebar-history {
  flex-shrink: 0;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
}

.ho-sidebar-history .maha-history-groups {
  max-height: min(160px, 22vh);
}

.ho-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.ho-module-list,
.ho-prompt-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ho-module-btn,
.ho-prompt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid transparent;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ho-module-btn:hover,
.ho-prompt-btn:hover {
  border-color: var(--border);
  background: var(--surface-elevated);
}

.ho-module-btn.active,
.ho-prompt-btn.active {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.12);
}

.ho-module-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
}

.ho-module-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.ho-prompt-label {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ho-prompt-cat {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ho-prompt-generate {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-muted);
  color: var(--text);
  cursor: pointer;
}

.ho-prompt-generate:hover {
  border-color: var(--accent);
}

.ho-hint {
  padding: 8px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.ho-response {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(37, 99, 235, 0.06), transparent 60%),
    var(--bg);
}

.ho-empty {
  margin: auto;
  max-width: 520px;
  padding: 32px 24px;
  text-align: center;
}

.ho-empty h2 {
  margin: 12px 0 8px;
  font-size: 1.25rem;
}

.ho-quality-list {
  text-align: left;
  margin: 16px auto 0;
  max-width: 380px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ho-response-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px 20px;
}

.ho-response-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ho-response-module {
  margin: 0 0 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.ho-response-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.ho-response-meta {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.ho-response-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ho-quality-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ho-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
}

.ho-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 200px;
}

.ho-output.is-loading::before {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: ho-shimmer 1.2s infinite;
  margin-bottom: 12px;
  border-radius: 2px;
}

@keyframes ho-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.ho-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.ho-export-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

@media (max-width: 1024px) {
  .ho-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    overflow-y: auto;
  }

  .ho-modules,
  .ho-prompts {
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}
