/* style.css - combined front-end & admin styling with cache-busting versioning */

/* Global Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Dynamic Background + Overlay */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa url() center/cover no-repeat;
  transition: background-image 0.5s ease-in-out;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: -1;
}

/* Header & Footer (shared) */
#app-header, #app-footer {
  position: fixed;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.9);
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}
#app-header { top: 0; display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.5rem; }
#app-header .header-left h1 { margin: 0; font-size: 1.5rem; color: #007BFF; }
#app-header .admin-nav { display: flex; gap: 1rem; }
#app-header .admin-nav a {
  padding: 0.5rem 0.75rem;
  color: #333;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.3s;
}
#app-header .admin-nav a:hover,
#app-header .admin-nav a.active { background: #007BFF; color: #fff; }
#app-header .header-right .logout-btn {
  border: 1px solid #007BFF;
  background: transparent;
  color: #007BFF;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.3s;
}
#app-header .header-right .logout-btn:hover { background: #007BFF; color: #fff; }

#app-footer {
  bottom: 0;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

/* Main spacing under header and above footer */
main { padding: 4rem 1rem 3rem; max-width: 1000px; margin: 0 auto; }

/* Login & Splash */
#login-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 420px; margin: 3rem auto; padding: 2rem;
  background: rgba(255,255,255,0.85); border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
#login-container h1 { font-size: 2.25rem; margin-bottom: 1.5rem; color: #007BFF; text-align: center; }
#login-container input, #login-container button {
  width: 100%; padding: 0.75rem; font-size: 1rem; margin-bottom: 0.75rem;
  border-radius: 0.5rem; border: 1px solid #ccc; transition: border-color 0.3s;
}
#login-container input:focus { border-color: #007BFF; outline: none; }
#login-container .error { color: #e74c3c; font-size: 0.9rem; }
#login-container button {
  background: #007BFF; color: #fff; border: none; cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}
#login-container button:hover { background: #0056b3; }
#login-container button:active { transform: scale(0.98); }

/* Intro Modal & Questions */
#screening-container {
  width: 100%;
  padding: 2rem;
  margin: 3rem auto;
}

/* Når modal er åben: fixér body så kun modal’en scroller */
body.modal-open {
  overflow: hidden;
}

/* Blanket / baggrund under modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

/* Selve modal-dialogen */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;         /* Maks 90% af browser-højden */
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  overflow-y: auto;         /* Én samlet scrollbar */
  z-index: 1001;
}

/* Fjern indre scroll fra paragrafen */
.modal p {
  margin-bottom: 1rem;
  /* Ingen overflow her */
}

/* Overskrift og knap som før */
.modal h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.modal button {
  align-self: center;
  background: #007BFF;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}
.modal button:hover { background: #0056b3; }
.modal button:active { transform: scale(0.98); }

.question {
  background: #fff; border-radius: 1rem; padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); margin: 0 auto;
}
.question h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.question p { margin-bottom: 1rem; }
.question img { width: 100%; border-radius: 0.5rem; margin-bottom: 1rem; }
.options { display: flex; flex-direction: column; }
.options button { width: 100%; padding: 0.75rem; margin-bottom: 0.75rem;
  background: #007BFF; color: #fff; border: none; border-radius: 0.5rem;
  cursor: pointer; transition: background 0.3s, transform 0.1s;
}
.options button:hover { background: #0056b3; }
.options button:active { transform: scale(0.98); }

/* Tables in admin pages */
table {
  width: 100%; border-collapse: collapse; margin-top: 1rem;
}
table th, table td {
  border-bottom: 1px solid #ccc; padding: 0.75rem;
  text-align: left;
}
table th { background: #f0f0f0; }

/* Utility classes */
.centered { margin: 0 auto; }
.error { color: #e74c3c; }
.logout-btn { border: 1px solid #007BFF; background: transparent;
  color: #007BFF; padding: 0.5rem 1rem; border-radius: 0.5rem;
  text-decoration: none; transition: background 0.3s;
}
.logout-btn:hover { background: #007BFF; color: #fff; }

/* Responsive */
@media (max-width: 600px) {
  main { padding: 5rem 1rem 4rem; }
  #app-header { flex-direction: column; gap: 0.5rem; }
  .modal, .question, #login-container { margin: 1rem; padding: 1rem; }
  /* Progress-indikator i header */
#progressIndicator {
  font-size: 0.9rem;
  color: #333;
  margin-left: auto;
  margin-right: 1rem;
}
#progressIndicator.hidden {
  display: none;
}

}
