@charset "utf-8";

/* Use border-box sizing everywhere so padding/border are included in width */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Page background: medium-dark grey to deep grey (left→right) */
body {
  background: linear-gradient(to right, #f5f5f5, #a0a0a0);
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content area grows to fill space above footer */
main {
  flex: 1;
  padding: 5px;
  padding-bottom: 100px;   /* >= footer height */
}

@media (max-width: 768px) {
  main {
    max-width: none;   /* ignore any site-wide container cap */
    width: 100%;
    padding: 5px 0;   /* smaller side padding */
  }
}

@media (max-width: 768px) {
  main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
	bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);

  }
}


/* ===== Footer — adjustable height and colour ===== */
footer {
  position: fixed;
  left: 0;
  bottom: 5px;        /* lift footer 5px above screen edge */
  width: 100%;
  height: 80px;
  background-color: #0F1D41;
  color: #fff;
  text-align: center;
  line-height: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 10px;
  /* border-radius: 10px 10px 0 0;  optional: softens top corners */
}

footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap;               /* ensures wrapping on small screens */
}

footer img {
  height: 60px;
  width: auto;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  footer {
    height: auto;
    padding: 10px;
    flex-direction: column;
  }

  footer p {
    flex-direction: column;
    font-size: 0.9em;
  }

  footer img {
    height: 40px;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  footer img {
    height: 30px;
  }
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  body {
    background: linear-gradient(to right, #f5f5f5, #a0a0a0);
  }
}

/* Hero container */
.hero {
  text-align: center;
  margin: 20px auto;
  max-width: 1000px;
  width: 90%;
}

/* Hero card styling */
.hero {
  background: #fff;
  border: 1px solid #D7E0EF;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin: 30px auto;
  padding: 10px 35px;       /* less empty space around the logo */
  max-width: 300px;         /* slightly narrower container */
  text-align: center;
}

/* Image styling inside the hero */
.hero img {
  display: inline-block;
  max-width: 90%; 
  max-height: none;         /* remove artificial height cap */
  height: auto;             /* preserve aspect ratio */
  border-radius: 10px;
}

/* Responsive tweak for smaller screens */
@media (max-width: 768px) {
  .hero {
    width: 90%;
    margin: 10px auto;
  }
}


@media (max-width: 768px) {
  .hero {
    padding: 8px 0;
    gap: 8px;
  }
  .hero img.hero-logo-small {
    max-height: 40px;       /* down from whatever it was */
  }
  .hero h2 {
    font-size: 18px;
    margin: 0;
    line-height: 1.2;
  }

  .user-info-form label {
    margin: 8px 0 4px;
	
  }
  .user-info-form input,
  .user-info-form select {
    margin-bottom: 10px;    /* reduce field gaps */
    padding: 10px;
  }
}

/* Choice grid for final selection page */
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

/* Big clickable tiles */
.choice-grid .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: #0F1D41;
  min-width: 260px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border: 2px solid transparent;
}

.choice-grid .btn:hover,
.choice-grid .btn:focus {
  background: #152a63;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

/* Secondary style */
.choice-grid .btn-secondary {
  background: #9A2629;
}

.choice-grid .btn-secondary:hover,
.choice-grid .btn-secondary:focus {
  background: #b12f33;
}

/* Prompt text styling */
.page-prompt {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 20px auto 30px;
  color: #0F1D41;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
  .page-prompt {
    font-size: 1.05rem;
    margin: 15px auto 25px;
  }
}

/* Main page heading */
.page-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 800;
  margin: 25px auto 20px;
  color: #0F1D41;
  line-height: 1.2;
  letter-spacing: -0.5px;
  padding: 0 10px;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 0 1px rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.9rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.2rem;
    line-height: 1.25;
  }
}


/* Section title (H2) — centred, same colour, smaller than main title */
.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 20px auto 15px;
  color: #0F1D41;
  line-height: 1.2;
  letter-spacing: -0.3px;
  padding: 0 10px;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 0 1px rgba(255,255,255,0.4);
}

