@import url('/assets/buttons.css');

:root {
  --brand-primary: #00572b;
  --brand-secondary: #95be16;
  --brand-accent: #0d94f4;
  --brand-sun: #ffa500;
  --backgroundColor: #f3fbe9;
  --surfaceColor: #ffffff;
  --white: #ffffff;
  --textDark: #04210f;
  --textMuted: #5c6f63;
  --buttonColor: var(--brand-secondary);
  --buttonText: #053317;
  --accentColor: var(--brand-primary);
  --ui-density-scale: 1;
  --ui-density-scale-desktop: 0.85;
  --pc-header-height: 0px;
  --pc-header-offset: 0px;
  --scrollbar-size: 12px;
  --scrollbar-track: rgba(4, 33, 15, 0.08);
  --scrollbar-thumb: #5aa0ff;
  --scrollbar-thumb-strong: #3b82f6;
  --scrollbar-thumb-contrast: #95be16;
  --surfaceBorder: rgba(0, 0, 0, 0.08);
  --tableStripe: #f7fff7;
  --headingColor: #04210f;
}

:root[data-theme='dark'] {
  --backgroundColor: #05070b;
  --surfaceColor: #111826;
  --textDark: #f8fafc;
  --textMuted: #94a3b8;
  --buttonText: #f8fafc;
  --surfaceBorder: rgba(255, 255, 255, 0.15);
  --tableStripe: rgba(255, 255, 255, 0.05);
  --headingColor: #f8fafc;
  --scrollbar-track: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb: #00aed9;
  --scrollbar-thumb-strong: #3b82f6;
  --scrollbar-thumb-contrast: #95be16;
}

@media (min-width: 1024px) {
  :root {
    --ui-density-scale: var(--ui-density-scale-desktop);
  }
}

* {
  font-family: "work sans", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

h2 {
  font-weight: 600;
  text-align: center;
}

.logo-img {
  max-width: 70%;
}

.small-logo-img {
  max-width: 40%;
}

.visually-hidden {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
  clip: rect(1px, 1px, 1px, 1px);
  /*maybe deprecated but we need to support legacy browsers */
  clip-path: inset(50%);
  /*modern browsers, clip-path works inwards from each corner*/
  white-space: nowrap;
  /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
}

.container {
  max-width: min(100%, calc(1000px * var(--ui-density-scale)));
  margin: auto;
  padding: 1em;
}

.content {
  background-color: var(--white);
  max-width: min(100%, calc(1000px * var(--ui-density-scale)));
  margin: auto !important;
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
}

.margin {
  margin: 1em;
  min-height: 100vh;
}

a {
  color: var(--brand-accent);
}

body {
  background-color: var(--backgroundColor);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb), var(--scrollbar-thumb-strong));
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-strong), var(--scrollbar-thumb-contrast));
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--scrollbar-thumb-contrast), var(--scrollbar-thumb-strong));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.hideVaccination,
#addVaccination {
  transition: 300ms ease-in-out;
}

.hideVaccination:hover,
#addVaccination:hover {
  cursor: pointer;
  transform: scale(1.02);
}

/* Styling for the logo SVG */
.cls-1 {
  fill: var(--orange);
}

.cls-2 {
  fill: var(--backgroundColor);
}

.cls-3 {
  fill: var(--white);
}

#logo {
  max-width: calc(400px * var(--ui-density-scale));
}

.flex {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.flex a {
  margin-bottom: 2rem;
}

.option {
  border: 2px solid var(--accentColor);
  width: calc(193px * var(--ui-density-scale));
  height: calc(184px * var(--ui-density-scale));
  border-radius: 10px;
  text-align: center;
  vertical-align: middle;
  display: flex;
  box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.15);
  transition: 300ms ease-in-out;
}

.option:hover {
  cursor: pointer;
  transform: scale(1.01);
}

.option p {
  max-width: 60%;
  margin: auto;
  margin-top: 0.5em;
}

.option-contents {
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
}

.header-logo {
  max-width: min(100%, calc(1000px * var(--ui-density-scale)));
  margin: auto;
  margin-top: 2em;
}

