/* Bootstrap primary color override */
:root {
  --bs-primary: #274E8F;
  --bs-primary-rgb: 39, 78, 143;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  /* Subtiele, moderne achtergrond gradient */
  background: radial-gradient(1200px 480px at 50% -240px, #eaf0ff 0%, #f5f7fb 45%, #f8fafc 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* When destination background is active, keep non-dashboard pages readable (white content surface) */
body.fs-has-dest-bg:not(.fs-action-dashboard) .page-container{
  background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(248,251,255,0.82) 100%);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(17,24,39,0.12);
  backdrop-filter: blur(8px);
}

/* Keep interactive/content layers above the destination background crossfade layer. */
body.fs-has-dest-bg .content-wrapper,
body.fs-has-dest-bg .page-container {
  position: relative;
  z-index: 1;
}

/* Soft confirm modal (site-styled, avoids browser confirm()) */
.fs-soft-confirm-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.45);
  z-index: 2000;
}
.fs-soft-confirm-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(17,24,39,0.22);
  z-index: 2001;
  padding: 16px 16px 14px;
  backdrop-filter: blur(10px);
}
.fs-soft-confirm-title{
  font-weight: 800;
  color: #274E8F;
  font-size: 1.05rem;
  margin: 0 0 6px 0;
  display:flex;
  align-items:center;
  gap: 10px;
}
.fs-soft-confirm-title i{ color:#274E8F; }
.fs-soft-confirm-body{
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0 0 14px 0;
}
.fs-soft-confirm-actions{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
}
.fs-soft-confirm-actions .btn{
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
}

.site-header {
  background: transparent;
  color: white;
  padding: 1rem 0;
  /* Fixed header - blijft altijd bovenaan */
  flex-shrink: 0;
  position: relative;
  /* Keep above page content but below Bootstrap modals/backdrops */
  z-index: 1030;
}
.site-header::before {
  content: '';
  position: absolute;
  top: calc(-1 * env(safe-area-inset-top));
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: inherit;
  display: block;
}

.content-wrapper {
  /* Content scrollt, neemt resterende ruimte */
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  /* Container voor centered content */
  display: flex;
  flex-direction: column;
  padding-top: 0.75rem;
  padding-bottom: 2rem;
}

.content-wrapper > * {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1em;
  padding-right: 1em;
}

/* Op kleine schermen en tablets (iPhone/iPad): transparent */
@media (max-width: 1200px) {
  .site-header {
    background: transparent;
  }
}
.header-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-logo {
  font-size: 2rem;
  color: #274E8F;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.4rem 0.75rem;
  border: 2px solid #274E8F;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
}
.header-logo:hover { 
  color: white;
  background: #274E8F;
  border-color: #274E8F;
  text-decoration: none;
  transform: translateY(-1px);
}
.header-logo:active {
  transform: translateY(0);
}
.header-logo i { font-size: 2.5rem; }
.header-text { display: flex; flex-direction: column; }
.header-title {
  font-size: 1.5rem; /* iets compacter */
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.header-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 400;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Ensure dropdown menu is clickable above dashboard content, but still below modals */
.site-header .dropdown-menu{
  z-index: 1031;
}

.header-support,
.header-logout {
  color: #274E8F;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 2px solid #274E8F;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: white;
}
.header-support:hover,
.header-logout:hover {
  color: white;
  background: #274E8F;
  border-color: #274E8F;
  transform: translateY(-1px);
  text-decoration: none;
}
@media (max-width: 768px) {
  .content-wrapper {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }
  .site-header { padding: 0.75rem 0; }
  .header-logo { font-size: 1.2rem; gap: 0.5rem; }
  .header-logo i { font-size: 1.5rem; }
  .header-title { font-size: 1.1rem; }
  .header-subtitle { font-size: 0.7rem; }
  .header-nav { gap: 0.4rem; }
  .header-support,
  .header-logout {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    border-width: 1px;
  }
  .header-support i,
  .header-logout i {
    margin-right: 0.25rem !important;
  }
}

/* Smartphones: hide the Flight Sync logo block to save header space */
@media (max-width: 576px) {
  .header-logo { display: none !important; }
  .header-content { 
    justify-content: flex-end;
    align-items: center;
    position: relative;
  }
  .header-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .header-support {
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translateY(-50%);
  }
}
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #333; color: white;
  padding: 1em;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 9999;
}
#cookie-banner button {
  background: #4CAF50; border: none;
  padding: 0.5em 1em; color: white; cursor: pointer;
  border-radius: .35rem;
}
.page-container {
  padding: 0.5rem 0 2rem;
}

