/* =========================================================================
   Python Online Compiler - page styles
   Extracted from the inline <style> block in views/PythonEditor/editor.php
   Loaded via the controller's $css_files array (cache-busted by filemtime).
   ========================================================================= */

.pyeditor-wrap {
  max-width: 1140px;
  margin: 0 auto 64px;
  padding: 0 16px;
}

/* ---------- Hero header ---------- */
.pyeditor-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 34px 32px;
  margin: 24px 0 22px;
  background: linear-gradient(135deg, #0e2a45 0%, #143a63 45%, #1e5aa8 100%);
  color: #fff;
  box-shadow: 0 18px 40px -20px rgba(14, 42, 69, .55);
}
.pyeditor-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(55,118,171,.45) 0%, rgba(55,118,171,0) 70%);
  pointer-events: none;
}
.pyeditor-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.pyeditor-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: #eaf2ff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}
.pyeditor-hero h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pyeditor-hero h1 .py-logo {
  background: #fff;
  color: #3776ab;
  width: 46px; height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.4);
}
.pyeditor-hero p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #d5e3f5;
  max-width: 640px;
}
.pyeditor-hero-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.pyeditor-stat { text-align: center; }
.pyeditor-stat b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.pyeditor-stat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #a9c4e4;
}

/* ---------- Toolbar / status bar ---------- */
.pyeditor-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.pyeditor-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pyeditor-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .08s ease, box-shadow .18s ease, opacity .15s ease, filter .15s ease;
}
.pyeditor-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.pyeditor-btn:active { transform: translateY(1px); }
.pyeditor-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.pyeditor-btn-run {
  background: linear-gradient(135deg, #16a34a, #12894c);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(22,163,74,.7);
}
.pyeditor-btn-clear { background: #eef1f5; color: #374151; }
.pyeditor-btn-reset { background: #eef1f5; color: #374151; }
.pyeditor-btn-clear:hover, .pyeditor-btn-reset:hover { background: #e2e7ee; }

.pyeditor-status {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}
.pyeditor-spinner {
  width: 14px; height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: pyspin .7s linear infinite;
  display: inline-block;
}
@keyframes pyspin { to { transform: rotate(360deg); } }

/* ---------- Editor / output panels ---------- */
.pyeditor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 820px) {
  .pyeditor-grid { grid-template-columns: 1fr; }
}
.pyeditor-panel {
  border-radius: 14px;
  overflow: hidden;
  background: #1e1e2e;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 34px -22px rgba(15,23,42,.6);
  border: 1px solid #2a2a3d;
}
.pyeditor-panel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #cbd5e1;
  padding: 12px 16px;
  background: #26263a;
  border-bottom: 1px solid #33334a;
}
.pyeditor-dots { display: inline-flex; gap: 6px; margin-right: 4px; }
.pyeditor-dots i {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.pyeditor-dots .d1 { background: #ff5f57; }
.pyeditor-dots .d2 { background: #febc2e; }
.pyeditor-dots .d3 { background: #28c840; }
.pyeditor-panel-label .label-icon { margin-left: auto; opacity: .7; }
.CodeMirror {
  height: 440px;
  font-size: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.pyeditor-output {
  margin: 0;
  height: 440px;
  overflow: auto;
  padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  background: #1e1e2e;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
}
.pyeditor-output .err { color: #f87171; }

/* ---------- SEO content section ---------- */
.pyeditor-article {
  margin-top: 56px;
  color: #374151;
  font-size: 15px;
  line-height: 1.75;
}
.pyeditor-article h2 {
  font-size: 23px;
  font-weight: 800;
  color: #0e2a45;
  margin: 40px 0 14px;
  padding-left: 14px;
  border-left: 4px solid #1e5aa8;
}
.pyeditor-article h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0e2a45;
  margin: 0 0 6px;
}
.pyeditor-article p { margin: 0 0 12px; }
.pyeditor-article > ul,
.pyeditor-article > ol { margin: 0 0 16px; padding-left: 22px; }
.pyeditor-article li { margin-bottom: 6px; }
.pyeditor-article a { color: #1e5aa8; font-weight: 500; }
.pyeditor-article a:hover { text-decoration: underline; }
.pyeditor-article kbd {
  background: #0e2a45;
  color: #fff;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 12px;
  font-family: monospace;
  box-shadow: 0 2px 0 rgba(14,42,69,.4);
}
.pyeditor-article code {
  background: #eef2f7;
  color: #b4237a;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 13px;
}

/* Feature cards */
.pyeditor-features {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.pyeditor-features li {
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  padding: 16px 18px 16px 46px;
  position: relative;
  margin: 0;
  box-shadow: 0 8px 20px -16px rgba(15,23,42,.5);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pyeditor-features li:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -16px rgba(15,23,42,.5);
}
.pyeditor-features li::before {
  content: "\2713";
  position: absolute;
  left: 14px; top: 16px;
  width: 20px; height: 20px;
  background: #16a34a;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Steps */
.pyeditor-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 4px 0 8px;
}
.pyeditor-steps li {
  position: relative;
  padding: 4px 0 4px 44px;
  margin-bottom: 12px;
  counter-increment: step;
  min-height: 30px;
  display: flex;
  align-items: center;
}
.pyeditor-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #1e5aa8, #0e2a45);
  color: #fff;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Code samples */
.pyeditor-sample {
  position: relative;
  background: #1e1e2e;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 40px 18px 16px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 18px;
  border: 1px solid #2a2a3d;
}
.pyeditor-sample::before {
  content: "python";
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #26263a;
  border-bottom: 1px solid #33334a;
}
.pyeditor-sample code { background: none; padding: 0; color: inherit; }

/* FAQ accordion-style cards */
.pyeditor-faq { display: grid; gap: 12px; }
.pyeditor-faq-item {
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 20px -18px rgba(15,23,42,.5);
}
.pyeditor-faq-item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pyeditor-faq-item h3::before {
  content: "Q";
  flex: 0 0 auto;
  width: 24px; height: 24px;
  background: #eaf1fb;
  color: #1e5aa8;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pyeditor-faq-item p { margin: 8px 0 0; color: #4b5563; }

/* Related links cards */
.pyeditor-links {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.pyeditor-links li { margin: 0; }
.pyeditor-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 600;
  color: #0e2a45;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pyeditor-links a::before {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #1e5aa8;
  transition: transform .15s ease;
}
.pyeditor-links a:hover {
  transform: translateY(-2px);
  border-color: #1e5aa8;
  box-shadow: 0 14px 26px -16px rgba(30,90,168,.6);
  text-decoration: none;
}
.pyeditor-links a:hover::before { transform: translateX(3px); }

/* ---------- Hero copy (benefit-first) ---------- */
.pyeditor-hero-lead {
  margin: 12px 0 0 !important;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.pyeditor-hero-sub {
  margin: 5px 0 0 !important;
  font-size: 14px;
  line-height: 1.55;
  color: #cddcf0;
  max-width: 620px;
}

/* ---------- Runtime load progress bar ---------- */
.pyeditor-progress {
  display: none;
  width: 90px;
  height: 6px;
  border-radius: 999px;
  background: #dbe3ec;
  overflow: hidden;
  margin-left: 4px;
}
.pyeditor-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #38bdf8);
  transition: width .25s ease;
}

/* ---------- Inline input() tip ---------- */
.pyeditor-tip {
  margin: 0;
  padding: 9px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
  background: #26263a;
  border-top: 1px solid #33334a;
}
.pyeditor-tip i { color: #febc2e; margin-right: 6px; }
.pyeditor-tip code {
  background: #1e1e2e;
  color: #93c5fd;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
}