.logout {
  margin: 2rem;
  margin-bottom: 2em;
  color: var(--textDark, #04210f);
}

a {
  color: var(--orange);
}

.center,
.center p {
  font-family: "poppins", roboto, sans-serif !important;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media only screen and (max-width: 766px) {
  .option {
    width: 160px;
    height: 150px;
  }
}

@media only screen and (max-width: 580px) {
  .flex {
    flex-direction: column;
  }

  .option {
    width: 100%;
    height: 180px;
    margin: 1em 0;
  }

  .small-logo-img {
    max-width: 60%;
  }

  .tab {
    display: none !important;
  }

  .active-tab {
    display: flex !important;
    height: 50px !important;
  }

  .application-box {
    padding: 2em 1em !important;
  }

  .content {
    padding: 0;
  }
}

@media only screen and (max-width: 600px) {
  .primarySection,
  .generateReports {
    grid-template-columns: repeat(2, 1fr) important;
  }
}

/****************************
**** TABLE STYLES **********
***************************/

table {
  border-collapse: collapse;
  background: var(--surfaceColor);
  text-align: left;
  color: var(--textDark);
}

table thead tr {
  background: var(--backgroundColor);
}

th {
  color: #fff;
}

td,
th {
  padding: 0.5em;
}

tbody tr {
  color: var(--textMuted);
}

tbody tr:nth-child(even) {
  background-color: var(--tableStripe);
}

:root[data-theme="dark"] table {
  background: var(--bg-1, var(--surfaceColor));
}

:root[data-theme="dark"] tr:nth-child(even) {
  background: var(--tableStripe);
}

tbody tr:hover {
  color: var(--textDark);
}

.wrap-table {
  border-radius: 10px;
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.hero-body {
  text-align: center;
  padding: 1em 0;
}

.hero-body svg {
  width: 100%;
  max-width: calc(400px * var(--ui-density-scale));
  height: auto;
}

/* Login Form Styling */
.signup-form {
  max-width: min(100%, calc(600px * var(--ui-density-scale)));
  margin: auto;
}

.form-group {
  width: 100%;
  transition: all 0.3s;
}

.form-label {
  font-size: 1.1em;
  color: var(--textMuted);
  opacity: 1;
  transform: translateY(-1.5em) translateX(0.5em);
  transform-origin: 0 0;
  transition: all 0.3s;
  display: block;
  text-align: left;
  pointer-events: none;
}

.form-control {
  box-shadow: none;
  background-color: var(--surfaceColor);
  border-radius: 4px;
  width: 100%;
  border-color: var(--surfaceBorder);
  border-style: none none solid none;
  padding: 0.5em 0.5em;
  transition: all 0.5s;
  font-size: calc(18px * var(--ui-density-scale));
  color: var(--textDark);
}

.form-control::placeholder {
  color: transparent;
}

.form-control:focus {
  box-shadow: none;
  outline: none;
  border-color: var(--brand-accent);
}

.form-group:focus-within {
  transform: scale(1.005);
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
  transform: translateY(-3em) scale(0.8);
}

.form-links-right {
  text-align: right;
  margin-top: 2em;
  width: 100%;
}

.signup-form form {
  margin-top: 3em;
}

@media only screen and (max-width: 650px) {
  .content {
    padding: 1em;
  }
}

@media only screen and (max-width: 600px) {
  .primarySection,
  .generateReports {
    grid-template-columns: 2 1fr;
  }
}

/**************************************************
***************************************************
***************************************************/

:root {
  --lightText: #ffffff;
  --darkText: #00003e;
  --background: #ffffff;
  --secondary: #ffffff;
  --accent: #143a40;
  --hover: #ddb500;
  --darkBackground: #232935;
}

html {
  scroll-behavior: smooth;
  font-size: calc(16px * var(--ui-density-scale));
}

* {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  color: var(--headingColor);
}

.container {
  margin: auto;
  width: 90%;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.column {
  flex: 1 1 20rem;
}

.column a img {
  width: 100%;
}

.hidden {
  display: none;
}

table {
  border-spacing: 1;
  border-collapse: collapse;
  background: var(--surfaceColor);
  margin: 0 auto;
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
  table-layout: fixed;
  color: var(--textDark);
}

table thead tr {
  height: calc(60px * var(--ui-density-scale));
  background: var(--accentColor);
  color: #fff;
}

th {
  font-size: calc(18px * var(--ui-density-scale));
  color: #fff;
  line-height: 1.2;
  font-weight: unset;
}

tbody tr {
  font-size: calc(15px * var(--ui-density-scale));
  color: var(--textMuted);
  line-height: 1.2;
  font-weight: unset;
  height: calc(50px * var(--ui-density-scale));
}

thead,
tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

tbody tr:nth-child(even) {
  background-color: var(--tableStripe);
}

tbody tr:hover {
  color: var(--textDark);
  cursor: pointer;
}

.container-table {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: auto;
  min-height: 100vh;
}

.wrap-table {
  max-height: 95vh;
  position: relative;
  border-radius: 10px;
  width: 100%;
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: scroll;
}

.header-table,
.body-table {
  table-layout: fixed;
}

.body-container {
  max-height: 80vh;
  flex-grow: 1;
}

.limiter {
  width: 100%;
  margin: 0 auto;
}

thead,
tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
  /* This makes sure each row takes up the same space */
}

.popup {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 100;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 33px 30px;
  overflow: scroll;
}

form {
  width: 100%;
  margin: 1rem 0;
  border-radius: 10px;
}

.form-header {
  background-color: var(--accent);
  color: white;
  padding: 1rem;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.form-group {
  padding: 0.5rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.signup-form .form-group {
  display: block;
}

.signup-form .form-label {
  margin-top: -0.75rem;
}

.hero-body svg {
  margin: auto;
}

input,
select,
textarea,
label {
  padding: 0.5rem;
  width: 100%;
}

input,
select,
textarea {
  border-radius: 4px;
  border: 1px solid grey;
}

#closePopup:hover,
#closeAddPopup:hover {
  cursor: pointer;
}

.pages {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.pageInputs {
  margin: 0.25rem 0;
  display: flex;
  width: 100%;
}

.pageInputs input {
  flex-grow: 1;
}

.delete {
  margin-left: 1rem;
  background-color: red;
  color: white;
  border-radius: 4px;
  padding: 0.25rem;
  display: flex;
  vertical-align: middle;
  line-height: 1;
}

.addPage {
  background-color: green;
  color: white;
  border-radius: 4px;
  padding: 0.25rem;
  display: flex;
  vertical-align: middle;
  line-height: 1;
  text-align: center;
  margin-top: 0.5rem;
}

.addPage svg {
  margin: auto;
}

.delete:hover,
.addPage:hover {
  cursor: pointer;
}

@media only screen and (max-width: 1000px) {
  :root {
    --pc-header-offset: var(--pc-header-height, 0px);
  }

  .wrapper {
    flex-direction: column;
  }

  .limitter > .container-table {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .buttonsSection {
    width: 100% !important;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
  }

  .wrap-table {
    max-width: 90vw;
  }

  .form-group {
    flex-direction: column;
    padding: 0 1rem;
    gap: 0;
  }

  .popup {
    padding: 0.5rem;
    position: absolute;
  }
}

#themeToggle {
  --toggle-width: calc(60px * var(--ui-density-scale));
  --toggle-height: calc(30px * var(--ui-density-scale));
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toggle-width);
  height: var(--toggle-height);
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--toggle-height);
  background: none;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
}

#themeToggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--toggle-height);
  background: linear-gradient(
    120deg,
    rgba(148, 163, 184, 0.45),
    rgba(15, 23, 42, 0.85)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="light"] #themeToggle::before {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.9),
    rgba(224, 242, 254, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

#themeToggle::after {
  content: "🌙";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(var(--toggle-height) - 6px);
  height: calc(var(--toggle-height) - 6px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #0f172a);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
  color: #e0f2fe;
}

:root[data-theme="light"] #themeToggle::after {
  content: "☀️";
  transform: translateX(calc(var(--toggle-width) - var(--toggle-height)));
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b);
  color: #78350f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

#themeToggle:focus-visible {
  outline: 2px solid #95be16;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  #themeToggle::after,
  #themeToggle::before {
    transition: none;
  }
}

/* ============================================
   Hornborn Bespoke theme overrides
=============================================== */
body {
  background: radial-gradient(
      circle at 10% -20%,
      rgba(13, 148, 244, 0.25),
      transparent 55%
    ),
    linear-gradient(135deg, rgba(0, 87, 43, 0.95), rgba(0, 87, 43, 0.75)),
    var(--backgroundColor);
  color: var(--textDark);
  min-height: 100vh;
}

.content {
  background-color: var(--surfaceColor);
  border: 1px solid var(--surfaceBorder);
  box-shadow: 0 25px 50px -30px rgba(0, 0, 0, 0.75);
  color: var(--textDark);
}

.wrapper {
  display: flex;
  align-items: stretch;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  width: 100%;
}

.wrapper > section,
.wrapper > aside,
.wrapper > div.main-content {
  flex: 1 1 auto;
  min-width: 0;
}

.wrapper > .buttonsSection,
.wrapper > aside.buttonsSection {
  flex: 0 0 auto;
}

.margin {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
  border-radius: 18px;
}

a {
  color: var(--brand-accent);
}

.option {
  border: 2px solid var(--brand-secondary);
  background: var(--surfaceColor);
  box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.6);
}