/* Dashboard buttons: same blue color as hamburger menu */
a[href*="dashboard"].btn-outline-primary,
a[href*="dashboard"].btn-outline-secondary {
  background: #274E8F;
  border-color: #274E8F;
  color: white;
}
a[href*="dashboard"].btn-outline-primary:hover,
a[href*="dashboard"].btn-outline-secondary:hover {
  background: #1a365d;
  border-color: #1a365d;
  color: white;
}
@media (max-width: 768px) {
  .page-container {
    padding: 0.25rem 0 1.5rem;
  }
  .card-body {
    padding: 1rem !important;
  }
  .circle-icon {
    width: 48px;
    height: 48px;
  }
  .circle-icon i {
    font-size: 1.5rem;
  }
  .card h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .card p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
}
.circle-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.card {
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.62) !important;
}
.card-body {
  background: transparent !important;
}
/* Specifiek voor dashboard cards */
.dashboard-card-link .card,
.dashboard-card-link .card-body {
  background: rgba(255, 255, 255, 0.62) !important;
}
.form-control {
  border-radius: 0.75rem;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
}
.form-control:focus {
  border-color: #274E8F;
  box-shadow: 0 0 0 0.2rem rgba(39, 78, 143, 0.25);
}
.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.btn {
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Verbeterde checkbox zichtbaarheid */
.form-check-input {
  border: 2px solid #6c757d !important;
  border-radius: 4px !important;
  width: 1.2em !important;
  height: 1.2em !important;
}

/* Toetsenbord focus-styling voor betere toegankelijkheid */
:focus-visible {
  outline: 3px solid #305cde;
  outline-offset: 2px;
}

/* Skip link (toegevoegd in template) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  background: #0d6efd;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}
.skip-link:focus { left: 12px; }

.form-check-input:checked {
  background-color: #274E8F !important;
  border-color: #274E8F !important;
}

.form-check-input:focus {
  border-color: #5a8bc7 !important;
  box-shadow: 0 0 0 0.25rem rgba(39, 78, 143, 0.25) !important;
}

.form-check-input:hover {
  border-color: #274E8F !important;
}

/* Dashboard specific styles */
.welcome-title {
  color: #274E8F;
}

.chronos-icon {
  color: #274E8F;
}

.chronos-btn {
  background: #274E8F;
  border-color: #274E8F;
  color: white;
}

/* Add Friends pagina: gebruik dezelfde blauwe kleur als hamburger menu */
body.fs-action-add_friends .btn-primary {
  background: #274E8F;
  border-color: #274E8F;
  color: white;
}
body.fs-action-add_friends .btn-primary:hover {
  background: #1a365d;
  border-color: #1a365d;
  color: white;
}
body.fs-action-add_friends .text-primary {
  color: #274E8F !important;
}

.flight-search-results {
  display: none;
}

.inline-form {
  display: inline;
} 

/* Flash Messages - Horizontaal gecentreerd, verticaal net onder de header */
.flash-message-container {
  position: fixed;
  top: 100px; /* Net onder de header */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 90%;
  width: auto;
  pointer-events: none;
}

.flash-message-container .alert {
  display: inline-block;
  padding: 0.75rem 3rem 0.75rem 1.5rem;
  border-radius: 8px;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  min-width: 200px;
  text-align: left;
}

@media (max-width: 768px) {
  .flash-message-container {
    top: 70px; /* Iets hoger op mobiel waar header kleiner is */
    max-width: 95%;
  }
  
  .flash-message-container .alert {
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}
