/* Stylesheet for Offline Code Compiler & Playground - Flat Minimalist Professional Style */

.lang-picker-dropdown {
  background-color: var(--bg-input);
  border: 1px solid var(--border-muted);
  color: var(--text-primary);
  padding: 0.45rem 1.8rem 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.lang-picker-dropdown:hover, .lang-picker-dropdown:focus {
  border-color: var(--text-tertiary);
  background-color: var(--border-muted);
}

.select-bar-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.font-adjust {
  padding-right: 1.6rem !important;
  font-family: var(--font-mono) !important;
  font-size: 0.725rem !important;
}

.hidden {
  display: none !important;
}

/* Code Panel adjustments */
.match-panels {
  min-height: 580px;
}

.console-panels-container {
  overflow: hidden;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Virtual Terminal Console Box */
.terminal-container-box {
  width: 100%;
  height: 480px;
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: var(--current-font-size, 14px);
  line-height: 1.6;
  background-color: transparent;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.system-welcome-tag {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-feed-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

/* Console logs coloring */
.console-line {
  word-break: break-all;
  white-space: pre-wrap;
  display: flex;
  gap: 0.5rem;
}

.console-line .timestamp {
  color: var(--text-tertiary);
  font-size: 0.725rem;
  user-select: none;
  min-width: 75px;
}

.console-line .log-body {
  flex: 1;
}

.console-line.log {
  color: var(--text-primary);
}

.console-line.error {
  color: #ef4444; /* red-500 */
}

.console-line.error .log-body {
  font-weight: 500;
}

.console-line.warn {
  color: #fbbf24; /* yellow-400 */
}

.console-line.info {
  color: #38bdf8; /* sky-400 */
}

.console-line.system {
  color: var(--tool-color);
  font-weight: 500;
}

/* Iframe rendering space for design sandbox */
.web-preview-container-box {
  width: 100%;
  height: 480px;
  flex: 1;
  position: relative;
  background-color: #ffffff; /* Consistent pure white sheet canvas */
}

#live-render-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #ffffff;
}

/* Minimalist Grid Layout representation for SQL queries */
.console-table-wrapper {
  overflow-x: auto;
  margin: 0.5rem 0;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-muted);
}

.console-sql-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.775rem;
}

.console-sql-table th {
  background-color: var(--bg-input);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border-muted);
  font-family: var(--font-sans);
}

.console-sql-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-secondary);
}

.console-sql-table tr:last-child td {
  border-bottom: none;
}

:root[theme="light"] .web-preview-container-box {
  border-top: 1px solid var(--border-muted);
}

/* Flex layout utilities */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.flex-wrap {
  flex-wrap: wrap;
}

.ml-auto {
  margin-left: auto;
}
