/* Theme Colors */
:root {
  --primary-color: #4a6fa5;
  --secondary-color: #166d9e;
  --accent-color: #48c78e;
  --dark-bg: #2c3e50;
  --light-bg: #f8f9fa;
  --border-color: #e2e8f0;
  /* Softer border */
  --text-light: #f5f5f5;
  --text-dark: #2d3748;
  --header-bg: #1a2c42;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  /* Modern shadow */

  --app-bg: #f7fafc;
  /* Very light cool grey */
  --panel-bg: #ffffff;
  --panel-header-bg: #f8fafc;
}

/* Body background */
body,
html {
  background-color: var(--app-bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Monaco Editor styling */
#codeEditor {
  height: 400px;
  border: 1px solid #ddd;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
}

#complexityEditor {
  border-radius: 4px;
  background-color: #f8f9fa;
}

/* Container for the entire application */
#bodyWrapper {
  max-width: 1200px;
  margin: 20px auto;
}

/* Header styling */
#headerRow {
  margin-bottom: 20px;
  background-color: var(--header-bg);
  box-shadow: var(--box-shadow);
  border: none;
}

#title {
  color: var(--text-light);
}

/* Style for highlighting the Big O notation */
.ltBlueLine {
  background-color: rgba(173, 216, 230, 0.3);
  /* Light blue with transparency */
}

.dkBlueLine {
  background-color: rgba(33, 150, 188, 0.3);
  /* Light blue with transparency */
}

.yellowLine {
  background-color: rgba(255, 255, 204, 0.6);
  /* Light-yellow with transparency */
}

.column {
  height: 100%;
}

/* Make sure editors take full height */
.columns.is-gapless {
  height: 100%;
}

.columns.is-variable.is-2 {
  --columnGap: 0.5rem;
}

/* Box styling */
.box {
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
  background-color: var(--panel-bg);
}

/* Panel Header Override */
.panel-header-v2 {
  background-color: var(--panel-header-bg) !important;
  border-bottom: 1px solid var(--border-color);
}

/* Button styling */
.button.is-light.is-purple {
  background-color: #f5effb;
  color: #9c56b8;
  border-color: #9c56b8;
}

.button.is-light.is-purple:hover {
  background-color: #ecdcf7;
}

.button.is-light.is-success {
  background-color: #effaf5;
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.button.is-light.is-info {
  background-color: #eff5fb;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Progress bar */
.progress.is-primary {
  background-color: #e9ecef;
}

.progress.is-primary::-webkit-progress-value {
  background-color: var(--accent-color);
}

/* Input fields */
.input {
  border-color: var(--border-color);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.25);
}

/* To-Do section styling */
#outputArea {
  padding: 15px;
  background-color: var(--light-bg);
  border-radius: 6px;
}

#feedbackArea {
  padding: 15px;
  background-color: var(--light-bg);
  border-radius: 6px;
}

#bodyWrapper {
  margin-top: 0;
  padding-top: 1rem;
}

/* ============================================
   Feedback Panel Styling
   ============================================ */

/* Feedback context header */
.feedback-context {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.feedback-context .tag {
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Status message area */
.feedback-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.feedback-status .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.feedback-status.is-correct .icon {
  color: var(--accent-color) !important;
}

.feedback-status.is-correct #feedbackStatusText {
  color: #257953;
  font-weight: 600;
}

.feedback-status.is-incorrect .icon {
  color: #f14668 !important;
}

.feedback-status.is-incorrect #feedbackStatusText {
  color: #cc0f35;
}

/* Hint area styling */
.feedback-hint {
  margin-top: 12px;
}

.feedback-hint .notification {
  padding: 12px 16px;
  margin-bottom: 0;
  border-left: 4px solid #ffdd57;
}

.feedback-hint .icon-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feedback-hint .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

#feedbackHintText {
  line-height: 1.5;
  white-space: pre-line;
}

/* Panel Dropdown Trigger */
.panel-dropdown-trigger {
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  height: auto !important;
  padding: 6px 12px !important;
}

.panel-dropdown-trigger:hover {
  border-color: var(--primary-color) !important;
  background-color: var(--app-bg) !important;
}

.panel-dropdown-trigger .icon {
  transition: transform 0.2s ease;
}

.dropdown.is-active .panel-dropdown-trigger .icon {
  transform: rotate(180deg);
}
/* ============================================
   Errors & Warnings Panel Styling
   ============================================ */
#notices {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--panel-header-bg);
}

/* Cap each section separately so a long error list can't
   push the warnings off the bottom of the screen */
.notices-scroll {
  max-height: 30vh;
  overflow-y: auto;
}

#notices.is-warnings-collapsed #warnings-body {
  display: none;
}

/* Same chevron behaviour as the panel dropdowns above */
#warnings-chevron {
  transition: transform 0.2s ease;
}

#notices.is-warnings-collapsed #warnings-chevron {
  transform: rotate(-90deg);
}
