/*******************************************
 
--------------- GLOBAL STYLES --------------
 
*******************************************/

@import url("https://fonts.googleapis.com/icon?family=Material+Symbols");
@import url("https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined");
@import url("https://fonts.googleapis.com/icon?family=Material+Symbols+Rounded");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Quicksand:wght@300..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap");

:root {
    --L: 66.5%;
    --C: 0.197;
    --H_primary: 202.31;
    --H_secondary: 68.22;

    --active_shift: 0.1;

    --colour_primary: oklch(var(--L) var(--C) var(--H_primary));
    --colour_secondary: oklch(var(--L) var(--C) var(--H_secondary));
    --colour_fgd: oklch(30.61% 0.1036 257.36);
    --colour_orgd: oklch(59% 0.19769 35.001);
    --colour_bgd: #fdfdfd;
}

html[data-theme="dark"] {
    --L: 84.5%;
    --C: 0.197;
    --H_primary: 202.31;
    --H_secondary: 68.22;

    --active_shift: -0.15;

    --colour_primary: oklch(var(--L) var(--C) var(--H_primary));
    --colour_secondary: oklch(var(--L) var(--C) var(--H_secondary));
    --colour_fgd: oklch(90.61% 0.1036 257.36);
    --colour_orgd: oklch(90% 0.19769 35.001);
    --colour_bgd: oklch(8% 0.1036 257.36);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    background: var(--colour_bgd);
    font-family: Nunito, Helvetica, Tahoma, Arial, sans-serif;
    color: oklch(from var(--colour_fgd) l c h);
    overflow-wrap: anywhere;
}

body,
button,
.icon .button-label {
    font-size: clamp(1.2rem, 1rem + 0.5vw, 1.8rem);
}

*:not(body):not(body *) {
    background-color: oklch(from var(--colour_secondary) l c h / 0.9);
}

body {
    box-shadow: -15px 0px 50px oklch(from var(--colour_fgd) l c h / 0.3);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: Figtree, Nunito, Helvetica, Tahoma, Arial, sans-serif;
    font-weight: 600;
}

h1,
h2 {
    color: var(--colour_primary);
}

h4 {
    color: var(--colour_secondary);
}

p {
    max-width: 60ch;
}

a {
    color: var(--colour_primary);
    font-weight: 700;
    text-decoration: none;
}

/*******************************************
 
------------------ LAYOUT ------------------
 
*******************************************/

body {
    height: 100dvh;
    padding-top: 1dvh;
    padding-bottom: 1dvh;
    /*   width: 92vh; */
    /*   margin: 4vw; */
}

/* ----------- FLEX CLASSES ----------- */

