/*
  JustSpillIt base theme
  - Bootstrap 5.3.3
  - Dark, calm, high-trust defaults
*/

body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI",
  Roboto, Arial, sans-serif;
}

:root {
  /* Brand */
  --jsi-bg: #121212;
  --jsi-bg-top: #171717;
  --jsi-fg: #F1F1EE;
  --jsi-muted: rgba(241, 241, 238, 0.72);
  --jsi-border: rgba(241, 241, 238, 0.14);
  --jsi-surface: rgba(255, 255, 255, 0.04);
  --jsi-surface-2: rgba(255, 255, 255, 0.06);

  /* Warm calm blue (logo pill) */
  --jsi-blue: #6B8FCF;
  --jsi-blue-soft: rgba(107, 143, 207, 0.22);
  --jsi-blue-ring: rgba(107, 143, 207, 0.35);

  /* Typography */
  --jsi-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  
  /* Bootstrap variable overrides */
  --bs-body-bg: var(--jsi-bg);
  --bs-body-color: var(--jsi-fg);
  --bs-secondary-color: var(--jsi-muted);
  --bs-tertiary-color: rgba(241, 241, 238, 0.55);

  --bs-border-color: var(--jsi-border);

  --bs-primary: var(--jsi-blue);
  --bs-primary-rgb: 107, 143, 207;

  --bs-link-color: rgba(241, 241, 238, 0.9);
  --bs-link-hover-color: var(--jsi-fg);

  /* Softer focus ring globally */
  --bs-focus-ring-color: var(--jsi-blue-ring);
  --bs-focus-ring-width: 0.2rem;

  /* IMPORTANT: disabled primary */
  --bs-btn-disabled-bg: rgba(37, 99, 235, 0.45);
  --bs-btn-disabled-border-color: rgba(37, 99, 235, 0.45);
  --bs-btn-disabled-color: #ffffff;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  font-family: var(--jsi-font), serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
          radial-gradient(1200px 600px at 50% 10%, rgba(90,120,255,0.12), transparent 60%),
          radial-gradient(900px 500px at 20% 80%, rgba(120,140,255,0.08), transparent 55%),
          linear-gradient(180deg, #070a12 0%, #0b0f17 40%, #0a0d14 100%) !important;
  color: rgba(255,255,255,.92);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('/img/noise-128.png');
  background-repeat: repeat;
  opacity: 0.07; /* adjust 0.02–0.05 */
  pointer-events: none;
  z-index: -1;
}

/* Header / navbar */
header,
.navbar,
.navbar.bg-body-tertiary,
.navbar.bg-light,
.navbar.bg-white {
  background: linear-gradient(
          180deg,
          rgba(7,10,18,0.78) 0%,
          rgba(7,10,18,0.55) 55%,
          rgba(7,10,18,0.0) 100%
  ) !important;
  color: var(--jsi-fg);
  border: 0 !important;
  box-shadow: none !important;
}

/* Sticky header: blur + no harsh separator */
.sticky-top {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Optional: ultra-soft “horizon” glow instead of a line */
.sticky-top::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(
          90deg,
          transparent,
          rgba(255,255,255,.12),
          transparent
  );
  opacity: .55;
}


/* Navbar links */
.navbar .navbar-brand,
.navbar .nav-link {
  color: rgba(241, 241, 238, 0.92) !important;
}

.navbar .nav-link:hover,
.navbar .navbar-brand:hover {
  color: var(--jsi-fg) !important;
}

/* Navbar toggler icon (if you ever use it) */
.navbar .navbar-toggler {
  border-color: rgba(241, 241, 238, 0.25);
}

.navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(18, 18, 18, 0.9), 0 0 0 0.35rem var(--jsi-blue-ring);
}

/* Links: calm, not "CTA" */
a {
  color: rgba(241, 241, 238, 0.9);
  text-decoration-color: rgba(241, 241, 238, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--jsi-fg);
  text-decoration-color: rgba(241, 241, 238, 0.6);
}

/* Bootstrap focus styling (buttons, inputs, links) */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
textarea:focus,
a:focus {
  box-shadow: 0 0 0 0.15rem rgba(18, 18, 18, 0.9), 0 0 0 0.35rem var(--jsi-blue-ring);
  outline: none;
}

/* Surfaces */
.card,
.dropdown-menu,
.modal-content {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--jsi-border);
  color: var(--jsi-fg);
}

/* Forms */
.form-control,
.form-select {
  background: rgba(0,0,0,.28) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.9) !important;
  border-radius: 16px !important;
  padding: 0.85rem 1rem;
}

.form-control::placeholder {
  color: rgba(241, 241, 238, 0.5);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--jsi-surface-2);
  border-color: rgba(106,139,255,.55) !important;
  box-shadow: 0 0 0 4px rgba(106,139,255,.16) !important;
}

.form-text,
.text-muted {
  color: var(--jsi-muted) !important;
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-weight: 500;              /* ↓ from 600 */
  font-size: 1.1rem;            /* ↓ slightly smaller */
  letter-spacing: 0;             /* remove assertiveness */
  padding: 0.6rem 1.35rem;       /* less chunky */
}

/* Kill Bootstrap’s loud focus shadow */
.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Primary: less “solid block”, more “soft glass tint” */
.btn-primary {
  background: rgba(107, 143, 207, 0.18);
  border: 1px solid rgba(107, 143, 207, 0.45);
  color: rgba(255,255,255,0.85); /* ↓ softer than 0.92 */

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow:
          inset 0 1px 0 rgba(255,255,255,0.10),
          0 10px 28px rgba(0,0,0,0.45);

  transition:
          background 0.18s ease,
          border-color 0.18s ease,
          transform 0.15s ease,
          box-shadow 0.15s ease;
}

