@tailwind base;
@tailwind components;
@tailwind utilities;

/* Base CSS Element Custom Styles */

h1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
  margin-bottom: 10px;
  color: #004E78;
}
h2 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  margin-bottom: 10px;
  color: #004E78;
}
h3 {
  font-size: 1.5rem;
  line-height: 2rem;
  margin-bottom: 10px;
  color: #004E78;
}
h4 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  margin-bottom: 10px;
  color: #004E78;
}
h5 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin-bottom: 10px;
  color: #004E78;
}
p {
  font-size: 1rem;
  line-height: 1.5rem;
  margin-bottom: 5px;
}
ul {
  list-style-type: disc;
  margin-left: 20px;
}
ol {
  list-style-type: number;
  margin-left: 20px;
}
/* End Basic Customizations */

@layer base {
  :root {
    --background: none;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    
    /* #F89C27 / 34, 94%, 56% // #004E78 / 201 100% 24% */
    --primary: 34, 94%, 56%;
    --primary-foreground: 0 0% 98%;
    --secondary: 201 100% 24%;
    --secondary-foreground: 0 0% 98%;
    
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    
    --border: 34, 94%, 56%;
    --input: 0 0% 89.8%;
    --ring: 34, 94%, 56%;
    
    /* Keeping original chart colors */
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    
    --radius: 0.5rem;
  }
  
  .dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
    
    /* Keeping original chart colors */
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

@layer base {
  * {
    border-color: #e2e8f0;
  }
  body {
    background-color: #ffffff;
    color: #0f172a;
  }
}

/* Keyframes for landing page */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.blur {
  background: radial-gradient(circle, transparent 100%, black);
  mix-blend-mode: multiply;
}

.bg-fiber-carbon {
  background:
    radial-gradient(black 10%, transparent 1%) 0 0,
    radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 10%) 8px 19px;
  background-color: #ffff;
  background-size: 36px 36px;
}

.progress {
  animation: progress 1s infinite linear;
}

.left-right {
  transform-origin: 0% 50%;
}
@keyframes progress {
  0% {
    transform: translateX(0) scaleX(0);
  }
  40% {
    transform: translateX(0) scaleX(0.4);
  }
  100% {
    transform: translateX(100%) scaleX(0.5);
  }
}

.lab-content table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.lab-content th,
.lab-content td {
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  vertical-align: top;
}

.lab-content th {
  background-color: #f3f4f6;
  text-align: left;
}

.lab-content img {
  cursor: zoom-in;
}

.lab-image-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(75, 85, 99, 0.82);
}

.lab-image-modal__surface {
  max-width: 95vw;
  max-height: 95vh;
}

.lab-image-modal__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 10px;
  box-shadow: 0 18px 56px rgba(17, 24, 39, 0.5);
}

.lab-content .lab-callout {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid;
  border-radius: 0.25rem;
}

.lab-content .lab-callout--warning {
  border-left-color: #dc2626;
  background-color: #fef2f2;
}

.lab-content .lab-callout--info {
  border-left-color: #2563eb;
  background-color: #eff6ff;
}

.lab-content .lab-callout--checkpoint {
  border-left-color: #15803d;
  background-color: #f0fdf4;
}

.lab-content pre.lab-cli-shell {
  position: relative;
  margin: 1rem 0;
  padding: 0.9rem 1rem 0.85rem;
  border: 1px solid #c8d9e8;
  border-left: 5px solid #004e78;
  border-radius: 10px;
  background: #f4f9ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.lab-content pre.lab-cli-shell::before {
  content: "CLI";
  position: absolute;
  top: 0.42rem;
  left: 0.7rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4a6477;
}

.lab-content pre.lab-cli-shell code {
  display: block;
  margin-top: 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 0.9rem;
  line-height: 1.38;
}

.lab-content pre.lab-cli-shell .lab-copy-button {
  position: absolute;
  top: 0.36rem;
  right: 0.4rem;
  z-index: 1;
  border: 1px solid #c3d4e5;
  border-radius: 8px;
  background: #ffffff;
  color: #294e69;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.34rem 0.56rem;
  cursor: pointer;
}

.lab-content pre.lab-cli-shell .lab-copy-button:hover {
  background: #eef5fb;
}