.flex {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.flex_r {
    flex-direction: row;
    justify-content: space-between;
}

.flex-fill {
    flex: 1;
}

.flex-priority {
    flex: 2.5;
}

/* ----------- GRID LAYOUT ----------- */

body {
    display: grid;
    grid-template-columns: auto minmax(auto, 5fr) auto;
    grid-template-rows: auto minmax(auto, 2fr) auto;
    grid-template-areas:
    "lhs top  top  top  rhs"
    "lhs main main main rhs"
    "btm btm  btm  btm  btm";
    gap: 0.1rem;
}

@media (orientation: landscape) {
    body {
        grid-template-columns: auto repeat(1fr, 4);
        grid-template-rows: auto minmax(auto, 2fr) auto;
        grid-template-areas:
      "lhs top  top  top  top  rhs"
      "lhs main main main main rhs"
      "lhs main main main main rhs"
      "lhs btm  btm  btm  btm  rhs";
    }
}

main,
top,
btm,
lhs,
rhs {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    margin: 1vh;
}

top,
btm {
    flex-direction: row;
}

top {
    grid-area: top;
    margin: 2vh;
}

main {
    grid-area: main;
    flex-direction: column;
    flex-wrap: wrap;
    flex: 1;
    align-items: center;
    gap: 3vh;
    margin: 0;
    width: 100%;
    overflow: hidden;
}

lhs {
    grid-area: lhs;
}

rhs {
    grid-area: rhs;
}

btm {
    grid-area: btm;
    align-items: stretch;
    gap: 4vw;
    margin: 2vh;
    padding-left: 3vw;
    padding-right: 3vw;
}

/* -------- COMPONENT LAYOUT -------- */

h1,
h2,
h3,
h4,
h5,
p,
a {
    text-align: center;
}

img {
    object-fit: contain;
    width: clamp(40%, 70vw, 100%);
    max-height: 50vh;
}

/* -------- SIDEBAR -------- */

.sidebar {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 33px;
    border-left: 7px double oklch(from var(--colour_secondary) calc(l + 0.1) c h / 0.4);
    border-right: 7px double oklch(from var(--colour_secondary) calc(l + 0.1) c h / 0.4);
    background-color: oklch(
            from var(--colour_secondary) calc(l + 0.1) c h / 0.01
    );
}

lhs.sidebar {
    padding-left: 0.5rem;
    border-left: 0;
    box-shadow: 3px 3px 4px oklch(from var(--colour_secondary) calc(l + 0.1) c h / 0.1);
}

rhs.sidebar {
    padding-right: 0.5rem;
    border-right: 0;
    box-shadow: -3px 3px 4px oklch(from var(--colour_secondary) calc(l + 0.1) c h / 0.1);
}

.tab-content:not(.active-tab) {
    display: none; /* Hide non-active tabs */
}

/*******************************************
 
---------------- COMPONENTS ----------------
 
*******************************************/

input,
select {
    font-size: clamp(1.2rem, 1rem + 0.5vw, 2rem);
    font-weight: 600;

    height: calc(4.5vh + 2vw);
    width: clamp(60vw, 70vw, 600px);
    border: 1px solid oklch(from var(--colour_primary) l c h / 0.1);
    border-radius: 37px;
    padding-left: 1.5rem;
    box-shadow: -2px -2px 1px oklch(from var(--colour_primary) l c h / 0.5);

    background-color: oklch(from var(--colour_primary) l c h / 0.03);
    outline-color: var(--colour_primary);
}

input::placeholder {
    font-style: italic;
    color: oklch(from var(--colour_primary) l c h / 0.7);
    font-weight: 100;
}

#hits {
    display: grid;
}

.ais-Hits-list {
    list-style-type: none; /* Remove the numbering or bullets */
    padding: 0;
    margin: 0;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* -------- LAYERS -------- */

#hits article,
#userForm,
.tab-content,
.memberlist {
    box-shadow: 0 4px 6px oklch(from var(--colour_fgd) l c h / 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background-color: var(--colour_bgd);
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#hits article:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#hits .parent {
    display: flex;
    align-items: center;
}

.memberlist {
    justify-content: flex-start;
    min-width: 40vw;
    max-width: 55vw;
    gap: 1.5rem;
    border-left: 7px solid oklch(from var(--colour_secondary) l c h / 0.7);
}

.pending-placeholder {
    border-left-color: oklch(from var(--colour_secondary) l 0 h / 0.7);
}

.inset {
    border-radius: 12px;
    box-shadow: inset 0 2px 2px oklch(from var(--colour_primary) l c h / 0.1);
    padding: 20px;
    padding-left: calc((100% - max-content) / 2);
    width: 100%;
    margin-top: 15px;
    background-color: oklch(from var(--colour_primary) l c h / 0.005);
    gap: 10px;
}

.inset * {
    background-color: transparent;
}

#hits article {
    border-left: 7px solid oklch(from var(--colour_primary) l c h / 0.4);
    max-width: clamp(60vw, 70vw, 600px);
}

#summary-container article {
    width: 100%;
}

.dock {
    background-color: oklch(from var(--colour_primary) l c h / 0.07);
    border-radius: 100px;
    box-shadow: 1px 5px 10px 1px oklch(from var(--colour_fgd) l c h / 0.1);
    max-height: 13vh;
}

/* -------- TABS -------- */

.tab-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-content: center;
    font-size: clamp(1.1rem, 1.15rem + 0.5vw, 2rem);
    padding: 15px;
}

