/* Custom overrides for unsandbox.com */

/* Increase base font size across all elements */
body {
  font-size: 18px;
  background: var(--secondary-bg);
}

/* Override cs-dialog max-width for docs dialogs to allow proper two-column layout */
.cs-dialog:has(.docs-grid-layout) {
  max-width: none;
  min-width: 0;
}

/* Two-column grid layout for docs page */
.cs-dialog .content.docs-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

/* Prevent code blocks from expanding grid columns */
.docs-grid-layout pre,
.docs-grid-layout code,
.docs-grid-layout .code-block {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: normal;
  white-space: pre;
  box-sizing: border-box;
}

/* Home page: Input + Example buttons grid layout */
.home-input-grid {
  display: grid !important;
  grid-template-columns: 1fr auto auto auto !important;
  gap: 10px !important;
  align-items: center !important;
}

/* Responsive: stack vertically on mobile */
@media (max-width: 768px) {
  .cs-dialog .content.docs-grid-layout {
    grid-template-columns: 1fr !important;
  }

  .home-input-grid {
    grid-template-columns: 1fr !important;
  }

  .header-cta-grid {
    grid-template-columns: 1fr !important;
  }

  /* Make pre and code tags horizontally scrollable on mobile */
  pre {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: normal !important;
    white-space: pre !important;
    -webkit-overflow-scrolling: touch !important;
  }

  code {
    word-wrap: normal !important;
    white-space: pre !important;
  }

  /* Responsive grid overrides */
  .grid-2col,
  .grid-3col,
  .grid-2col-gap-40,
  .grid-4col,
  .grid-1fr-auto,
  .grid-1fr-auto-auto,
  .grid-1fr-auto-auto-auto,
  .grid-auto-1fr,
  .grid-auto-1fr-1fr,
  .payment-method-grid-desktop {
    grid-template-columns: 1fr !important;
  }

  .pricing-grid {
    grid-template-columns: 1fr !important;
  }

  /* Ensure all dialog content containers don't overflow on mobile */
  .cs-dialog .content {
    overflow-x: hidden !important;
  }

  .content-selectable {
    overflow-x: hidden !important;
  }

  /* Remove API manager divider on mobile */
  .api-manager-left {
    border-right: none !important;
    padding-right: 0 !important;
  }

  .api-manager-right {
    padding-left: 0 !important;
  }

  /* Allow footer text to wrap on mobile */
  .page-footer p {
    white-space: normal !important;
  }
}

/* Layout Containers */
.page-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.6;
}

