/* InternetRemovals design tokens — distilled from stylesheet_example.css (no Tailwind) */
:root {
  --ir-bg: hsl(220, 20%, 4%);
  --ir-surface: hsl(220, 15%, 7%);
  --ir-surface-2: hsl(220, 12%, 10%);
  --ir-border: hsl(220, 10%, 16%);
  --ir-text: hsl(0, 0%, 95%);
  --ir-muted: hsl(0, 0%, 68%);
  --ir-gold: hsl(45, 100%, 58%);
  --ir-gold-bright: hsl(45, 100%, 68%);
  --ir-gold-dim: hsl(45, 80%, 42%);
  --ir-shadow-gold: 0 0 24px hsl(45 100% 50% / 0.15);
}

body.ir-app {
  background-color: var(--ir-bg);
  color: var(--ir-text);
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* URL submit pipeline: lightweight busy indicator (not a second Bootstrap modal) */
.ir-pipeline-busy {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid hsl(45 100% 55% / 0.35);
  background: hsl(220 18% 8% / 0.95);
  color: var(--ir-text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  font-weight: 500;
}

html[data-ir-theme="light"] .ir-pipeline-busy {
  background: hsl(0 0% 100% / 0.97);
  border-color: hsl(43 80% 45% / 0.4);
  color: var(--ir-text);
}

.ir-navbar {
  background: linear-gradient(135deg, hsl(220, 22%, 3%) 0%, hsl(220, 18%, 9%) 100%) !important;
  border-bottom: 1px solid hsl(45 100% 55% / 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  padding: 0.85rem 0;
}

.ir-navbar .navbar-brand span,
.ir-brand-text {
  color: var(--ir-gold) !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px hsl(45 100% 50% / 0.25);
}

.ir-nav-link {
  color: var(--ir-muted) !important;
  font-weight: 500;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.ir-nav-link:hover {
  color: var(--ir-gold) !important;
  background: hsl(45 100% 50% / 0.08);
}

.ir-btn-outline {
  border: 1px solid hsl(45 100% 55% / 0.45) !important;
  color: var(--ir-gold) !important;
  background: transparent;
}

.ir-btn-outline:hover {
  background: hsl(45 100% 50% / 0.12) !important;
  color: var(--ir-gold-bright) !important;
  box-shadow: var(--ir-shadow-gold);
}

.ir-card {
  background: hsl(220 15% 8% / 0.92) !important;
  border: 1px solid hsl(45 100% 55% / 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ir-card:hover {
  border-color: hsl(45 100% 55% / 0.35) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45), var(--ir-shadow-gold);
}

.ir-card .card-header {
  background: hsl(220 18% 6%) !important;
  border-bottom: 1px solid hsl(45 100% 55% / 0.12) !important;
  color: var(--ir-text);
  border-radius: 14px 14px 0 0 !important;
}

.ir-card .form-label {
  color: var(--ir-muted);
}

.ir-card .form-control,
.ir-card .form-select {
  background: var(--ir-surface-2);
  border: 1px solid var(--ir-border);
  color: var(--ir-text);
}

.ir-card .form-control:focus,
.ir-card .form-select:focus {
  border-color: var(--ir-gold-dim);
  box-shadow: 0 0 0 0.2rem hsl(45 100% 50% / 0.2);
  background: hsl(220 12% 12%);
  color: var(--ir-text);
}

.ir-card .form-text {
  color: var(--ir-muted);
}

.ir-btn-primary {
  background: linear-gradient(135deg, var(--ir-gold-dim), var(--ir-gold)) !important;
  border: none !important;
  color: hsl(220 20% 8%) !important;
  font-weight: 600;
  box-shadow: 0 4px 16px hsl(45 100% 45% / 0.35);
}

.ir-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px hsl(45 100% 50% / 0.45);
}

.ir-alert-dark {
  background: hsl(220 15% 12%);
  border: 1px solid hsl(45 100% 50% / 0.2);
  color: var(--ir-muted);
}

.ir-alert-dark strong {
  color: var(--ir-gold);
}

.ir-modal .modal-content {
  background: var(--ir-surface);
  border: 1px solid hsl(45 100% 55% / 0.2);
  color: var(--ir-text);
}

.ir-modal .modal-header {
  background: hsl(220 18% 6%) !important;
  border-bottom: 1px solid hsl(45 100% 55% / 0.15) !important;
}

.ir-modal .btn-close {
  filter: invert(1);
}

/* Login page */
body.ir-login-page {
  min-height: 100vh;
  margin: 0;
  background: hsl(220, 20%, 2%);
  color: var(--ir-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ir-login-page .cyber-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(hsl(45 100% 50% / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, hsl(45 100% 50% / 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: ir-grid-move 22s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes ir-grid-move {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

.ir-login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
}

.ir-login-card {
  background: hsl(220 15% 6% / 0.95);
  border: 1px solid hsl(45 100% 55% / 0.25);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 40px hsl(45 100% 50% / 0.08);
  backdrop-filter: blur(12px);
}

.ir-login-card h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ir-gold);
  letter-spacing: 0.04em;
}

.ir-login-card .form-control {
  background: hsl(220 12% 10%);
  border: 1px solid var(--ir-border);
  color: var(--ir-text);
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.ir-login-card .form-control:focus {
  border-color: var(--ir-gold-dim);
  box-shadow: 0 0 0 0.2rem hsl(45 100% 50% / 0.18);
}

.ir-login-error {
  background: hsl(0 70% 20% / 0.5);
  border: 1px solid hsl(0 70% 45% / 0.5);
  color: hsl(0 0% 92%);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

.ir-badge-passes {
  background: hsl(45 60% 25%);
  color: var(--ir-gold-bright);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* ---------- Dark theme readability (override style.css navy headings on dark UI) ---------- */
html:not([data-ir-theme="light"]) body.ir-app h1,
html:not([data-ir-theme="light"]) body.ir-app h2,
html:not([data-ir-theme="light"]) body.ir-app h3,
html:not([data-ir-theme="light"]) body.ir-app h4,
html:not([data-ir-theme="light"]) body.ir-app h5,
html:not([data-ir-theme="light"]) body.ir-app h6 {
  color: var(--ir-gold) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .form-check-label,
html:not([data-ir-theme="light"]) body.ir-app .form-check-label strong {
  color: var(--ir-text) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .form-control::placeholder,
html:not([data-ir-theme="light"]) body.ir-app textarea.form-control::placeholder {
  color: hsl(220, 8%, 58%);
  opacity: 1;
}

/* Bootstrap modals default to a light header; force IR surfaces so title isn’t light-on-light */
html:not([data-ir-theme="light"]) body.ir-app .modal-content {
  background: var(--ir-surface) !important;
  color: var(--ir-text) !important;
  border: 1px solid hsl(45 100% 55% / 0.22) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal-header {
  background: hsl(220 18% 6%) !important;
  color: var(--ir-text) !important;
  border-bottom: 1px solid hsl(45 100% 55% / 0.15) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal-body {
  background: var(--ir-surface);
  color: var(--ir-text);
}
html:not([data-ir-theme="light"]) body.ir-app .modal-footer {
  background: hsl(220 18% 8%) !important;
  border-top: 1px solid var(--ir-border) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal-title {
  color: var(--ir-gold) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(1.15);
  opacity: 0.85;
}
html:not([data-ir-theme="light"]) body.ir-app .modal .btn-close:hover {
  opacity: 1;
}
html:not([data-ir-theme="light"]) body.ir-app .modal .form-label {
  color: var(--ir-muted) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal .form-control,
html:not([data-ir-theme="light"]) body.ir-app .modal .form-select,
html:not([data-ir-theme="light"]) body.ir-app .modal textarea {
  background: var(--ir-surface-2) !important;
  border-color: var(--ir-border) !important;
  color: var(--ir-text) !important;
}
html:not([data-ir-theme="light"]) body.ir-app .modal .form-control:focus,
html:not([data-ir-theme="light"]) body.ir-app .modal textarea:focus {
  border-color: var(--ir-gold-dim) !important;
  box-shadow: 0 0 0 0.2rem hsl(45 100% 50% / 0.2);
}

/*
 * URL result rows (style.css): pastel backgrounds stay light while IR dark theme sets
 * modal/card body text to light --ir-text -> unreadable. Use dark-tinted surfaces here.
 */
html:not([data-ir-theme="light"]) body.ir-app .modal .url-result-item,
html:not([data-ir-theme="light"]) body.ir-app .ir-card .url-result-item {
  color: var(--ir-text) !important;
  word-break: break-word;
}

html:not([data-ir-theme="light"]) body.ir-app .modal .url-result-success,
html:not([data-ir-theme="light"]) body.ir-app .ir-card .url-result-success {
  background: hsl(220 18% 11%) !important;
  border: 1px solid var(--ir-border) !important;
  border-left: 4px solid var(--ir-gold) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .modal .url-result-warning,
html:not([data-ir-theme="light"]) body.ir-app .ir-card .url-result-warning {
  background: hsl(45 18% 9%) !important;
  border: 1px solid hsl(45 35% 22% / 0.4) !important;
  border-left: 4px solid var(--ir-gold-dim) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .modal .url-result-danger,
html:not([data-ir-theme="light"]) body.ir-app .ir-card .url-result-danger {
  background: hsl(350 20% 11%) !important;
  border: 1px solid hsl(350 28% 24% / 0.45) !important;
  border-left: 4px solid #e85d75 !important;
}

html:not([data-ir-theme="light"]) body.ir-app .modal .url-result-info,
html:not([data-ir-theme="light"]) body.ir-app .ir-card .url-result-info {
  background: hsl(215 22% 11%) !important;
  border: 1px solid var(--ir-border) !important;
  border-left: 4px solid hsl(210 45% 48%) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .btn-outline-secondary {
  border-color: hsl(45 40% 45%) !important;
  color: var(--ir-muted) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .btn-outline-secondary:hover {
  background: hsl(220 15% 18%) !important;
  color: var(--ir-text) !important;
  border-color: var(--ir-gold-dim) !important;
}

html:not([data-ir-theme="light"]) body.ir-app .text-muted {
  color: hsl(220, 8%, 58%) !important;
}

/* ---------- Light theme ---------- */
html[data-ir-theme="light"] {
  --ir-bg: hsl(220, 14%, 94%);
  --ir-surface: hsl(0, 0%, 100%);
  --ir-surface-2: hsl(220, 14%, 98%);
  --ir-border: hsl(220, 12%, 88%);
  --ir-text: hsl(220, 35%, 14%);
  --ir-muted: hsl(220, 10%, 38%);
  --ir-gold: hsl(43, 96%, 42%);
  --ir-gold-bright: hsl(43, 100%, 48%);
  --ir-gold-dim: hsl(43, 90%, 36%);
  --ir-shadow-gold: 0 0 20px hsl(43 100% 40% / 0.12);
}

html[data-ir-theme="light"] body.ir-app {
  background-color: var(--ir-bg);
  color: var(--ir-text);
}

html[data-ir-theme="light"] body.ir-app .modal-content {
  background: var(--ir-surface) !important;
  color: var(--ir-text) !important;
  border-color: var(--ir-border) !important;
}
html[data-ir-theme="light"] body.ir-app .modal-header {
  background: linear-gradient(135deg, hsl(220, 20%, 97%) 0%, hsl(0, 0%, 100%) 100%) !important;
  color: var(--ir-text) !important;
  border-bottom-color: var(--ir-border) !important;
}
html[data-ir-theme="light"] body.ir-app .modal-body {
  background: var(--ir-surface);
  color: var(--ir-text);
}
html[data-ir-theme="light"] body.ir-app .modal-footer {
  background: hsl(220, 14%, 98%) !important;
  border-top-color: var(--ir-border) !important;
}
html[data-ir-theme="light"] body.ir-app .modal-title {
  color: hsl(220, 45%, 18%) !important;
}
html[data-ir-theme="light"] body.ir-app .modal .form-label {
  color: var(--ir-muted) !important;
}
html[data-ir-theme="light"] body.ir-app .modal .form-control,
html[data-ir-theme="light"] body.ir-app .modal textarea {
  background: var(--ir-surface-2) !important;
  border-color: var(--ir-border) !important;
  color: var(--ir-text) !important;
}

html[data-ir-theme="light"] body.ir-app .modal .url-result-item,
html[data-ir-theme="light"] body.ir-app .ir-card .url-result-item {
  color: var(--ir-text) !important;
  word-break: break-word;
}

html[data-ir-theme="light"] .ir-navbar {
  background: linear-gradient(135deg, hsl(220, 45%, 18%) 0%, hsl(220, 40%, 26%) 100%) !important;
  border-bottom-color: hsl(45 100% 50% / 0.35);
}

html[data-ir-theme="light"] .ir-card {
  background: var(--ir-surface) !important;
  border-color: hsl(45 80% 45% / 0.25) !important;
  box-shadow: 0 8px 28px rgba(18, 24, 50, 0.08);
}

html[data-ir-theme="light"] .ir-card .card-header {
  background: linear-gradient(135deg, hsl(220, 20%, 97%) 0%, hsl(0, 0%, 100%) 100%) !important;
  border-bottom-color: var(--ir-border) !important;
  color: var(--ir-text);
}

html[data-ir-theme="light"] body.ir-app h1,
html[data-ir-theme="light"] body.ir-app h2,
html[data-ir-theme="light"] body.ir-app h3,
html[data-ir-theme="light"] body.ir-app h4,
html[data-ir-theme="light"] body.ir-app h5,
html[data-ir-theme="light"] body.ir-app h6 {
  color: hsl(220, 45%, 18%) !important;
}

html[data-ir-theme="light"] .ir-card .form-label {
  color: var(--ir-muted);
}

html[data-ir-theme="light"] .ir-card .form-control,
html[data-ir-theme="light"] .ir-card .form-select {
  background: var(--ir-surface);
  border-color: var(--ir-border);
  color: var(--ir-text);
}

html[data-ir-theme="light"] .ir-card .form-control:focus,
html[data-ir-theme="light"] .ir-card .form-select:focus {
  background: var(--ir-surface);
  color: var(--ir-text);
}

html[data-ir-theme="light"] .ir-alert-dark {
  background: hsl(220 14% 96%);
  border-color: hsl(45 60% 70% / 0.5);
  color: var(--ir-muted);
}

html[data-ir-theme="light"] body.ir-login-page {
  background: hsl(220, 18%, 92%);
  color: var(--ir-text);
}

html[data-ir-theme="light"] .ir-login-card {
  background: hsl(0, 0%, 100%);
  border-color: hsl(45 70% 55% / 0.35);
  box-shadow: 0 20px 50px rgba(18, 24, 50, 0.12);
}

html[data-ir-theme="light"] .ir-login-card h1 {
  color: var(--ir-gold-dim);
}

html[data-ir-theme="light"] .ir-login-card .form-control {
  background: var(--ir-surface-2);
  border-color: var(--ir-border);
  color: var(--ir-text);
}

/* Theme toggle (navbar) */
.ir-theme-toggle .ir-theme-icon-sun,
.ir-theme-toggle .ir-theme-icon-moon {
  font-size: 1rem;
  line-height: 1;
}

html:not([data-ir-theme="light"]) .ir-theme-toggle .ir-theme-icon-sun {
  display: inline;
}
html:not([data-ir-theme="light"]) .ir-theme-toggle .ir-theme-icon-moon {
  display: none;
}
html[data-ir-theme="light"] .ir-theme-toggle .ir-theme-icon-sun {
  display: none;
}
html[data-ir-theme="light"] .ir-theme-toggle .ir-theme-icon-moon {
  display: inline;
}

.ir-theme-toggle-label {
  margin-left: 0.25rem;
  font-size: 0.8rem;
}