.lab-content pre.lab-cli-shell .lab-copy-button.is-copied {
  border-color: #88c09e;
  color: #0f5d33;
  background: #eaf8ef;
}

.lab-content pre.lab-prompt-card {
  position: relative;
  margin: 1rem 0;
  padding: 0.92rem 1rem 0.92rem;
  border: 1px solid #d7c7a7;
  border-left: 5px solid #b77400;
  border-radius: 10px;
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.lab-content pre.lab-prompt-card::before {
  content: "Card Description";
  position: absolute;
  top: 0.42rem;
  left: 0.7rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6c4a12;
}

.lab-content pre.lab-prompt-card code {
  display: block;
  margin-top: 1.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.lab-content pre.lab-prompt-card .lab-copy-button {
  position: absolute;
  top: 0.34rem;
  right: 0.4rem;
  z-index: 1;
  border: 1px solid #9b5a00;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd18d, #f3a743);
  color: #3d2401;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.36rem 0.62rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(61, 36, 1, 0.18);
}

.lab-content pre.lab-prompt-card .lab-copy-button:hover {
  background: linear-gradient(180deg, #ffdb9f, #f5b459);
}

.lab-content pre.lab-prompt-card .lab-copy-button.is-copied {
  border-color: #4f8d5f;
  color: #08361a;
  background: linear-gradient(180deg, #c8f2d4, #9edcb3);
}

.lab-content ul.lab-settings-list {
  list-style: none;
  margin: 0.9rem 0 1.2rem;
  margin-left: 0;
  padding: 0.22rem 0;
  border: 1px solid #ccdeec;
  border-left: 5px solid #0b72ba;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fcff, #f4f9fe);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.lab-content ul.lab-settings-list > li.lab-settings-item {
  margin: 0;
  padding: 0.5rem 0.85rem;
  border: none;
  border-bottom: 1px dashed #d5e3ef;
  border-radius: 0;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.lab-content ul.lab-settings-list > li.lab-settings-item:last-child {
  border-bottom: none;
}

.lab-content ul.lab-settings-list .lab-setting-key {
  font-weight: 600;
  color: #0b4e77;
  letter-spacing: 0.01em;
}

.lab-content ul.lab-settings-list .lab-setting-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1f425f;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  white-space: nowrap;
}

.lab-content hr {
  margin: 2rem 0 1.4rem;
  border-color: #d7dee6;
}

.lab-content .objective-segment {
  position: relative;
  margin: 1.75rem 0;
}

.lab-content .objective-segment > :first-child {
  margin-top: 0;
}

.lab-content .objective-segment > :last-child {
  margin-bottom: 0;
}

.lab-content .objective-segment > h2 {
  scroll-margin-top: 2rem;
}

.lab-content.objective-style-divider .objective-segment {
  padding-top: 1.55rem;
}

.lab-content.objective-style-divider .objective-segment::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0, 78, 120, 0.08),
    rgba(0, 78, 120, 0.45) 12%,
    rgba(0, 78, 120, 0.45) 88%,
    rgba(0, 78, 120, 0.08)
  );
}

.lab-content.objective-style-cards .objective-segment {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem 1.2rem;
  border: 1px solid #d8e1ea;
  border-left: 6px solid #f89c27;
  border-radius: 12px;
  background: #f9fbfd;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.lab-content.objective-style-cards .objective-segment > h2 {
  margin-bottom: 0.75rem;
}

.lab-content.objective-style-rail .objective-segment {
  margin: 1.8rem 0;
  padding: 0.4rem 0 0.5rem 1.15rem;
  border-left: 4px solid #004e78;
  background: linear-gradient(90deg, rgba(0, 78, 120, 0.08), rgba(0, 78, 120, 0));
}

.lab-content.objective-style-rail .objective-segment > h2 {
  margin-bottom: 0.75rem;
}

.lab-content.objective-style-rail .objective-segment > h2::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.2rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background-color: #f89c27;
}

.lab-content .lab-step-title {
  margin-top: 1.2rem;
  margin-bottom: 0.55rem;
  line-height: 1.35;
  color: #003f61;
  letter-spacing: 0.01em;
}