.page-container-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.page-container-xl {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Dialog Position Override */
.dialog-static {
  position: static;
  margin-bottom: 20px;
  max-width: 100% !important;
}

.dialog-static-no-margin {
  position: static;
  min-width: 0;
}

/* Content Styles */
.content-selectable {
  user-select: text;
}

/* Fieldset Styles */
fieldset {
  border: none !important;
  padding: 0;
  margin: 0;
}

/* Input and Textarea Overrides */
.cs-input {
  width: 100%;
}

textarea.cs-input {
  font-family: monospace !important;
}

/* Code input styling - for textareas used for code */
textarea.cs-input.code-input {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  tab-size: 4;
}

/* Prompt input styling - for AI prompt textareas */
textarea.cs-input.prompt-input {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

/* Header Styles */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  margin-bottom: 10px;
}

.page-header p {
  margin-top: 10px;
}

/* Typography */
.heading-bold {
  font-weight: bold;
  margin-right: 5px;
}

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

.text-left {
  text-align: left;
}

.text-muted {
  color: #888;
}

.text-small {
  font-size: 14px;
}

.text-xs {
  font-size: 11px;
}

.text-large {
  font-size: 16px;
}

.text-xl {
  font-size: 18px;
}

.text-2xl {
  font-size: 24px;
}

.text-3xl {
  font-size: 32px;
}

.text-4xl {
  font-size: 36px;
}

/* Spacing */
.mb-3 {
  margin-bottom: 3px;
}

.mb-5 {
  margin-bottom: 5px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mt-3 {
  margin-top: 3px;
}

.mt-5 {
  margin-top: 5px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-15 {
  margin-top: 15px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-40 {
  margin-top: 40px;
}

.p-15 {
  padding: 15px;
}

.p-20 {
  padding: 20px;
}

/* Grid Layouts */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.grid-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.payment-method-grid-desktop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.grid-2col-gap-40 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 250px));
  gap: 20px;
  margin-bottom: 40px;
  max-width: 100%;
  justify-content: center;
}

.grid-auto-1fr {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.grid-auto-1fr-1fr {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.grid-1fr-auto {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
}

.grid-1fr-auto-auto {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 15px;
  align-items: center;
}

.grid-1fr-auto-auto-auto {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 15px;
  align-items: center;
}

/* List Styles */
.list-indented {
  margin-left: 20px;
  margin-bottom: 15px;
}

/* Link Styles */
.link-accent {
  color: var(--accent);
  text-decoration: none;
}

.link-accent-underline {
  color: var(--accent);
}

/* Button Styles */
.btn-block {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #fff;
}

.btn-inline {
  display: inline-block;
  text-decoration: none;
  color: #fff;
}

/* Fix anchor tags styled as buttons */
a.cs-btn {
  text-decoration: none;
  display: grid;
  align-items: center;
  justify-items: center;
}

/* Border Styles */
.border-top-accent {
  border-top: 1px solid var(--accent);
}

.border-divider {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--accent);
}

/* Code Styles */
.code-inline {
  background: var(--secondary-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

pre {
  background: var(--secondary-bg);
  padding: 15px;
  border: 1px solid var(--border-dark);
  overflow-x: auto;
  font-size: 13px;
  max-width: 100%;
  word-wrap: normal;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

code {
  word-wrap: normal;
  white-space: pre;
}

/* Ensure pre and code don't break layout - always use horizontal scrollbar */
pre, code {
  max-width: 100%;
  overflow-x: auto;
}

/* Table Styles */
.table-docs {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

.table-docs tr {
  border-bottom: 1px solid var(--border-dark);
}

.table-docs th,
.table-docs td {
  text-align: left;
  padding: 8px;
}

/* Flash Messages */
.flash-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: grid;
  gap: 15px;
  width: calc(100vw - 40px);
  max-width: 400px;
}

.flash-error {
  background: #2a2a2a;
  border: 2px solid #ff4444;
}

.flash-error .heading {
  background: #ff4444;
  color: #000;
  position: relative;
}

.flash-info {
  background: #2a2a2a;
  border: 2px solid var(--accent);
}

.flash-info .heading {
  background: var(--accent);
  color: #000;
  position: relative;
}

.flash-close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #000;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: grid;
  align-items: center;
  justify-items: center;
}

/* Footer */
.page-footer {
  max-width: 1200px;
  margin: 0px auto 20px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--accent);
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal-links {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  white-space: nowrap;
}

/* Pricing Page */
.pricing-card-border {
  border-color: var(--accent) var(--accent) var(--accent) var(--accent);
}

.pricing-card-heading {
  background-color: var(--accent);
  color: #000;
}

.pricing-card-heading-bold {
  color: #000;
  font-weight: bold;
}

.pricing-price {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background-color: var(--accent);
  color: #000;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
}

/* Checkout Page */
.billing-option {
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.2s;
  position: relative;
}

.billing-option-inactive {
  border: 1px solid var(--border-light);
  cursor: pointer;
}

.billing-option-active {
  border: 3px solid var(--accent) !important;
  background-color: rgba(255, 215, 0, 0.2) !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.billing-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
}

/* Home Page */
.header-cta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}

.home-output {
  background: var(--secondary-bg);
  padding: 10px;
  font-family: monospace;
  font-size: 13px;
  color: #4ade80;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-y: auto;
  min-height: 310px;
  max-height: 310px;
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
}

.home-output-artifact {
  background: var(--secondary-bg);
  padding: 0;
  min-height: 310px;
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  overflow: hidden;
}

.home-output-empty {
  background: var(--secondary-bg);
  padding: 40px;
  text-align: center;
  min-height: 310px;
  display: grid;
  align-items: center;
  justify-items: center;
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
}

/* WASM Canvas Container */
.canvas-container {
  background: var(--secondary-bg);
  padding: 10px;
  min-height: 310px;
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  position: relative;
}

.wasm-canvas {
  display: block;
  margin: 0 auto;
  background: #000;
  max-width: 100%;
  height: auto;
}

.fullscreen-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 10px;
  font-size: 12px;
  z-index: 10;
}

.new-window-btn {
  position: absolute;
  top: 15px;
  right: 120px;
  padding: 5px 10px;
  font-size: 12px;
  z-index: 10;
}

/* Artifact row - one row per artifact with Download, Load, Run buttons */
.artifact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* Execute button and cooldown grid */
.execute-button-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  justify-items: center;
  margin: 0 auto;
}

.btn-execute {
  font-size: 2em;
  padding: 15px 30px;
  border: 2px solid var(--accent);
  background-color: rgba(255, 215, 0, 0.1);
  color: #fff !important;
}

.btn-execute .emoji-small {
  font-size: 0.6em;
}

.btn-cancel {
  font-size: 2em;
  padding: 15px 30px;
  background: #aa2222;
  border-color: #ff4444;
}

.cooldown-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 100%;
  text-align: center;
  justify-items: center;
}

