/* SimpleIDGen — dark design system matching the React app */

/* ── Override Bootstrap variables to match app palette ─────────────────────── */

:root,
[data-bs-theme="dark"] {
  /* Backgrounds */
  --bs-body-bg:               #09090b;
  --bs-body-bg-rgb:           9, 9, 11;
  --bs-secondary-bg:          #111113;
  --bs-tertiary-bg:           #1a1a1f;

  /* Text */
  --bs-body-color:            #fafafa;
  --bs-body-color-rgb:        250, 250, 250;
  --bs-secondary-color:       #71717a;
  --bs-tertiary-color:        #52525b;

  /* Borders */
  --bs-border-color:          #27272a;
  --bs-border-color-translucent: rgba(39, 39, 42, 0.6);

  /* Primary = orange accent */
  --bs-primary:               #ff8000;
  --bs-primary-rgb:           255, 128, 0;
  --bs-link-color:            #ff8000;
  --bs-link-color-rgb:        255, 128, 0;
  --bs-link-hover-color:      #ffaa40;
  --bs-link-hover-color-rgb:  255, 170, 64;

  /* Semantic */
  --bs-success:               #34d399;
  --bs-success-rgb:           52, 211, 153;
  --bs-info:                  #60a5fa;
  --bs-info-rgb:              96, 165, 250;
  --bs-danger:                #f87171;
  --bs-danger-rgb:            248, 113, 113;
  --bs-warning:               #ff8000;
  --bs-warning-rgb:           255, 128, 0;

  /* Card */
  --bs-card-bg:               #111113;
  --bs-card-border-color:     #27272a;
  --bs-card-cap-bg:           #1a1a1f;
  --bs-card-color:            #fafafa;

  /* List group */
  --bs-list-group-bg:                 #111113;
  --bs-list-group-border-color:       #27272a;
  --bs-list-group-color:              #fafafa;
  --bs-list-group-action-color:       #fafafa;
  --bs-list-group-action-hover-color: #fafafa;
  --bs-list-group-action-hover-bg:    rgba(255, 128, 0, 0.07);
  --bs-list-group-action-active-bg:   rgba(255, 128, 0, 0.12);
  --bs-list-group-active-bg:          #ff8000;
  --bs-list-group-active-border-color:#ff8000;
  --bs-list-group-active-color:       #fff;

  /* Navbar */
  --bs-navbar-color:          #71717a;
  --bs-navbar-hover-color:    #fafafa;
  --bs-navbar-active-color:   #ff8000;
  --bs-navbar-toggler-border-color: #27272a;

  /* Table */
  --bs-table-color:           #fafafa;
  --bs-table-bg:              transparent;
  --bs-table-striped-bg:      rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg:        rgba(255, 128, 0, 0.04);
  --bs-table-border-color:    #27272a;

  /* Form / Input */
  --bs-form-control-bg:       #1a1a1f;
  --bs-input-bg:              #1a1a1f;
  --bs-input-border-color:    #27272a;
  --bs-input-color:           #fafafa;
  --bs-input-placeholder-color: #52525b;
  --bs-input-focus-border-color: rgba(255, 128, 0, 0.5);
  --bs-input-focus-box-shadow:   0 0 0 0.2rem rgba(255, 128, 0, 0.18);

  /* Code */
  --bs-code-color:            #fb923c;

  /* Breadcrumb */
  --bs-breadcrumb-divider-color:     #52525b;
  --bs-breadcrumb-item-active-color: #71717a;

  /* Subtle badge variants */
  --bs-primary-bg-subtle:     rgba(255, 128, 0, 0.12);
  --bs-primary-text-emphasis: #ff8000;
  --bs-primary-border-subtle: rgba(255, 128, 0, 0.28);

  --bs-warning-bg-subtle:     rgba(255, 128, 0, 0.12);
  --bs-warning-text-emphasis: #ffa040;
  --bs-warning-border-subtle: rgba(255, 128, 0, 0.28);

  --bs-secondary-bg-subtle:   rgba(113, 113, 122, 0.1);
  --bs-secondary-text-emphasis: #a1a1aa;
  --bs-secondary-border-subtle: rgba(113, 113, 122, 0.22);

  --bs-danger-bg-subtle:      rgba(248, 113, 113, 0.1);
  --bs-danger-text-emphasis:  #f87171;
  --bs-danger-border-subtle:  rgba(248, 113, 113, 0.25);

  --bs-success-bg-subtle:     rgba(52, 211, 153, 0.1);
  --bs-success-text-emphasis: #34d399;
  --bs-success-border-subtle: rgba(52, 211, 153, 0.25);

  --bs-info-bg-subtle:        rgba(96, 165, 250, 0.1);
  --bs-info-text-emphasis:    #60a5fa;
  --bs-info-border-subtle:    rgba(96, 165, 250, 0.25);

  /* Focus ring */
  --bs-focus-ring-color: rgba(255, 128, 0, 0.25);
}