/* Responsive size for smaller devices */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.2rem;
  }
}



.form-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}


/* Link button group */
.link-buttons {
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: center;
  gap: 15px;                /* spacing between buttons */
  margin: 25px auto;
}

/* Common button styling */
.link-buttons a {
  display: inline-block;
  width: 260px;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
  transition: all 0.2s ease-in-out;
}

/* Individual button colours */
.link-buttons .btn-checklist {
  background-color: #0F1D41; /* navy */
}

.link-buttons .btn-incident {
  background-color: #9A2629; /* maroon */
}

.link-buttons .btn-vinsurance {
  background-color: #2E8B57; /* tasteful green */
}

.btn-downloadqr {
  background-color: #4CAF50;
  color: #fff;
}
.btn-downloadqr:hover {
  background-color: #45A049;
}

.btn-safety_audit {
    background-color: #FF0000;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
}

.btn-safety_audit:hover {
    background-color: #CC0000;
}

/* Hover effects */
.link-buttons a:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .link-buttons a {
    width: 90%;          /* full width on small screens */
    font-size: 1rem;
    padding: 12px;
  }
}




/* QR header above preview */
.qr-header {
  text-align: center;
  margin-bottom: 10px;
}
.qr-line1 {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}
.qr-line2 {
  font-size: 16px;
  color: #374151;
}
.qr-canvas {
  display: grid;
  place-items: center;
}


/* User info form — wide but constrained to hero size */
.user-info-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
  width: 100%;
  max-width: 600px;      /* matches hero content width */
  margin-left: auto;
  margin-right: auto;    /* keeps it centred */
}

.user-info-form label {
  font-weight: 600;
  color: #0F1D41;
  margin-bottom: 6px;
  text-align: center;
  width: 100%;
}

.user-info-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: border-color 0.2s ease;
}

.user-info-form input:focus {
  border-color: #0F1D41;
  outline: none;
}

/* Responsive tweak */
@media (max-width: 480px) {
  .user-info-form {
    max-width: 95%;
  }
  .user-info-form input {
    font-size: 0.95rem;
    padding: 10px;
  }
}


/* Container holding the two dropdowns */
.selector-group {
  max-width: 600px;         /* aligns with hero width */
  margin: 25px auto;        /* same vertical rhythm as name field */
  display: flex;
  flex-direction: column;
  gap: 22px;                /* equal spacing between controls */
}

/* Labels */
.selector-group label {
  font-weight: 600;
  color: #0F1D41;
  margin-bottom: 6px;
  display: block;
}

/* Dropdowns — larger to match the text box */
.selector-group select {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;       /* larger padding */
  font-size: 1.1rem;        /* slightly bigger text */
  line-height: 1.3;         /* taller control */
  min-height: 48px;         /* ensures visual height */
  border: 1px solid #ccc;
  border-radius: 8px;       /* match input corners */
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus polish */
.selector-group select:focus {
  border-color: #0F1D41;
  box-shadow: 0 0 0 2px rgba(15,29,65,0.15);
  outline: none;
}

/* Clubs row initially hidden */
.clubs-row {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .selector-group {
    width: 95%;
    gap: 18px;
  }
  .selector-group select {
    font-size: 1rem;
    padding: 12px 14px;
    min-height: 44px;
  }
}



#machformContainer {
  display: none;                 /* hidden until all fields filled */
  width: 80%;                    /* narrower than main content */
  max-width: 900px;              /* cap it on large screens */
  margin: 40px auto;             /* center horizontally with spacing above */
  padding: 25px;
  background: #ffffff;           /* solid white background */
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

@media (max-width: 768px) {
  #machformContainer {
    width: 100%;
    max-width: none;
    margin: 10px 0;
    padding: 15px;
    border-radius: 0;
    box-shadow: none;  /* optional: remove shadow for full-width clean look */
  }
}


/* When visible, restore normal display */
#machformContainer.active {
  display: block;
  visibility: visible;
  height: auto;
  overflow: visible;
  margin-top: 30px;  /* optional spacing above */
}