.tab-container * {
    max-width: 100%;
}

#summary-container {
    gap: 50px;
}

.tab-content {
    padding: 32px;
    width: 90%;
    border-top: 7px solid var(--colour_primary);
}

.tab-content h2 {
    padding-bottom: 10px;
}

.tab-content h3,
.tab-content h4,
.tab-content h5 {
    color: var(--colour_secondary);
}

#tab1 {
    padding-bottom: 4rem;
}

.year-break {
    margin-top: 3rem;
}

.event-card {
    display: inline-block;
    text-align: left;
}

.event-date {
    font-weight: 300;
}

.event-name {
    font-weight: 600;
}

.activity {
    gap: 10px;
}

.signup-date {
    font-size: 1.2rem;
}

/* -------- BUTTONS -------- */

button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"],
.icon,
.textbutton,
.icon-stack,
.button-label,
.material-symbols-rounded,
.material-symbols-outlined,
form button .material-symbols-rounded {
    color: var(--colour_primary);
    background-color: transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border: 0;
}

button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"] {
    /* flex: 1; */
    max-width: 25vw;
    border-radius: 33px;
    padding: 1.2vh;

    text-decoration: none;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.1rem;

    cursor: pointer;
}

.button-primary,
.button-primary .button-label,
.button-primary .material-symbols-rounded,
.button-primary .material-symbols-outlined {
    color: var(--colour_fgd);
}

.material-symbols-rounded,
.material-symbols-outlined {
    font-size: clamp(2.5rem, 2rem + 0.5vw, 3rem);
}

button.icon {
    font-size: 0;
}

.sidebar .icon {
    padding: 0;
    letter-spacing: 0;
}

.dock .icon {
    min-width: 64px;
    min-height: 80px;
    /*   padding: 0; */
    border: none;
    background-color: transparent;
}

.icon-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.dock .icon-stack .material-symbols-rounded,
.dock .icon-stack .material-symbols-outlined {
    z-index: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
}

.dock button .button-label {
    z-index: 2;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    white-space: nowrap;
    transition: opacity 0.2s ease-in-out;
}

.docklabels button .button-label {
    display: inline-block;
}

.dock .material-symbols-rounded,
.dock .material-symbols-outlined {
    font-size: clamp(3rem, 4.2rem + 0.1vw, 5.5rem);
}

/* Hide the label initially (default) */
.dock .button-label {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s 0.3s; /* Ensure visibility delay */
}

/* When the button is pressed (active state), show label */
.dock button:active .button-label {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0s 0s; /* Instantly show label when pressed */
}

/* Keyframe animation to control appearance timing */
@keyframes showLabel {
    0% {
        visibility: hidden;
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
    }
}

/* The label only shows on press, and disappears once released */
.dock button:active .button-label {
    animation: showLabel 1.3s forwards; /* Long press animation */
}

/* Reset label to hidden when released */
.dock button:not(:active) .button-label {
    visibility: hidden;
    opacity: 0;
}


.current-page .button-label,
.current-page .material-symbols-rounded,
.current-page .material-symbols-outlined {
    color: var(--colour_secondary);
}

.sidebar :not(.active-tab) .material-symbols-rounded,
.sidebar :not(.active-tab) .material-symbols-outlined,
.sidebar :not(.active-tab) .button-label,
.empty,
.empty.material-symbols-rounded {
    color: oklch(from var(--colour_secondary) l calc(c - 0.15) h);
}

.textbutton {
    border: 0.1rem solid var(--colour_primary);
    box-shadow: 0px 4px 10px oklch(from var(--colour_fgd) l c h / 0.1);
    flex: 1;
    padding: 2vh;
    background-color: oklch(from var(--colour_primary) l c h / 0.05);
    font-family: Figtree, Nunito, Helvetica, Tahoma, Arial, sans-serif;
}

@media (orientation: portrait) {
    .portrait-line-break {
        display: block;
        page-break-before: always;
    }
}

@media (orientation: landscape) {
    .portrait-line-break {
        display: none;
    }
}

.textbutton:hover {
    background-color: oklch(
            from var(--colour_primary) calc(l + var(--active_shift)) c h / 0.2
    );
}