.lab-content .lab-step-title + p,
.lab-content .lab-step-title + ul,
.lab-content .lab-step-title + ol,
.lab-content .lab-step-title + pre,
.lab-content .lab-step-title + blockquote,
.lab-content .lab-step-title + figure {
  margin-top: 0.45rem;
}

.lab-content.step-style-underline .lab-step-title {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #d9e3ec;
}

.lab-content.step-style-underline .lab-step-title[data-step-mode="execute"] {
  border-bottom-color: #f8cc8f;
}

.lab-content.step-style-underline .lab-step-title[data-step-mode="explore"] {
  border-bottom-color: #9bc9ee;
}

.lab-content.step-style-underline .lab-step-title[data-step-mode="checkpoint"] {
  border-bottom-color: #86d4a4;
}

.lab-content.step-style-pills .lab-step-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d8e2eb;
  background: #f7fbff;
}

.lab-content.step-style-pills .lab-step-title::before {
  content: attr(data-step-mode);
  text-transform: capitalize;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  color: #1a4f72;
  background: #e2eef8;
}

.lab-content.step-style-pills .lab-step-title:not([data-step-mode])::before {
  content: none;
}

.lab-content.step-style-pills .lab-step-title[data-step-mode="execute"]::before {
  color: #8a4d00;
  background: #fee7c7;
}

.lab-content.step-style-pills .lab-step-title[data-step-mode="explore"]::before {
  color: #0f4970;
  background: #d9ebfb;
}

.lab-content.step-style-pills .lab-step-title[data-step-mode="checkpoint"]::before {
  color: #0e5e35;
  background: #d9f7e4;
}

.lab-content.step-style-blocks .lab-step-title {
  padding: 0.7rem 0.9rem;
  border: 1px solid #d8e2eb;
  border-left: 5px solid #004e78;
  border-radius: 10px;
  background: #f9fbfd;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.lab-content.step-style-blocks .lab-step-title[data-step-mode="execute"] {
  border-left-color: #cc7a00;
  background: #fffbf5;
}

.lab-content.step-style-blocks .lab-step-title[data-step-mode="explore"] {
  border-left-color: #0b72ba;
  background: #f6fbff;
}

.lab-content.step-style-blocks .lab-step-title[data-step-mode="checkpoint"] {
  border-left-color: #198754;
  background: #f6fffa;
}

.lab-content .step-segment {
  position: relative;
  margin: 1rem 0 1.35rem;
}

.lab-content .step-segment > :first-child {
  margin-top: 0;
}

.lab-content .step-segment > :last-child {
  margin-bottom: 0;
}