/* Hidden state: take up NO space, no white background */
#machformContainer.mf-hidden {
  display: none;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Visible state: now make it look like your old .form-wrapper card */
#machformContainer.mf-visible {
  display: block;
  visibility: visible;
  height: auto;
  overflow: visible;
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}


.vs-btn{
  display:inline-block;
  margin: 22px auto 0;
  padding: 12px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background:#0F1D41;
  border:1px solid transparent;
  border-radius:8px;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}
.vs-btn:hover,
.vs-btn:focus{
  background:#152a63;
  outline:none;
  box-shadow:0 6px 18px rgba(0,0,0,0.18);
}
@media (max-width: 768px) {
  /* Keep the sticky button as-is */
  .vs-btn {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    width: 100%;
    display: block;
    z-index: 100; /* below the dropdown when visible */
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* When the TS dropdown is open, slide the button out of the way */
  body.dropdown-open .vs-btn {
    transform: translateY(120%);
    opacity: 0.001;           /* avoid iOS hit-testing quirks */
    pointer-events: none;
  }

  /* Ensure the dropdown can float above */
  .ts-dropdown { 
    position: absolute; 
    z-index: 9999; 
  }

  /* Make sure no ancestor clips it */
  .selector-group,
  .clubs-row { 
    overflow: visible !important; 
  }
}


@media (max-width: 768px) {
  main {
    padding-bottom: calc(100px + 80px); /* footer height + button height */
  }

}

/* Header + nav */
.admin-header { max-width: 1100px; margin: 10px auto 20px; padding: 0 12px; }
.nav-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.nav-btn {
  flex: 1 1 200px; min-width: 160px; border: 1px solid #d6d9e0; background: #f7f8fb;
  padding: 10px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.nav-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); background: #ffffff; }
.nav-btn.active { border-color: #003366; box-shadow: 0 0 0 2px rgba(0, 51, 102, .15); background: #fff; }

/* Sections */
.section-wrap { max-width: 1100px; margin: 0 auto 40px; padding: 0 12px; }
.section {
  display: none; background: #ffffff; border: 1px solid #e8e8ee; border-radius: 12px;
  padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.section.active { display: block; }

/* Create QR inner layout */
.qr-grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }

/* Controls + buttons */
.select, .input, .btn { font: inherit; }
.select, .input {
  width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid #d6d9e0; border-radius: 8px; background: #fff;
  font-size: 16px; /* prevent iOS zoom */
}
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  padding: 10px 14px; border-radius: 10px; border: 1px solid #003366; background: #003366; color: #fff;
  font-weight: 600; cursor: pointer; transition: filter .15s ease;
}
.btn.secondary { background: #f7f8fb; color: #003366; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* QR card + preview (merged + responsive) */
.qr-card {
  border: 1px dashed #d6d9e0; border-radius: 12px; padding: 14px; text-align: center;
  max-width: 100%; overflow: hidden;
}
.qr-card h4 { margin: 0 0 10px; }
.qr-preview {
  display: inline-block; position: relative; background: #fff; padding: 10px; border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.05); width: 100%;
}
.qr-preview img {
  display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto;
}

/* Meta / notices */
.meta { margin-top: 10px; font-size: 13px; color: #333; word-break: break-word; overflow-wrap: anywhere; }
.notice { background: #f2f7ff; border: 1px solid #dbe8ff; color: #043463; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }

/* Safer sizing everywhere */
*, *::before, *::after { box-sizing: border-box; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .qr-grid { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 12px; }
}
@media (max-width: 780px) {
  .nav-btn { flex: 1 1 48%; min-width: 0; }
}
@media (max-width: 420px) {
  .nav-btn { flex: 1 1 100%; }
  .admin-header, .section-wrap { padding: 0 10px; }
  .field { margin-bottom: 10px; }
  .btnrow { gap: 8px; }
  .btn { padding: 9px 12px; }
}




/* refers to top part of checklist form*/
.is-hidden { display: none; }