.textbutton.button-primary {
    border: none;
    box-shadow: 0px 4px 10px oklch(from var(--colour_fgd) l c h / 0.2);
    background-color: var(--colour_primary);
    color: var(--colour_bgd);
}

.textbutton.button-primary:hover {
    background-color: oklch(
            from var(--colour_primary) calc(l + var(--active_shift)) c h
    );
}

btm button.textbutton {
    font-size: clamp(1.3rem, 1.3rem + 0.5vw, 3rem);
    margin-bottom: 17px;
    padding: 1.2rem;
    min-height: 60px;
}


.floatbutton {
    position: absolute;
    left: 75%;
    transform: translateY(-20%);

    background: oklch(from var(--colour_bgd) l c h / 0.8);
    border: none;
    border-radius: 33px;
    box-shadow: 1px 3px 6px oklch(from var(--colour_primary) l c h / 0.2);
    padding: 11px;

    cursor: pointer;
}

.floatbutton * {
    color: var(--colour_secondary);
}

.button-muted {
    color: oklch(from var(--colour_primary) l 0 h);
    border-color: oklch(from var(--colour_primary) l 0 h);
    background-color: oklch(from var(--colour_primary) l 0 h / 0.05);
}

/* -------- CHECKBOXES -------- */

[type="checkbox"]:not(:checked),
[type="checkbox"]:checked {
    position: absolute;
    left: -9999px;
}

[type="checkbox"]:not(:checked) + label,
[type="checkbox"]:checked + label {
    position: relative;
    padding-left: calc(2rem + 1.5vw);
    cursor: pointer;
}

[type="checkbox"]:not(:checked) + label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: calc(1.5rem + 0.7vw);
    height: calc(1.5rem + 0.7vw);
    border: 2px solid var(--colour_secondary);
    background-color: oklch(from var(--colour_secondary) l c h / 0.02);
    border-radius: 25%;
}

[type="checkbox"]:checked + label:after {
    content: "✔";
    font-size: calc(0.8rem + 0.7vw);
    text-align: center;
    color: var(--colour_bgd);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: calc(1.5rem + 0.7vw);
    height: calc(1.5rem + 0.7vw);
    border: 2px solid oklch(from var(--colour_primary) l c h);
    background-color: var(--colour_primary);
    border-radius: 25%;
}

.checkbox-item label {
    display: inline-block;
    margin-left: 1rem;
    text-align: left;
}

/* @media (orientation: landscape) { */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates two equal columns */
}

/* -------- CAMERA -------- */

video {
    --s: 50px; /* size of the corners */
    --t: 10px; /* thickness of the border */
    --g: 15px; /* gap between border and content */

    border: var(--t) solid var(--colour_primary);
    border-radius: 2%;
    padding: calc(var(--g) + var(--t));
    max-width: 60vw;
    max-height: 40vh;
    /* aspect-ratio: 1; */
    outline: var(--t) solid var(--colour_primary); /* border color */
    outline-offset: calc(-1 * var(--t));
    mask: conic-gradient(#000 0 0) content-box,
    conic-gradient(at var(--s) var(--s), #0000 75%, #000 0) 0 0 /
      calc(100% - var(--s)) calc(100% - var(--s));
}

#barcodeInput {
    max-width: 40vw;
}

.video-container {
    display: flex;
    align-items: center; /* Vertically center the video and button */
    position: relative;
}

#switchBtn {
    position: absolute;
    right: -100px; /* Position button slightly to the right of the video */
    top: 50%;
    transform: translateY(-50%); /* Center the button vertically */
    z-index: 1; /* Ensure button is above the video */
}

/* -------- TOGGLES -------- */

/* .theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}
 */

.theme-switch input {
    display: none;
}

.slider {
    background-color: oklch(from var(--colour_secondary) l c h / 0.75);
    cursor: pointer;
    top: 2.4vh;
    right: 2vh;
    position: absolute;
    width: 65px;
    height: 39px;
    transition: 0.4s;
}

