/* public/assets/css/app.css — BlueSky Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-light: #f3f5f9;
  --card-light: #ffffff;
  --border-light: #e5e9f2;
  --primary-blue: #3b82f6;
  --primary-blue-hover: #2563eb;
  --primary-blue-light: #eff6ff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

html.dark ::-webkit-scrollbar-track {
  background: #0b0f19;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}

html:not(.dark) ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html:not(.dark) ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

/* Typography & Base Setup */
* {
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

html.dark body {
  background-color: #0b0f19;
  color: #f8fafc;
}

html:not(.dark) body {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* BlueSky Card Base */
.bs-card {
  border-radius: 1.5rem;
  /* 24px */
  transition: all 0.2s ease-in-out;
}

html:not(.dark) .bs-card {
  background-color: #ffffff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.03), 0 2px 6px -2px rgba(0, 0, 0, 0.02);
}

html.dark .bs-card {
  background-color: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
}

/* Header Floating Navigation Pill Wrapper */
.bs-nav-pill-wrapper {
  border-radius: 9999px;
  padding: 0.35rem 0.5rem;
}

html:not(.dark) .bs-nav-pill-wrapper {
  background-color: #ebf0f7;
  border: 1px solid #e2e8f0;
}

html.dark .bs-nav-pill-wrapper {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header Active Nav Pill Item */
.bs-nav-pill-item {
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1.1rem;
  display: inline-flex;
  items-center: center;
  gap: 0.4rem;
}

html:not(.dark) .bs-nav-pill-item.active {
  background-color: #ffffff;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .bs-nav-pill-item:not(.active) {
  color: #64748b;
}

html:not(.dark) .bs-nav-pill-item:not(.active):hover {
  color: #0f172a;
}

html.dark .bs-nav-pill-item.active {
  background-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

html.dark .bs-nav-pill-item:not(.active) {
  color: #94a3b8;
}

html.dark .bs-nav-pill-item:not(.active):hover {
  color: #f8fafc;
}

/* Striped Background Track for Chart Columns */
.bg-stripes-track {
  background-image: repeating-linear-gradient(-45deg,
      rgba(0, 0, 0, 0.02),
      rgba(0, 0, 0, 0.02) 6px,
      transparent 6px,
      transparent 12px);
  background-color: #f5f7fa;
  border-radius: 1.25rem;
}

html.dark .bg-stripes-track {
  background-image: repeating-linear-gradient(-45deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.02) 6px,
      transparent 6px,
      transparent 12px);
  background-color: #1a233a;
}

/* Striped Animated Blue Progress Bar */
.bg-stripes-blue {
  background-image: linear-gradient(45deg,
      rgba(255, 255, 255, 0.25) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0.25) 75%,
      transparent 75%,
      transparent);
  background-size: 1rem 1rem;
  background-color: #3b82f6;
  animation: progress-stripes 1.5s linear infinite;
}

@keyframes progress-stripes {
  from {
    background-position: 1rem 0;
  }

  to {
    background-position: 0 0;
  }
}

/* Custom Callout Badge above Chart Pill */
.bs-chart-callout {
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.bs-chart-callout::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #3b82f6;
}

/* Promo Banner Graphics */
.bs-promo-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.bs-promo-artwork {
  position: absolute;
  right: -20px;
  top: -20px;
  bottom: -20px;
  width: 55%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.6) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(15px);
  pointer-events: none;
}

/* Light mode specific input & card tweaks */
html:not(.dark) input[type="text"],
html:not(.dark) input[type="password"],
html:not(.dark) input[type="number"],
html:not(.dark) input[type="date"],
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html:not(.dark) input[type="text"]:focus,
html:not(.dark) input[type="password"]:focus,
html:not(.dark) input[type="number"]:focus,
html:not(.dark) input[type="date"]:focus,
html:not(.dark) select:focus,
html:not(.dark) textarea:focus {
  background-color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* HTMX indicator animation */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}