.lab-content .step-segment[data-step-kind]::before {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.lab-content.breakout-style-panel .step-segment {
  padding: 0.75rem 0.9rem 0.9rem;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
}

.lab-content.breakout-style-panel .step-segment[data-step-kind="explanation"] {
  border-left: 5px solid #2b7fbf;
  background: #f5fafe;
}

.lab-content.breakout-style-panel .step-segment[data-step-kind="instruction"] {
  border-left: 5px solid #d48806;
  background: #fffaf2;
}

.lab-content.breakout-style-panel .step-segment[data-step-kind="mixed"] {
  border-left: 5px solid #0e7490;
  background: linear-gradient(90deg, #f6fbff, #fffbf5);
}

.lab-content.breakout-style-panel .step-segment[data-step-kind]::before {
  color: #315168;
  content: attr(data-step-kind);
}

.lab-content.breakout-style-workflow .step-segment {
  padding: 0.45rem 0 0.65rem 1rem;
  border-left: 2px dashed #c6d5e3;
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind="explanation"] {
  border-left-color: #6da9d8;
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind="instruction"] {
  border-left-color: #de9a2e;
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind="mixed"] {
  border-left-color: #4a95ab;
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind]::before {
  width: 1.2rem;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: 999px;
  margin-left: -1.4rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: #6da9d8;
  content: "";
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind="instruction"]::before {
  background: #de9a2e;
}

.lab-content.breakout-style-workflow .step-segment[data-step-kind="mixed"]::before {
  background: #4a95ab;
}

.lab-content .explicit-command-block {
  margin: 0.8rem 0;
}

.lab-content .explicit-command .cmd-pill {
  display: block;
}

.lab-content.breakout-style-command-pills .step-segment {
  padding: 0.3rem 0 0.45rem;
}

.lab-content.breakout-style-command-pills .step-segment[data-step-kind="instruction"] {
  border-left: 3px solid #f0b45f;
  padding-left: 0.75rem;
}

.lab-content.breakout-style-command-pills .step-segment[data-step-kind="explanation"] {
  border-left: 3px solid #8dc1e7;
  padding-left: 0.75rem;
}

.lab-content.breakout-style-command-pills .step-segment[data-step-kind="mixed"] {
  border-left: 3px solid #6db0bf;
  padding-left: 0.75rem;
}

.lab-content.breakout-style-command-pills .step-segment[data-step-kind]::before {
  color: #4a6477;
  content: attr(data-step-kind);
}

.lab-content.breakout-style-instruction-rails .step-segment {
  padding: 0.3rem 0 0.45rem 0.9rem;
  border-left: none;
  overflow: clip;
}

.lab-content.breakout-style-instruction-rails .step-segment::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  height: calc(100% - 1.05rem);
  width: 4px;
  border-radius: 999px;
  background: #6db0bf;
}

.lab-content.breakout-style-instruction-rails .step-segment[data-step-kind="instruction"]::after {
  background: #f0b45f;
}

.lab-content.breakout-style-instruction-rails .step-segment[data-step-kind="explanation"]::after {
  background: #8dc1e7;
}

.lab-content.breakout-style-instruction-rails .step-segment[data-step-kind]::before {
  color: #4a6477;
  content: attr(data-step-kind);
}

.lab-content.breakout-style-instruction-rails .lab-step-title {
  font-size: 1.25rem;
  line-height: 1.7rem;
}

.lab-content.breakout-style-command-pills p.explicit-instruction,
.lab-content.breakout-style-command-pills li.explicit-instruction {
  border-radius: 999px;
  border: 1px solid #f2d2a0;
  background: #fff8ec;
  padding: 0.22rem 0.68rem;
}

.lab-content.breakout-style-command-pills ol > li.explicit-instruction::marker,
.lab-content.breakout-style-command-pills ul > li.explicit-instruction::marker {
  color: #a66300;
  font-weight: 700;
}

.lab-content.breakout-style-command-pills .explicit-command-block {
  padding: 0.25rem 0;
  border: none;
  background: transparent;
}

.lab-content.breakout-style-command-pills .explicit-command {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: normal;
  background: transparent;
  padding: 0;
}

.lab-content.breakout-style-command-pills .explicit-command .cmd-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e5bf85;
  background: #fff1d8;
  padding: 0.2rem 0.58rem;
  line-height: 1.25;
  font-size: 0.86rem;
}

.lab-content ul.concept-pill-list {
  list-style: none;
  margin: 0.9rem 0 1.2rem;
  margin-left: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.lab-content ul.concept-pill-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.48rem 0.78rem;
  border: 1px solid #d5e2ee;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9fcff, #f4f9fe);
}

.lab-content .concept-pill-label {
  display: inline;
  color: #0f4f76;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .lab-content.objective-style-cards .objective-segment {
    padding: 0.9rem 1rem 1rem;
  }

  .lab-content.objective-style-rail .objective-segment {
    padding-left: 0.85rem;
  }

  .lab-content.step-style-pills .lab-step-title {
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
  }

  .lab-content.step-style-blocks .lab-step-title {
    padding: 0.62rem 0.75rem;
  }

  .lab-content.breakout-style-panel .step-segment {
    padding: 0.68rem 0.72rem 0.78rem;
  }

  .lab-content.breakout-style-workflow .step-segment,
  .lab-content.breakout-style-command-pills .step-segment,
  .lab-content.breakout-style-instruction-rails .step-segment {
    padding-left: 0.6rem;
  }

  .lab-content ul.lab-settings-list > li.lab-settings-item {
    grid-template-columns: 1fr;
    gap: 0.28rem;
    align-items: start;
    padding: 0.52rem 0.75rem;
  }

  .lab-content ul.lab-settings-list .lab-setting-value {
    justify-self: start;
  }

  .lab-content ul.concept-pill-list > li {
    border-radius: 16px;
  }
}