.slider:before {
    background-color: var(--colour_bgd);
    top: 6px;
    right: 8px;
    content: "";
    height: 26px;
    width: 26px;
    position: absolute;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #404040;
}

input:checked + .slider:before {
    transform: translateX(-24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/*-------- MODALS --------*/

/*
=========================================
   MODAL ROOT (replaces dialog[open])
=========================================
*/
.modal {
    z-index: 11;

    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;

    background-color: rgba(125, 125, 125, 0.5);
    border: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

/*
=========================================
   PANEL (replaces dialog[open] article)
=========================================
*/

.modal-panel {
    z-index: 2;

    box-shadow: 0px 0px 1000px var(--colour_primary);
    border-bottom: 4px solid oklch(from var(--colour_primary) l c h / 0.8);
    border-radius: 10px;

    font-size: 1.3rem;

    height: auto;
    max-height: 95%;
    width: auto;
    min-width: 65%;
    max-width: 80%;

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0.2rem;
    margin: auto;
    /*margin-top: 0.1rem;*/

    background: white;
}

/* Make modal content vertical by default */
.modal-panel * {
    /* display: flex; */
    flex-direction: column;
}


/*
=========================================
   HEADER (replaces dialog top)
=========================================
*/

.modal-header {
    background-color: var(--colour_primary);
    border-radius: 10px 10px 0 0;
}

.modal-header h1 {
    color: var(--colour_bgd);
    background-color: transparent;
    padding: 15px 0;
}

/*
=========================================
   CONTENT
=========================================
*/

.modal-panel p {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/*
=========================================
   OPTIONS ROW
=========================================
*/

.modal .options {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    color: var(--colour_secondary);
    padding-top: 5px;
}


/*
=========================================
   FOOTER
=========================================
*/

.modal-footer {
    z-index: 3;
    position: relative;
    bottom: 3rem;
    display: grid;
    grid-auto-flow: row dense;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 4em;
    /*gap: 0em 3em;*/
    margin: 1em;
    grid-template-areas:
    "modal-accept-buton modal-close-button modal-area-2";
    justify-content: center;
    align-content: center;
    align-items: center;
    border-radius: inherit;
}

.modal-close-button {
    grid-area: modal-close-button;
    margin: 1em;
}

.modal-area-2 {
    grid-area: modal-area-2;
}

.modal-accept-buton {
    grid-area: modal-accept-buton;
}

.modal-footer a {
    font-size: 1.4rem;
}

.modal-footer h3 a {
    padding-top: 0 !important;
}

.modal-footer a .material-symbols-rounded {
    font-size: 3rem;
    padding: 2px;
    border-radius: 33px;
    box-shadow: 0px 2px 5px var(--colour_primary);
}

/*
=========================================
   VARIANTS
=========================================
*/

#errorModal .modal-panel,
.warningModal .modal-panel {
    border-bottom-color: red;
    box-shadow: 0px 0px 1000px red;
}

#errorModal .modal-panel *:not(h1),
.warningModal .modal-panel *:not(h1) {
    color: red;
}

#errorModal .modal-header,
.warningModal .modal-header {
    background-color: red;
}

#errorModal .modal-footer a .material-symbols-rounded,
.warningModal .modal-footer a .material-symbols-rounded {
    box-shadow: 0px 2px 5px red;
}

#successModal .modal-footer a {
    box-shadow: 0px 1px 2px 1px var(--colour_primary) !important;
}

#successModal .modal-footer a * {
    color: var(--colour_primary) !important;
}

#errorModal .modal-footer a {
    box-shadow: 0px 1px 2px 1px red !important;
}

/* Default modal styling with */

dialog[open] {
    z-index: 10;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;


    background-color: rgba(125, 125, 125, 0.5);
    border: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

dialog[open] article {
    z-index: 11;

    box-shadow: 0px 0px 1000px var(--colour_primary);
    border-bottom: 4px solid oklch(from var(--colour_primary) l c h / 0.8);
    border-radius: 10px;

    font-size: 1.3rem;

    height: auto;
    min-height: 30%;
    max-height: 80%;
    width: auto;
    min-width: 65%;
    max-width: 80%;

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 10px;
}

dialog * {
    display: flex;
    flex-direction: column;
}

dialog article .options {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    color: var(--colour_secondary);
    padding-top: 5px;
}

dialog top {
    background-color: var(--colour_primary);
    border-radius: 10px;
}

dialog h1 {
    color: var(--colour_bgd);
    background-color: transparent;
    padding-top: 15px;
    padding-bottom: 15px;
}

#errorModal article,
.warningModal article {
    border-bottom-color: red;
}

#errorModal *:not(h1),
.warningModal *:not(h1) {
    color: red;
}

#errorModal top,
.warningModal top {
    background-color: red;
    border-radius: inherit;
}

#errorModal article,
.warningModal article {
    box-shadow: 0px 0px 1000px red;
}

dialog p {
    padding-left: 2rem;
    padding-right: 2rem;
}

dialog footer {
    align-items: center;
    border-radius: inherit;
}

dialog footer a {
    font-size: 1.4rem;
}

dialog footer h3 a {
    padding-top: 0 !important;
}

dialog footer a .material-symbols-rounded {
    font-size: 3rem;
    padding: 2px;
    border-radius: 33px;
    box-shadow: 0px 2px 5px var(--colour_primary);
}

#errorModal footer a .material-symbols-rounded,
.warningModal footer a .material-symbols-rounded {
    box-shadow: 0px 2px 5px red;
}

#successModal footer a {
    box-shadow: 0px 1px 2px 1px var(--colour_primary) !important;
}

#successModal footer a * {
    color: var(--colour_primary) !important;
}