.cooldown-section .cs-progress-bar {
  position: relative;
  max-width: 400px;
}

.progress-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  z-index: 10;
  white-space: nowrap;
}

/* Pricing Page Styles */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.pricing-cards-grid > .dialog-static {
  margin-bottom: 0 !important;
  min-width: 0;
}

.tier-display {
  min-width: 160px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
  font-weight: bold;
}

.tier-info-display {
  text-align: left;
  font-size: 48px;
  font-weight: bold;
  color: var(--accent);
}

.custom-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  outline: none;
  border: 1px solid var(--border-dark);
  background: transparent;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #b8a000;
  cursor: pointer;
  border: 2px solid var(--accent);
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #b8a000;
  cursor: pointer;
  border: 2px solid var(--accent);
}

.custom-range::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(to right,
    var(--accent) 0%,
    var(--accent) var(--range-progress, 0%),
    var(--secondary-bg) var(--range-progress, 0%),
    var(--secondary-bg) 100%);
}

.custom-range::-moz-range-track {
  height: 8px;
  background: var(--secondary-bg);
}

.custom-range::-moz-range-progress {
  height: 8px;
  background: var(--accent);
}

.payment-method-option {
  cursor: pointer;
  padding: 15px;
  transition: all 0.2s ease;
  font-size: 36px;
}

.how-it-works-box {
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
}

.pricing-summary-section {
  padding-top: 20px;
}

.cta-button {
  background-color: var(--accent);
  color: #000;
  font-weight: bold;
  display: block;
  font-size: 27px;
  padding: 22px;
  cursor: pointer;
}

.duration-selector-btn {
  font-size: 36px;
}

.duration-selector-btn .text-xs {
  font-size: 18px;
}

.pricing-card-heading-bold .heading-bold {
  color: var(--accent);
}

/* Pricing for Agents Page Styles */
.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tier-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.quote-table {
  display: grid;
  gap: 1px;
  background: var(--border-dark);
  border: 1px solid var(--border-dark);
}

.quote-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1.5fr;
  gap: 1px;
  background: var(--bg);
}

.quote-row > div {
  padding: 12px;
  background: var(--secondary-bg);
  display: grid;
  align-items: center;
}

.quote-header {
  font-weight: bold;
  background: var(--bg);
}

.quote-header > div {
  background: var(--bg);
  border-bottom: 2px solid var(--accent);
}

.total-price {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--accent);
}

.discount-badge {
  background: var(--accent);
  color: #000;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 0.9em;
}

.btn-small {
  padding: 8px 12px !important;
  font-size: 0.9em;
}

.code-block {
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
  padding: 15px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9em;
}