.btn-primary:hover {
  color: rgba(255,255,255,0.88);
  background: rgba(107, 143, 207, 0.26);
  border-color: rgba(107, 143, 207, 0.65);
  transform: translateY(-1px);
  box-shadow:
          inset 0 1px 0 rgba(255,255,255,0.14),
          0 14px 38px rgba(0,0,0,0.55);
}

.btn-primary:active {
  transform: translateY(0);
  background: rgba(107, 143, 207, 0.22);
  border-color: rgba(107, 143, 207, 0.60);
  box-shadow:
          inset 0 1px 0 rgba(255,255,255,0.10),
          0 8px 22px rgba(0,0,0,0.40);
}

/* Accessible focus that matches your sky vibe */
.btn-primary:focus-visible {
  box-shadow:
          0 0 0 3px rgba(106, 139, 255, 0.28),
          inset 0 1px 0 rgba(255,255,255,0.12);
}

/* Outline light: keep yours, just make it feel less “default” */
.btn-outline-light {
  border-color: rgba(241, 241, 238, 0.28);
  font-size: 1.1rem;
  font-weight: 450;
  color: rgba(241,241,238,0.78);  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(241, 241, 238, 0.45);
  color: rgba(241,241,238,0.88);
  transform: translateY(-1px);
}


/* Text selection (subtle) */
::selection {
  background: rgba(107, 143, 207, 0.32);
}

/* Optional helper classes for your landing layout */
.jsi-container {
  max-width: 720px;
}

.jsi-banner {
  background: rgba(255,255,255,0.06);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
          0 20px 55px rgba(0,0,0,0.55),
          inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(10px);
}

.jsi-banner .fs-5 {
  font-size: 1.15rem !important;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.jsi-banner .text-muted {
  color: rgba(255,255,255,0.62) !important;
}


/* Keep Bootstrap floating label placeholder alignment from default template (but in our palette) */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--jsi-muted);
}

.jsi-privacy-modal { background-color: #171717 !important; }

.jsi-alert {
  background-color: #e9f2ff;
  border: none;
  color: #2b4a6f;
  border-radius: 12px;
}

/* Cookie banner – clear but calm */
#cb-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  width: auto;

  z-index: 999;
  display: none;

  background-color: #1f1f1f; /* lighter dark to pop from page */
  color: #ffffff;

  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);

  border-radius: 16px;
}

#cb-cookie-banner a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

#cb-cookie-banner a:hover {
  color: #ffffff;
  opacity: 0.85;
}

#cb-cookie-banner .btn {
  border-radius: 999px;
}

/* PWA helper section */
.jsi-helper {
  opacity: 0.85;
}

.jsi-helper-text {
  font-size: 0.95rem;
  color: var(--jsi-muted);
}

.jsi-quiet-exit {
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.jsi-quiet-exit:hover,
.jsi-quiet-exit:focus {
  opacity: 1;
  color: var(--bs-secondary);
  text-decoration-thickness: 2px;
}

.jsi-quiet-exit:focus-visible {
  outline: none;
}

.toast {
  opacity: 1;
  background-color: var(--bs-body-bg);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.25);
}

@keyframes jsiIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.jsi-animate-in{
  animation: jsiIn .5s ease-out both;
}

/* Install app callout: de-Bootstrap the card */
#jsi-install-card {
  background: rgba(255,255,255,0.035) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 45px rgba(0,0,0,0.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Remove “card” vibes inside */
#jsi-install-card .card-body {
  padding: 14px 16px !important;
}

#jsi-install-card .card-text {
  color: rgba(255,255,255,0.78) !important;
  font-size: 0.95rem;
  line-height: 1.35;
}

#jsi-install-card [data-jsi-install="true"] {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;

  color: rgba(255,255,255,0.86) !important;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);

  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.9rem;

  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#jsi-install-card [data-jsi-install="true"]:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

#jsi-install-card img {
  border-radius: 14px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

#jsi-install-card.position-fixed::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  opacity: 0.35;
}
#jsi-install-card.position-fixed { position: fixed; }

.jsi-lead{
  max-width: 46ch;          /* readable line length */
  margin: 1.25rem auto 1.5rem; /* space from banner + space below */
  line-height: 1.65;
  opacity: 0.85;
}

.field-validation:not(:empty) {
  padding-left: 1rem; /* same as ps-3 */
  margin-top: .25rem;
  display: block;
}

.btn-primary:disabled,
.btn-primary.disabled,
fieldset:disabled .btn-primary {
  --bs-btn-disabled-bg: rgba(108, 117, 125, 0.18);
  --bs-btn-disabled-border-color: rgba(108, 117, 125, 0.18);
  --bs-btn-disabled-color: rgba(255, 255, 255, 0.6);
  opacity: 0.85;
}

.jsi-inline-help{
  font: inherit;              /* <-- makes it match the sentence */
  line-height: inherit;       /* <-- no weird baseline/height */
  color: inherit;
  opacity: .65;
  text-decoration: none;
  cursor: pointer;
}

.jsi-inline-help:hover,
.jsi-inline-help:focus{
  opacity: .85;
  text-decoration: underline;
  text-underline-offset: .15em;
}