#errorModal footer a {
    box-shadow: 0px 1px 2px 1px red !important;
}

.modal-buttons {
    /*display: flex;*/
    align-items: center;
    /*display: grid;*/
    /*grid-template-columns: 0.4fr 2.2fr 0.4fr;*/
    /*grid-template-rows: 1fr 1fr 1fr;*/
    /*gap: 0px 0px;*/
    /*grid-template-areas:*/
    /*". Button-zone ."*/
    /*". Button-zone ."*/
    /*". Button-zone .";*/
}

.modal-buttons .options {
    display: grid;
    grid-auto-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr;
    gap: 0px 0px;
    grid-area: Button-zone;
}

#renewButton {
    color: var(--colour_primary);
    font-size: 1.45rem;
    font-weight: 800;
}

#closeExpiryModal {
    color: oklch(from var(--colour_primary) 0.6 0 h);
    font-size: 1.35rem;
    font-weight: 600;
}

.group {
    gap: 20px;
}

/*
===========================================
     Custom Event types in grid
===========================================
 */

#event-grid {
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 0em 3em;
    justify-content: center;
    align-content: center;
}


.scroll-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;

    height: 500px; /* Fixed height */
    overflow-y: auto; /* Vertical scroll */
    overflow-x: hidden;

    border-radius: 12px;
    background: #f8f9fb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Grid layout */
.scroll-grid {
    display: grid;
    grid-auto-flow: row dense;
    grid-auto-rows: 1fr;
    grid-template-columns: 1fr 1fr;
    /*gap: 0em 3em;*/
    justify-content: center;
    align-content: center;
    /*grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));*/
    gap: 1rem;
}

/* Card */
.grid-card {
    display: flex;
    align-items: center;
    gap: 1rem;

    padding: 1rem;
    border-radius: 12px;

    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);

    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* Hover effect */
.grid-card:hover {
    background: #eef2ff;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}


/* Text */
.grid-card .name {
    font-weight: 600;
    color: #111827;
}


/* Optional scrollbar styling? */
.scroll-grid-container::-webkit-scrollbar {
    width: 8px;
}

.scroll-grid-container::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 4px;
}


/*******************************************
 
------------------- FORM -------------------
 
*******************************************/

/* -------- FORM DESIGN -------- */

#userForm input,
form select {
    height: 2rem;
    width: 92%;
    border-radius: 13px;
    font-size: 1rem;
    border: 1px solid oklch(from var(--colour_primary) l c h / 0.3);
    box-shadow: 0px -1px 1px oklch(from var(--colour_primary) l c h / 0.2);
    padding-left: 1rem;
    font-weight: 400;
}