/* Mobile responsive overrides for pricing pages */
@media (max-width: 768px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .format-grid,
  .tier-nav-grid {
    grid-template-columns: 1fr !important;
  }

  .quote-row {
    grid-template-columns: 1fr !important;
  }

  .quote-header {
    display: none;
  }

  .quote-row > div::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
  }

  .pricing-agents-format-grid {
    grid-template-columns: 1fr !important;
  }
  /* Grid 5-column (duration selector) - stack vertically on mobile */
  .grid-5col {
    grid-template-columns: 1fr !important;
  }

  /* Form grid (email/button section) - stack vertically on mobile */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Reduce large font sizes on mobile for better fit */
  .payment-method-option {
    font-size: 24px;
  }

  .tier-info-display {
    font-size: 32px;
  }

  .pricing-tier-display-large {
    font-size: 48px;
  }

  .duration-selector-btn {
    font-size: 24px;
  }

  .cta-button {
    font-size: 20px;
  }
}

/* Payment Quote Page - Compact Layout */
.payment-quote-compact-grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.qr-code-container {
  display: grid;
  justify-items: center;
}

.qr-code-image {
  max-width: 250px;
  width: 100%;
  height: auto;
  border: 4px solid var(--border-dark);
  background: #fff;
  padding: 8px;
}

.payment-amount-input-compact,
.payment-address-textarea {
  background: var(--secondary-bg) !important;
  border: 1px solid var(--border-dark) !important;
  color: var(--text-primary) !important;
  font-size: 16px !important;
}

.payment-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.payment-timer-compact {
  text-align: center;
}

.payment-details-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  padding: 15px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
  text-align: center;
}

.payment-refund-configured {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #00ff00;
  padding: 10px;
  text-align: center;
  color: #00ff00;
}

.payment-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.payment-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
}

