/* Layout polish */
.messages-stack .alert { border-radius: .6rem; }
.card { border-radius: .8rem; }

/* Hero section - grayer base with more visible gradients */
.hero-gradient {
  background-color: #e5e7eb;
  background-image: radial-gradient(1200px 600px at 10% 5%, rgba(13,110,253,.28), transparent 40%),
                    radial-gradient(900px 500px at 90% 10%, rgba(32,201,151,.28), transparent 35%);
}

/* === STICKY FOOTER LAYOUT === */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* Remove ALL padding from main when hero section is present */
main:has(.hero-gradient) {
  padding: 0 !important;
}

/* Flash messages - add top margin on non-hero pages when messages exist */
.flash-messages-container {
  margin-top: 1rem;
}

/* Flash messages - NO margin on hero pages (messages go inside hero or stay invisible) */
body:has(.hero-gradient) .flash-messages-container {
  margin: 0 !important;
}
/* Slightly subtler in dark mode */
[data-bs-theme="dark"] .hero-gradient {
  background-color: #1a202c;
  background-image: radial-gradient(1200px 600px at 10% 5%, rgba(13,110,253,.15), transparent 40%),
                    radial-gradient(900px 500px at 90% 10%, rgba(32,201,151,.15), transparent 35%);
}

/* Icon circle utility */
.icon-circle {
  width: 44px; height: 44px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

/* Hero card */
.card-hero { border: 1px solid rgba(0,0,0,.06); }
[data-bs-theme="dark"] .card-hero { border-color: rgba(255,255,255,.08); }

/* Cookie consent bar */
.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  padding: .9rem 0;
  transform: translateY(100%);
  transition: transform .25s ease;
  z-index: 1080;
}
.cookie-consent.show { transform: translateY(0%); }

/* Make sure navbar and footer transition smoothly between themes */
.navbar, footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Navbar and footer - use dark colors in BOTH light and dark modes for a framed look */
.navbar {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: #d1d5db !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #5ca9fb !important;
}

footer,
footer.bg-body {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
  color: #d1d5db !important;
}

footer a {
  color: #d1d5db !important;
}

footer a:hover {
  color: #5ca9fb !important;
}

footer .text-body-secondary {
  color: #d1d5db !important;
}

footer .btn-outline-secondary {
  border-color: #4a5568 !important;
  color: #d1d5db !important;
}

footer .btn-outline-secondary:hover {
  background-color: #4a5568 !important;
  color: #ffffff !important;
}

/* === COOKIE CONSENT BAR === */
.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  display: none;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  padding: 1rem 0;
  z-index: 1080;
  transform: translateY(100%);
  transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease;
  box-shadow: 0 -0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.cookie-consent.show {
  display: block;
  transform: translateY(0%);
}

.cookie-consent .small {
  color: var(--bs-body-color);
}

.cookie-consent a {
  color: var(--bs-link-color);
  text-decoration: underline;
}

.cookie-consent button {
  min-width: 90px;
  transition: all 0.2s ease;
}

/* Light mode look */
[data-bs-theme="light"] .cookie-consent {
  background: var(--bs-body-bg);
  border-top-color: var(--bs-border-color);
  box-shadow: 0 -0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

/* Dark mode look */
[data-bs-theme="dark"] .cookie-consent {
  background: var(--bs-dark-bg-subtle);
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -0.25rem 0.75rem rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .cookie-consent .small {
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .cookie-consent button.btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--bs-secondary-color);
}

.cookie-consent.show {
  animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

#manageCookies {
  transition: all 0.2s ease;
}
[data-bs-theme="dark"] #manageCookies {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--bs-secondary-color);
}
[data-bs-theme="dark"] #manageCookies:hover {
  /*border-color: var(--bs-primary);
  color: var(--bs-primary);*/
  color: var(--bs-secondary-color);
  border-color: rgba(0, 0, 0, 0.05);
}

/* === 2FA nudge animations === */
.nudge { 
  opacity: 0; 
  transform: translateY(-6px); 
  animation: nudgeFadeIn .35s ease forwards; 
}

@keyframes nudgeFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.nudge-exit {
  animation: nudgeFadeOut .25s ease forwards;
}

@keyframes nudgeFadeOut {
  to { opacity: 0; transform: translateY(-6px); }
}