form label {
    font-size: 1.1rem;
    font-weight: bold;
    background-color: transparent;
    color: oklch(from var(--colour_primary) 0.55 c h);
}

form h2,
form h3,
form h4 {
    color: var(--colour_secondary);
    text-align: left;
}

form .material-symbols-rounded,
form .material-symbols-outlined {
    color: var(--colour_secondary);
    font-size: clamp(1rem, 2.5rem + 0.5vw, 10vw);
    text-align: left;
}

/* -------- SIGN UP FORM -------- */

#userForm {
    display: grid;
    box-sizing: border-box;

    height: 97%;
    max-width: 97%;
    /* background-color: oklch(from var(--colour_secondary) l c h / 0.03); */

    grid-template-columns: auto repeat(3, 1fr) 25px auto repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr) auto repeat(2, 1fr) auto repeat(3, 1fr);
    grid-template-areas:
    "name-i name-1 name-2 name-2 ...... addr-i addr-f addr-f addr-f"
    "...... ...... name-3 name-3 ...... ...... addr-1 addr-1 addr-1"
    "...... ...... ...... ...... ...... ...... ...... ...... ......"
    "comm-i comm-1 comm-1 comm-1 ...... ...... addr-2 addr-2 addr-2"
    "...... comm-2 comm-2 comm-2 ...... ...... addr-3 addr-3 addr-3"
    "...... ...... ...... ...... ...... ...... ...... ...... ......"
    "othr-i othr-3 othr-3 othr-3 ...... ...... addr-4 addr-4 addr-4"
    "...... othr-1 othr-1 othr-1 ...... ...... addr-5 addr-5 addr-5"
    "othr-2 othr-2 othr-2 othr-2 othr-2 othr-2 ...... ...... ......";

    grid-auto-flow: row;

    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-right: 3%;
    row-gap: 23px;

    border-top: 4px solid var(--colour_primary);
}

/* #userForm {
 
	grid-template-columns: auto repeat(2, 1fr) 25px auto repeat(2, 1fr);
	grid-template-rows: repeat(6, 1fr) auto 1fr;
	grid-template-areas:
		"name-i name-1 name-1 ...... comm-i comm-1 comm-1"
		"...... name-2 name-2 ...... ...... comm-2 comm-2"
		"addr-i addr-f addr-f addr-f addr-f ...... ......"
		"...... addr-1 addr-1 ...... ...... addr-3 addr-3"
		"...... addr-2 addr-2 ...... ...... addr-4 addr-4"
		"...... ...... ...... ...... ...... addr-5 addr-5"
		"...... ...... ...... ...... ...... ...... ......"
		"othr-i othr-1 othr-1 othr-1 othr-2 othr-2 othr-2";
 
	} */

@media (orientation: landscape) {
    #userForm {
        grid-template-columns: auto repeat(4, 1fr) 20px auto 3fr;
        grid-template-rows: repeat(2, 1fr) auto repeat(4, 1fr);
        grid-template-areas:
      "name-i name-1 name-2 name-2 name-2 ...... comm-i comm-1"
      "...... ...... name-3 name-3 name-3 ...... ...... comm-2"
      "...... ...... ...... ...... ...... ...... ...... ......"
      "addr-i addr-f addr-f addr-f ...... ...... othr-i othr-3"
      "...... addr-1 addr-1 addr-3 addr-3 ...... ...... othr-1"
      "...... addr-2 addr-2 addr-4 addr-4 ...... ...... othr-2"
      "...... ...... addr-5 addr-5 ...... ...... ...... ......";
    }
}

.name-i,
.name-1,
.name-2,
.name-3,
.comm-i,
.comm-1,
.comm-2,
.addr-i,
.addr-f,
.addr-1,
.addr-2,
.addr-3,
.addr-4,
.addr-5,
.othr-i,
.othr-1,
.othr-2,
.othr-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    background-color: transparent;
}