.payment-status-pending {
  background: rgba(255, 215, 0, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.payment-status-partial {
  background: rgba(255, 165, 0, 0.2);
  color: #ffaa00;
  border: 1px solid #ffaa00;
}

.payment-status-confirming {
  background: rgba(0, 150, 255, 0.2);
  color: #00aaff;
  border: 1px solid #00aaff;
}

.payment-status-completed {
  background: rgba(0, 255, 0, 0.2);
  color: #00ff00;
  border: 1px solid #00ff00;
}

.payment-status-expired {
  background: rgba(255, 0, 0, 0.2);
  color: #ff4444;
  border: 1px solid #ff4444;
}

.payment-status-expired_refunding {
  background: rgba(255, 100, 0, 0.2);
  color: #ff6400;
  border: 1px solid #ff6400;
}

.payment-status-expired_refunded {
  background: rgba(128, 128, 128, 0.2);
  color: #888888;
  border: 1px solid #888888;
}

.payment-status-cancelled {
  background: rgba(128, 128, 128, 0.2);
  color: #888888;
  border: 1px solid #888888;
}

.btn-danger {
  background-color: #aa2222 !important;
  border-color: #ff4444 !important;
}

.btn-danger:hover {
  background-color: #cc2222 !important;
}

/* Mobile responsive for payment page */
@media (max-width: 768px) {
  .payment-quote-compact-grid,
  .payment-details-summary-row,
  .payment-buttons-row {
    grid-template-columns: 1fr !important;
  }

  .qr-code-image {
    max-width: 200px;
  }
}

/* Inline style replacements - moved from templates */

/* Language selector */
.language-select {
  font-size: 16px;
  font-weight: bold;
}

/* Align language selector (spoken languages) text to right */
select.cs-select.language-select {
  text-align: right;
  text-align-last: right;
}

select.cs-select.language-select option {
  text-align: right;
  direction: rtl;
}

/* Pricing tier configurator */
.pricing-tier-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 5px;
  align-items: center;
}

.pricing-tier-display-large {
  font-size: 64px;
  color: var(--accent);
  font-weight: bold;
}

/* Color and typography utilities */
.color-white {
  color: #fff;
}

.color-accent {
  color: var(--accent);
}

.color-muted {
  color: #888;
}

.font-size-13 {
  font-size: 13px;
}

.font-size-14 {
  font-size: 14px;
}

.font-size-16 {
  font-size: 16px;
}

.font-size-18 {
  font-size: 18px;
}

.font-size-48 {
  font-size: 48px;
}

.font-size-64 {
  font-size: 64px;
}

.font-weight-bold {
  font-weight: bold;
}

.font-style-italic {
  font-style: italic;
}

.font-monospace {
  font-family: monospace;
}

/* Display utilities */
.display-block {
  display: block;
}

/* Width utilities */
.width-100 {
  width: 100%;
}

.max-width-600 {
  max-width: 600px;
}

.max-width-1200 {
  max-width: 1200px;
}

/* Margin utilities */
.margin-0 {
  margin: 0;
}

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

.margin-h-10 {
  margin-left: 10px;
  margin-right: 10px;
}

/* Spacing utilities */
.gap-5 {
  gap: 5px;
}

.gap-10 {
  gap: 10px;
}

.gap-30 {
  gap: 30px;
}

/* Padding utilities */
.padding-5 {
  padding: 5px;
}

.padding-10 {
  padding: 10px;
}

.padding-0 {
  padding: 0;
}

/* Text utilities */
.text-nowrap {
  white-space: nowrap;
}

.text-break-all {
  word-break: break-all;
}

.text-opacity-90 {
  opacity: 0.9;
}

/* Cursor utilities */
.cursor-pointer {
  cursor: pointer;
}

/* Border utilities */
.border-2-accent {
  border: 2px solid var(--accent);
}

.border-1-444 {
  border: 1px solid #444;
}

/* Background utilities */
.bg-accent-10 {
  background: rgba(255, 215, 0, 0.1);
}

.bg-2a3f2f {
  background: #2a3f2f;
}

.bg-1a1a1a {
  background: #1a1a1a;
}

.bg-2a2a2a {
  background: #2a2a2a;
}

.bg-white {
  background: white;
}

/* Artifact display styles */
.artifact-container {
  text-align: center;
}

.artifact-image {
  max-width: 100%;
  max-height: 500px;
  margin-top: 10px;
  border: 1px solid #444;
}

.artifact-image-svg {
  max-width: 100%;
  max-height: 500px;
  margin-top: 10px;
  background: white;
  padding: 20px;
}

.artifact-image-display {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #444;
}

.artifact-video {
  max-width: 100%;
  max-height: 500px;
  margin-top: 0;
}

.artifact-audio {
  width: 100%;
  max-width: 500px;
  margin-top: 0;
}

.artifact-pre {
  background: #1a1a1a;
  padding: 15px;
  border-radius: 5px;
  overflow: auto;
  max-height: 500px;
}

.artifact-csv-container {
  overflow: auto;
  max-height: 500px;
  margin-top: 10px;
}

.artifact-csv-table {
  border-collapse: collapse;
  width: 100%;
  background: #1a1a1a;
}

.artifact-csv-th {
  border: 1px solid #444;
  padding: 8px;
  text-align: left;
  background: #2a2a2a;
}

.artifact-csv-td {
  border: 1px solid #444;
  padding: 8px;
}

.artifact-iframe {
  width: 100%;
  height: 500px;
  border: 1px solid #444;
  margin-top: 10px;
  background: white;
}

.artifact-pdf {
  width: 100%;
  height: 600px;
  margin-top: 10px;
}

/* Blog styles */
.blog-grid {
  display: grid;
  gap: 30px;
}

.blog-link {
  color: #fff;
  text-decoration: none;
}

.blog-date {
  color: #888;
  font-size: 0.9em;
}

.blog-description {
  color: #fff;
}

.blog-content {
  color: #fff;
}

/* Docs styles */
.cs-dialog .heading .heading-bold {
  color: var(--accent);
}

.docs-separator {
  margin: 0 10px;
}

.docs-dialog-green {
  background: #2a3f2f;
}

.docs-container {
  padding: 10px;
}

.docs-callout {
  text-align: center;
  margin: 40px 0;
}

.docs-btn-home {
  margin-right: 10px;
}

.docs-btn-pricing {
  background-color: var(--accent);
  color: #000;
}

.docs-link-accent {
  color: var(--accent);
}

.docs-section-divider {
  border: 2px solid var(--accent);
  background: rgba(255, 215, 0, 0.1);
}

/* Payment styles */
.payment-warning-box {
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid var(--accent);
  padding: 15px;
  margin-bottom: 20px;
}

.payment-warning-title {
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 10px;
}

.payment-warning-text {
  margin-bottom: 10px;
}

.payment-warning-tip {
  margin-bottom: 0;
}

.payment-grid-2col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.payment-copy-hint {
  color: #fff;
  font-size: 14px;
}

.payment-secret-hidden {
  color: #fff;
}

.payment-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Pricing for agents */
.pricing-agents-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}

