html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #999;
}
/* Respect Bootstrap theme variables instead of hard-coded colors */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-btn-color, #fff) !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active:focus {
    background-color: color-mix(in oklab, var(--bs-primary) 85%, black 15%) !important;
    border-color: color-mix(in oklab, var(--bs-primary) 85%, black 15%) !important;
}

.btn-outline-theme-primary {
    color: color-mix(in srgb, var(--bs-primary) 85%, var(--bs-body-color) 15%);
    border-color: color-mix(in srgb, var(--bs-primary) 55%, transparent);
    background-color: transparent;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.btn-outline-theme-primary:hover,
.btn-outline-theme-primary:focus {
    color: color-mix(in srgb, var(--bs-body-bg) 82%, white 18%);
    background-color: color-mix(in srgb, var(--bs-primary) 18%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 75%, transparent);
}
[data-bs-theme="dark"] .btn-outline-theme-primary {
    color: color-mix(in srgb, var(--bs-primary) 78%, white 22%);
    border-color: color-mix(in srgb, var(--bs-primary) 50%, transparent);
}
[data-bs-theme="dark"] .btn-outline-theme-primary:hover,
[data-bs-theme="dark"] .btn-outline-theme-primary:focus {
    background-color: color-mix(in srgb, var(--bs-primary) 28%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 80%, transparent);
    color: color-mix(in srgb, var(--bs-body-bg) 88%, white 12%);
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-family: Roboto,sans-serif;
}

.page-header .title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--bs-primary);
}

#config-logo-preview {
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-select:disabled {
    background-color: color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-border-color) 8%);
    color: color-mix(in srgb, var(--bs-body-color) 88%, white 12%);
    border-color: color-mix(in srgb, var(--bs-border-color) 65%, transparent);
}

/*tab navigation*/
.login-logout-card .card-header {
    padding: 0px 0px 12px 0px;
}

.login-logout-card ul.nav-tabs {
    margin: 0px 0px -12px 0px;
}

.login-logout-card li.nav-item {
    width: 50%;
}

.login-logout-card a.nav-link {
    font-size: 1rem;
    color: #333;
    text-align: center;
    padding: 1rem;
}

.login-logout-card .card-body {
    padding: 10px 20px;
}
.ubuntu-regular-h1 {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    margin-bottom:50px;
}

/* --- AI Assistant fallback (global, non-isolated) --- */
@keyframes aiBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes aiPulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(13,110,253,.08),
      0 0 18px 4px rgba(13,110,253,.20),
      0 0 36px 8px rgba(13,110,253,.35);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(13,110,253,.08),
      0 0 28px 10px rgba(13,110,253,.20),
      0 0 60px 18px rgba(13,110,253,.35);
  }
}

/* Force bounce/flare on reporting pages even if isolated CSS hasn’t loaded yet */
body.app-shell[data-page-kind="reporting"] #ai-chat-fab {
  animation: aiBounce 1.8s ease-in-out infinite !important;
  position: fixed;
  bottom: 16px;
  right: 16px;
  box-shadow:
    0 0 0 8px rgba(13,110,253,.08),
    0 0 22px 6px rgba(13,110,253,.20),
    0 0 48px 12px rgba(13,110,253,.35) !important;
  z-index: 2004 !important;
}

/* Helper bubble fallback so it’s positioned/styled even if isolated CSS lags */
#ai-helper-bubble.ai-helper-bubble {
  position: fixed;
  right: 86px; /* next to FAB */
  bottom: 22px;
  background: linear-gradient(180deg, var(--bs-primary), color-mix(in oklab, var(--bs-primary) 75%, black 25%));
  color: #fff;
  padding: .6rem .75rem .6rem .6rem;
  border-radius: 14px;
  display: none; /* toggled by .show */
  align-items: center;
  gap: .5rem;
  z-index: 1050;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
#ai-helper-bubble.ai-helper-bubble.show { display: inline-flex; }
#ai-helper-bubble.ai-helper-bubble::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 14px;
  border: 7px solid transparent;
  border-left-color: color-mix(in oklab, var(--bs-primary) 85%, black 15%);
}
#ai-helper-bubble .ai-helper-emoji { font-size: 1.1rem; line-height: 1; }
#ai-helper-bubble .ai-helper-text { font-size: .875rem; }
#ai-helper-bubble .ai-helper-close { filter: invert(1); opacity: .7; }