.name-i,
.comm-i,
.addr-i,
.othr-i {
    justify-content: flex-start;
    padding-top: 0rem;
    padding-left: 0.5rem;
}

.name-i {
    grid-area: name-i;
}

.name-1 {
    grid-area: name-1;
}

.name-2 {
    grid-area: name-2;
}

.name-3 {
    grid-area: name-3;
}

.comm-i {
    grid-area: comm-i;
}

.comm-1 {
    grid-area: comm-1;
}

.comm-2 {
    grid-area: comm-2;
}

.addr-i {
    grid-area: addr-i;
}

.addr-f {
    grid-area: addr-f;
    flex-direction: row;
    justify-content: flex-start;
    column-gap: 0.5rem;
}

.addr-1 {
    grid-area: addr-1;
}

.addr-2 {
    grid-area: addr-2;
}

.addr-3 {
    grid-area: addr-3;
}

.addr-4 {
    grid-area: addr-4;
}

.addr-5 {
    grid-area: addr-5;
}

.othr-i {
    grid-area: othr-i;
}

.othr-1 {
    grid-area: othr-1;
}

.othr-2 {
    grid-area: othr-2;
}

.othr-3 {
    grid-area: othr-3;
}

.addr1.form-column {
    padding-top: 2rem;
}

input#idpc-input,
input#idpc-select-container {
    min-width: 30%;
    /* width: 40%; */
    height: 2rem;
}

#styled_button {
    display: flex;
    align-content: right;
    justify-content: center;
    max-width: 5%;
    /*align-content: center;*/
    padding: 0;
}

#styled_button * {
    color: oklch(from var(--colour_primary) 0.55 c h);
    font-size: 2rem;
}

#styled_button .disabled-message {
    color: red;
    font-size: 14px;
    margin-left: 10px;
    font-style: italic;
    display: none;
}

#getaddress_dropdown {
    margin-left: 1rem;
}

#postcode_lookup {
    padding-top: 20px;
}

#postcode_lookup .material-symbols-outlined {
    padding-left: 20px;
}

/* -------- BARCODE FORM -------- */

.barcode {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.barcode button {
    padding: 0;
    padding-left: 15px;
    padding-right: 15px;
    box-shadow: 7px 12px 8px -5px oklch(from var(--colour_primary) l c h / 0.2);
    border-top: 1px solid oklch(from var(--colour_primary) l c h / 0.1);
}

.barcode button:active {
    background-color: oklch(from var(--colour_primary) l c h / 0.3);
}

#barcodeInput {
    width: clamp(50vw, 60vw, 70vw);
    margin-left: calc(3rem + 15px);
}

/* -------- CHECKBOX -------- */

form .checkbox-group {
    display: grid;
    gap: 1rem;
    padding-left: 4.5%;
}

/* -------- PIN CODE -------- */

#pinInput {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;

    text-align: center;
    font-size: 24px;
    letter-spacing: 3px;
}

/*******************************************
 
--------------- MAJOR CLASSES --------------
 
*******************************************/

.scroll {
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    top: 0;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
}

.nowrap {
    white-space: nowrap;
}

.breakable {
    text-align: inherit;
    word-break: break-all;
}

.padding-horiz {
    padding-left: 7%;
    padding-right: 7%;
}

.divleft {
    display: flex;
    flex-direction: column;
    /*align-items: flex-start;*/
    max-width: 80%;
    gap: 7px;
}

dialog .divleft {
    max-width: 100%;
}

.divright {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 80%;
    gap: 10px;
}

.level {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1ch;
}

.value p {
    text-align: left;
}

top.focal {
    padding-top: 20px;
}

.focaltext {
    color: var(--colour_primary);
    font-weight: 700;
    letter-spacing: 0.25rem;
    text-transform: uppercase;
}

.colour_secondary {
    color: var(--colour_secondary);
}

.unimplemented {
    display: none;
}

/* Prevent selection for everything */
body, * {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none;

    -webkit-touch-callout: none; /* Prevent callout (copy/paste menu) on iOS */
}

/* Allow selection in input */
input {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;

    -webkit-touch-callout: default;
}