.pricing-agents-header {
  color: #fff;
}

.pricing-agents-list-white {
  color: #fff;
}

.pricing-agents-example-title {
  color: #fff;
}

/* Root layout footer */
.root-footer {
  font-size: 16px;
  color: white;
}

.root-footer-italic {
  font-style: italic;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  color: white;
  white-space: nowrap;
}

/* Payment show page - clickable address */
.payment-address-clickable {
  cursor: pointer;
  text-align: center;
}

.payment-address-mono {
  cursor: pointer;
  word-break: break-all;
  font-family: monospace;
  font-size: 13px;
}

.payment-details-center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* API Key active state */
.api-key-active {
  border-color: var(--accent) !important;
  border-width: 2px !important;
}

/* Inline styles moved to CSS from templates */

/* Home page */
.language-select-bg {
  background-color: #4a5942;
}

.heading-gold {
  color: var(--accent);
}

.textarea-no-resize {
  resize: none;
  overflow-y: auto;
}

/* Root layout - API Key Manager */
.btn-link-accent {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* Remove gold line above vault manager */
.page-footer:has(.api-manager-dialog) {
  border-top: none !important;
  margin-top: 0;
  padding-top: 0;
}

.api-manager-dialog {
  max-width: 800px;
  margin: 20px auto;
}

/* Vault unlock animation */
@keyframes vaultUnlock {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.vault-unlocked-content {
  animation: vaultUnlock 0.8s ease-out;
}

/* Vault lock animation */
@keyframes vaultLock {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.vault-locked-content {
  animation: vaultLock 0.8s ease-out;
}

.api-manager-grid {
  gap: 30px;
}

.api-manager-left {
  border-right: 1px solid var(--border-dark);
  padding-right: 30px;
}

.api-manager-right {
  padding-left: 30px;
}

.api-manager-heading {
  color: var(--accent);
  margin-bottom: 15px;
}

.btn-accent-black {
  background-color: var(--accent);
  color: #000;
}

.btn-accent-black-full {
  background-color: var(--accent);
  color: #000;
  width: 100%;
}

.api-keys-grid {
  display: grid;
  gap: 8px;
}

.api-key-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
  padding: 10px;
}

.api-key-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.api-key-radio {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.api-key-active-indicator {
  margin-left: 8px;
}

.api-key-value {
  /* Match cs-input styling for consistent look */
  background-color: var(--secondary-bg);
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  color: var(--secondary-text);
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-size: 14px;
  line-height: 17px;
  padding: 3px 6px 2px;
  display: inline-block;
  word-break: break-all;
  user-select: all; /* Allow easy selection for copying */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* API Key Show page */
.api-key-copy-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.api-key-mono-input {
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4;
}

.api-key-secret-input {
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-all;
}

.btn-nowrap {
  white-space: nowrap;
}

.api-key-saved-notice {
  background: rgba(76, 222, 128, 0.2);
  border: 1px solid #4ade80;
  padding: 10px;
  color: #4ade80;
}

.api-key-saved-title {
  margin-bottom: 5px;
}

.api-key-saved-text {
  margin-bottom: 0;
  font-size: 14px;
}

.api-key-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-margin-right-10 {
  margin-right: 10px;
}

/* Docs page */
.docs-no-key-error {
  color: #ff4444;
}

.docs-content-padding {
  padding: 10px;
}

.docs-callout-center {
  margin: 40px 0;
}

/* Pricing for Agents */
.pricing-agents-format-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

/* Blog */
.blog-grid-gap {
  display: grid;
  gap: 30px;
}

/* Docs Language */
.docs-lang-dialog-green {
  background: #2a3f2f;
}

.docs-lang-opacity-90 {
  opacity: 0.9;
}

/* Payment Show */
.payment-heading-large {
  font-size: 48px;
  color: var(--accent);
  font-weight: bold;
  margin: 0;
}

.payment-subtitle {
  color: #fff;
  font-size: 18px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer-copyright {
  font-size: 16px;
  color: white;
}

.footer-tagline {
  font-style: italic;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  color: white;
  white-space: nowrap;
}

/* Execution time display */
.execution-time-center {
  color: var(--accent);
  font-size: 18px;
}

.execution-time-below {
  color: var(--accent);
  font-size: 14px;
  margin-top: 10px;
}

/* Vault lock/unlock indicator */
.vault-lock-indicator {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%) scaleX(-1);
  font-size: 24px;
  line-height: 1;
}

/* Make heading position relative to contain the absolute lock */
.api-manager-dialog .heading {
  position: relative;
}

/* Single-row API key card layout - all items on one row */
.api-key-card-single-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  background: var(--secondary-bg);
  border: 1px solid var(--border-dark);
  padding: 10px;
}

/* Home title link - accent gold color */
.home-title-link a {
  color: var(--accent);
  text-decoration: none;
}

/* Payment page - underpayment warning */
.payment-underpayment-heading {
  color: #ff6b6b;
}

.payment-underpayment-subtitle {
  font-size: 1.2em;
}

.payment-underpayment-expiry {
  color: #ffa500;
}

/* ============================================================
   STYLES CONSOLIDATED FROM TEMPLATES (moved from inline <style> tags)
   ============================================================ */

/* Pricing Page - Additional Styles */
.payment-method-grid {
  font-size: 36px;
}

/* Font size override removed - use default cs-input size from cs16.css */

.discount-label {
  color: var(--accent);
}

.billing-option-active .discount-label {
  color: inherit;
}

.coin-label {
  color: var(--accent);
  display: block;
}

.billing-option-active .coin-label {
  color: inherit;
}

.payment-method-option .text-xs {
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.button-wrapper {
  display: grid;
  align-items: center;
  justify-items: center;
}

.required-asterisk {
  color: var(--accent);
}

/* Home Page - Title and Fullscreen Styles */
.home-title {
  color: var(--accent);
  font-size: 3em;
}

.home-title a {
  color: inherit;
  text-decoration: none;
}

.home-title a:hover {
  text-decoration: underline;
}

/* Fullscreen canvas styling */
*:fullscreen canvas,
*:-webkit-full-screen canvas,
*:-moz-full-screen canvas,
*:-ms-fullscreen canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
}

*:fullscreen,
*:-webkit-full-screen,
*:-moz-full-screen,
*:-ms-fullscreen {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* Admin Dashboard Styles */
.admin-header {
  margin-bottom: 30px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

.key-link {
  color: #00aaff;
  text-decoration: underline;
  cursor: pointer;
}

.key-link:hover {
  color: #00ccff;
}

.key-item {
  background-color: #2a2a2a;
  border: 1px solid #444;
  padding: 10px;
  margin-bottom: 10px;
}

.panel {
  background-color: var(--bg);
  border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
}

.panel-header {
  background: linear-gradient(180deg, #4a5f3a 0%, #3a4a2a 100%);
  padding: 10px 15px;
  font-weight: bold;
  border-bottom: 1px solid var(--border-dark);
}

.panel-content {
  padding: 15px;
  max-height: 600px;
  overflow-y: auto;
}

.quote-item,
.sale-item {
  background-color: #2a2a2a;
  border: 1px solid #444;
  padding: 10px;
  margin-bottom: 10px;
}

.item-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #444;
}

.item-id {
  font-family: monospace;
  font-size: 11px;
  color: #888;
}

.item-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
}

.detail-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.detail-label {
  color: #aaa;
  font-size: 18px;
}

.detail-value {
  color: #fff;
  font-family: monospace;
  font-size: 18px;
}

.status-pending {
  color: #ffaa00;
}

.status-received {
  color: #00aaff;
}

.status-confirmed {
  color: #00ff00;
}

.status-completed {
  color: #00ff00;
  font-weight: bold;
}

.status-expired {
  color: #ff0000;
}

.status-refunded {
  color: #ff00ff;
}

.status-unknown {
  color: #888;
}

.no-data {
  color: #888;
  text-align: center;
  padding: 40px;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #4a5f3a;
  border: 1px solid #2a2a2a;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a6f4a;
}

/* Admin - Inline style for grid with auto columns */
.admin-header-grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 20px;
}

.admin-header-title {
  color: var(--accent);
  margin: 0;
}

.admin-header-subtitle {
  color: #888;
  margin: 5px 0 0 0;
}

.admin-btn {
  background: linear-gradient(180deg, #4a5f3a 0%, #3a4a2a 100%);
  color: var(--text);
  border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

.panel-header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

/* Admin Key Stats Styles */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--bg);
  border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 20px;
}

.stat-label {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent);
}

.stat-value-normal {
  font-size: 18px;
  color: #fff;
  word-break: break-all;
}

.detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

/* Admin Key Details - Two-column layout on desktop */
.admin-key-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 1024px) {
  .admin-key-details-grid {
    grid-template-columns: 1fr !important;
  }
}

.status-active {
  color: #00ff00;
  font-weight: bold;
}

.status-suspended {
  color: #ff0000;
  font-weight: bold;
}

.progress-bar-container {
  background: #2a2a2a;
  height: 30px;
  border: 1px solid #444;
  position: relative;
  margin-top: 10px;
}

.progress-bar-fill {
  background: var(--accent);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-weight: bold;
  font-size: 14px;
}

/* Admin Revenue Styles */
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.revenue-card {
  background-color: var(--bg);
  border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 20px;
}

.revenue-label {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 10px;
}

.revenue-value {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent);
}

