body {
    font-family: sans-serif;
    background: #f4f4f4;
    padding: 2rem;
}

hr {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 1rem 0;
}

.quiz-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
}

.logo-container {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.logo-container img {
    max-width: 200px;
    height: auto;
    opacity: 0.95;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

button:disabled {
    background-color: #ccc;
}

.review-list {
    margin-top: 2rem;
}

.review-list hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0.75rem 0 1.25rem;
}

.review-question {
    margin-bottom: 1.5rem;
}

.correct {
    color: green;
    font-weight: bold;
}

.wrong {
    color: red;
    font-weight: bold;
}

.choice-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.choice-wrapper label {
    display: inline-block;
    min-width: 90%;
}

.choice-wrapper label:hover {
    background-color: #f0f8ff;
}

.choice-wrapper input[type="radio"]:checked + label {
    font-weight: 600;
    background-color: #d1e7dd;
    border-radius: 4px;
    padding: 0.25rem;
}

#progress-container {
    width: 100%;
    background-color: #e0e0e0;
    height: 12px;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

.quiz-container,
#result-screen {
  position: relative;
  z-index: 1;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

input[type="date"]:focus {
    outline: none;
    border-color: #4f9cff;
    box-shadow: 0 4px 18px rgba(79,156,255,0.12);
}

/* Native datepicker with styling - DO NOT override appearance */
input[type="date"] {
    padding: 0.55rem 1rem;
    border: 1px solid #d6dde6;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 1rem;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

/* Keep native calendar indicator visible and clickable */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* Optional focus styling */
input[type="date"]:focus {
    outline: none;
    border-color: #4f9cff;
    box-shadow: 0 4px 18px rgba(79,156,255,0.12);
}

/* The card */
.liability-card {
  background: #fff;
  padding: 20px;                /* smaller padding */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  width: 95%;                    /* almost full width on small screens */
  max-width: 500px;              /* limit width on large screens */
  box-sizing: border-box;
  margin: 20px auto;             /* center card */
}


/* Headings */
.liability-card h2, 
.liability-card p {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

/* Container for first/last name fields */
.liability-name-fields {
  display: flex;
  gap: 16px; /* space between first and last name */
  flex-wrap: wrap; /* wraps on smaller screens */
  margin-bottom: 16px;
}

/* Each input wrapper */
.name-field {
  flex: 1; /* equal width */
  display: flex;
  flex-direction: column;
}

/* Labels */
.name-field label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

/* Inputs */
.name-field input {
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

/* Input focus state */
.name-field input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Questions */
.liability-question {
  margin-bottom: 25px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

/* Question text */
.liability-question p {
  font-weight: 600;
  margin-bottom: 10px;
  text-align: left;
}

/* Radio buttons and input */
.liability-question label {
  margin-right: 15px;
}

.liability-question input[type="text"] {
  display: block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 120px;
}

/* Submit button */
#submit-liability-btn {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 12px 25px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

#submit-liability-btn:hover {
  background: #2980b9;
}

/* Hide quiz when liability is shown */
.hidden {
  display: none !important;
}

/* Logo inside liability card */
.liability-card .liability-logo {
  max-width: 200px;      
    height: auto;
    display: block;
    margin: 0 auto 20px;    
    opacity: 0.95;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Liability Form */
#liability-form {
  position: fixed;
  inset: 0;
  background: #f0f2f5;
  z-index: 1000;

  display: flex;
  flex-direction: column; /* stack content vertically */
  justify-content: flex-start; /* start at top */
  align-items: center; /* center horizontally */

  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Selfie video & canvas – preserve aspect ratio */
#selfie-video,
#selfie-canvas {
  width: 100%;          /* fill container */
  max-width: 400px;     /* never too wide */
  height: auto;         /* preserve aspect ratio */
  border: 1px solid #ccc;
  border-radius: 8px;
  display: block;
  margin: 10px auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* On very small devices, reduce text slightly */
@media (max-width: 400px) {
  .liability-card h2 {
    font-size: 1.3rem;
  }
  .liability-card p {
    font-size: 0.95rem;
  }

  .auto-filled {
  background-color: #e0f7fa;
  transition: background-color 0.5s;
}

.initial-field-container {
  position: relative;
  display: inline-block;
}

.helper-text {
  display: none; /* hide by default */
  font-size: 0.85em;
  color: #555;
  margin-top: 5px;
}

.initial-field:hover + .helper-text,
.initial-field:focus + .helper-text {
  display: block; /* show on hover or focus */
}

.liability-signature {
    padding: 18px;
    gap: 25px;
  }

  #signature-pad {
    height: 180px;
  }

  .btn-clear {
    width: 100%;
    padding: 12px;
    align-self: center;
    font-size: 1rem;
  }

  .signature-date-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #signatureDate {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }


  #submit-liability-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
  }

}

.liability-signature {
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 12px;
  background-color: #f9f9f9;
  max-width: 500px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 20px; /* space between canvas and controls */
}

#signature-pad {
  border: 1px solid #ccc;
  width: 100%;
  height: 200px;
  border-radius: 6px;
  background-color: #fff;
}

.signature-controls {
  display: flex;
  flex-direction: column;
  gap: 20px; /* space between clear button and date */
}

.btn-clear {
  align-self: center;
  padding: 8px 16px;
  font-size: 14px;
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-clear:hover {
  background-color: #c0392b;
}

.signature-date-row {
  display: flex;
  flex-direction: column;
  align-items: center; /* THIS is the key */
  gap: 5px;
}

#signatureDate {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 200px;
  text-align: center; /*centers the date text inside */
}