.option-contents p {
  color: var(--textMuted);
}

table thead tr {
  background: var(--brand-primary);
}

tbody tr:hover {
  background-color: rgba(149, 190, 22, 0.25);
  color: var(--textDark);
}

.wrap-table {
  background: var(--surfaceColor);
  border: 1px solid var(--surfaceBorder);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(calc(220px * var(--ui-density-scale)), 1fr)
  );
  gap: 1.5rem;
  margin: 2rem 0;
}

.hero-card {
  background: var(--surfaceColor);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 20px 40px -35px rgba(0, 0, 0, 0.65);
  border: 1px solid var(--surfaceBorder);
}

.hero-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  margin-bottom: 0.35rem;
}

.hero-card p {
  margin: 0;
  color: var(--textMuted);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: rgba(13, 148, 244, 0.1);
  color: var(--brand-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.hero-logo {
  max-width: calc(260px * var(--ui-density-scale));
  width: 100%;
  margin: 0 auto 1rem;
  display: block;
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(
      145deg,
      rgba(0, 87, 43, 0.92),
      rgba(0, 87, 43, 0.8)
    );
  }

  .content {
    border-radius: 18px;
  }
}
.limitter {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--pc-header-offset, 0px));
}

.limitter > .wrap-table,
.limitter > .container-table {
  flex: 1 1 auto;
  min-height: 0;
}

.limitter > .container-table {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: 100%;
}

.limitter > .container-table > .wrap-table {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