.custom-range-form {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 15px;
  align-items: end;
}

.form-group {
  display: grid;
  gap: 5px;
}

.form-label {
  font-size: 14px;
  color: #aaa;
}

.form-input {
  background: var(--secondary-bg);
  border: 1px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  color: var(--text);
  padding: 8px 12px;
  font-size: 16px;
}

.form-button {
  background: linear-gradient(180deg, #4a5f3a 0%, #3a4a2a 100%);
  color: var(--text);
  border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 8px 20px;
  font-size: 16px;
  cursor: pointer;
}

.form-button:hover {
  background: linear-gradient(180deg, #5a6f4a 0%, #4a5a3a 100%);
}

/* Admin Revenue - Custom result box */
.revenue-custom-result {
  margin-top: 20px;
  padding: 20px;
  background: #2a2a2a;
  border: 1px solid #444;
}

.revenue-custom-label {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 5px;
}

.revenue-custom-value {
  color: var(--accent);
  font-size: 28px;
  font-weight: bold;
}

.revenue-custom-hint {
  color: #888;
  margin-top: 15px;
  font-size: 13px;
}

/* Color utilities for dynamic content */
.color-red {
  color: #ff4444;
}

.color-green {
  color: #00ff00;
}

/* Mobile responsive overrides for home page */
@media (max-width: 768px) {
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .page-container-xl {
    display: grid !important;
  }

  .header-cta-grid {
    grid-template-columns: 1fr !important;
    order: 3 !important;
    margin-top: 30px !important;
    margin-bottom: 0 !important;
  }

  .dialog-static {
    order: 2 !important;
  }

  .execute-button-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .home-input-grid {
    grid-template-columns: 1fr !important;
  }

  .home-input-grid textarea {
    grid-column: 1 !important;
  }
}

/* Admin Pages - Base Styles */
body.admin-page {
  background: var(--secondary-bg);
  color: var(--text);
  font-family: ArialPixel, system-ui, sans-serif;
  margin: 0;
  padding: 20px;
}

.status-expired {
  color: #ff6600;
  font-weight: bold;
}

/* Admin Dashboard mobile grid */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Docs Page - Copy Button Styles */
.code-block-container {
  position: relative;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.code-block-container:hover .copy-button {
  opacity: 1;
}

.copy-button.copied {
  background: #4ade80 !important;
  opacity: 1 !important;
}

/* Docs grid responsive */
@media (max-width: 768px) {
  .docs-grid-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Utility classes for small text with word breaking */
.font-size-10-break-all {
  font-size: 10px;
  word-break: break-all;
}

.font-size-9-break-all {
  font-size: 9px;
  word-break: break-all;
}