/* ── Base ───────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #09090b;
  color: #fafafa;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #111113; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 128, 0, 0.4); }

/* ── Spacing helpers ────────────────────────────────────────────────────────── */

.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-6 { margin-bottom: 5rem; }

/* ── Navbar (frosted glass matching app header) ─────────────────────────────── */

.navbar {
  background: rgba(9, 9, 11, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #27272a !important;
}

.navbar-brand {
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fafafa !important;
}

.navbar-brand:hover { color: #fafafa !important; }
.navbar-brand .accent { color: #ff8000; }

.nav-link {
  color: #71717a !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem !important;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: #fafafa !important;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ff8000 !important;
  background: rgba(255, 128, 0, 0.1);
}

.navbar-toggler {
  border-color: #27272a !important;
  color: #71717a !important;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    border-top: 1px solid #27272a;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn-primary {
  background-color: #ff8000;
  border-color: #ff8000;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 128, 0, 0.25);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #e67300;
  border-color: #e67300;
  color: #fff;
  box-shadow: 0 4px 18px rgba(255, 128, 0, 0.35);
}
.btn-primary:disabled {
  background-color: #ff8000;
  border-color: #ff8000;
  opacity: 0.55;
}

.btn-outline-secondary {
  border-color: #27272a;
  color: #71717a;
  background: transparent;
}
.btn-outline-secondary:hover {
  border-color: rgba(255, 128, 0, 0.4);
  color: #ff8000;
  background: rgba(255, 128, 0, 0.06);
}

.btn-outline-danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
  background: transparent;
}
.btn-outline-danger:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: #f87171;
  color: #f87171;
}

/* ── Hero section ───────────────────────────────────────────────────────────── */

.hero-section {
  background: radial-gradient(ellipse 80% 60% at 50% -10%,
    rgba(255, 128, 0, 0.1) 0%, transparent 70%),
    #09090b;
  border-bottom: 1px solid #27272a;
  margin-left:  calc(-0.5 * (100vw - 100%));
  margin-right: calc(-0.5 * (100vw - 100%));
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero-eyebrow {
  display: inline-block;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8000;
  border: 1px solid rgba(255, 128, 0, 0.25);
  background: rgba(255, 128, 0, 0.07);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.hero-section h1 { letter-spacing: -0.025em; line-height: 1.08; }

/* ── Feature tiles ──────────────────────────────────────────────────────────── */

.feature-tile {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-tile:hover {
  border-color: rgba(255, 128, 0, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.feature-icon { font-size: 1.75rem; line-height: 1; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */

.card {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 12px;
}

.card-header {
  background: #1a1a1f;
  border-bottom: 1px solid #27272a;
  color: #fafafa;
  font-size: 0.875rem;
}

.card-hover {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: #fafafa;
}

.card-hover:hover {
  border-color: rgba(255, 128, 0, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  color: #fafafa;
  text-decoration: none;
}

.card-hover .card-title { color: #fafafa; transition: color 0.15s ease; }
.card-hover:hover .card-title { color: #ff8000; }

/* ── Pricing ────────────────────────────────────────────────────────────────── */

.pricing-card {
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 12px;
  transition: box-shadow 0.15s ease;
}

.pricing-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }

.pricing-card-featured {
  border-color: rgba(255, 128, 0, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.12), 0 8px 32px rgba(255, 128, 0, 0.06);
}

.pricing-card-featured:hover {
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.2), 0 12px 40px rgba(255, 128, 0, 0.1);
}

.pricing-price { line-height: 1; }

.pricing-popular-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: #ff8000 !important;
  color: #fff !important;
}

.pricing-features { font-size: 0.875rem; }

.pricing-features li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #27272a;
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-check { color: #34d399; font-weight: 700; margin-right: 0.5rem; }

.pricing-coming-soon {
  display: block;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2), 0 6px 20px rgba(91, 33, 182, 0.3);
}

/* ── List group ─────────────────────────────────────────────────────────────── */

.list-group-item {
  background: #111113;
  border-color: #27272a;
  color: #fafafa;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: rgba(255, 128, 0, 0.07);
  color: #fafafa;
  border-color: #27272a;
}

.list-group-item-action:hover strong { color: #ff8000; }

/* ── Table ──────────────────────────────────────────────────────────────────── */

.table { color: #fafafa; border-color: #27272a; }

.table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: #27272a;
  color: #fafafa;
}

.table-light thead th {
  background: #1a1a1f !important;
  color: #71717a;
  border-bottom-color: #27272a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-hover > tbody > tr:hover > * {
  background-color: rgba(255, 128, 0, 0.04);
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.badge.bg-primary   { background: #ff8000 !important; color: #fff; }
.badge.bg-success   { background: rgba(52, 211, 153, 0.15) !important; color: #34d399; border: 1px solid rgba(52, 211, 153, 0.25); }
.badge.bg-info      { background: rgba(96, 165, 250, 0.15) !important; color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.25); }
.badge.bg-danger    { background: rgba(248, 113, 113, 0.15) !important; color: #f87171; border: 1px solid rgba(248, 113, 113, 0.25); }
.badge.bg-secondary { background: rgba(113, 113, 122, 0.15) !important; color: #a1a1aa; border: 1px solid rgba(113, 113, 122, 0.2); }
.badge.bg-warning   { background: rgba(255, 128, 0, 0.15) !important; color: #ff8000; border: 1px solid rgba(255, 128, 0, 0.25); }

/* ── Form controls ──────────────────────────────────────────────────────────── */

.form-control,
.form-select {
  background-color: #1a1a1f;
  border-color: #27272a;
  color: #fafafa;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  background-color: #1a1a1f;
  border-color: rgba(255, 128, 0, 0.5);
  color: #fafafa;
  box-shadow: 0 0 0 0.2rem rgba(255, 128, 0, 0.18);
}

.form-control::placeholder { color: #52525b; }

.form-label { color: #a1a1aa; font-size: 0.875rem; }
.form-text  { color: #71717a; }

/* ── Code ───────────────────────────────────────────────────────────────────── */

code { color: #fb923c; }
pre code { color: inherit; }

.code-block {
  background: #0d0d10;
  color: #cdd6f4;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.83rem;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
}

.code-block code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ── API tabs ───────────────────────────────────────────────────────────────── */

.nav-tabs { border-bottom: 1px solid #27272a; }

.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  color: #71717a !important;
  background: transparent;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem !important;
}

.nav-tabs .nav-link:hover {
  color: #fafafa !important;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tabs .nav-link.active {
  color: #ff8000 !important;
  background: #111113;
  border-color: #27272a #27272a #111113;
}

.tab-content {
  border: 1px solid #27272a;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #0d0d10;
}

.tab-content.bg-dark,
.tab-content pre.mb-0 {
  background: transparent !important;
  color: #cdd6f4;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
}

.tab-content .tab-pane { background: transparent; }

/* ── Copy button ────────────────────────────────────────────────────────────── */

.position-relative .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1;
  border-color: #27272a;
  color: #71717a;
  background: #1a1a1f;
}

.position-relative:hover .copy-btn { opacity: 1; }

.copy-btn:hover {
  border-color: rgba(255, 128, 0, 0.4) !important;
  color: #ff8000 !important;
  background: #1a1a1f !important;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────────── */

.breadcrumb { font-size: 0.8rem; }
.breadcrumb-item a { color: #71717a; text-decoration: none; }
.breadcrumb-item a:hover { color: #ff8000; }
.breadcrumb-item.active { color: #52525b; }
.breadcrumb-item + .breadcrumb-item::before { color: #52525b; }

/* ── Typography ─────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 { color: #fafafa; }
.text-muted     { color: #71717a !important; }
.text-secondary { color: #71717a !important; }
.lead           { color: #a1a1aa; }
p               { color: #a1a1aa; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */

.alert-danger {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
  color: #f87171;
}

.alert-success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #34d399;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid #27272a;
  background: #09090b;
}

footer a {
  color: #71717a;
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover { color: #fafafa; }

/* ── Try-it result pane ─────────────────────────────────────────────────────── */

#try-result-identity,
[id^="try-result-"] { max-height: 400px; overflow-y: auto; }

/* ── Param table ────────────────────────────────────────────────────────────── */

.table td, .table th { vertical-align: middle; }

/* ── Misc ───────────────────────────────────────────────────────────────────── */

hr { border-color: #27272a; opacity: 1; }
textarea.font-monospace { font-size: 0.82rem; }

.badge.bg-primary-subtle {
  background: rgba(255, 128, 0, 0.12) !important;
  color: #ff8000 !important;
  border: 1px solid rgba(255, 128, 0, 0.28);
  font-weight: 500;
}
