/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Encode+Sans+Expanded:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Root pseudo class and variable declarations */

:root {
    --main-element-background: #8a8a8a;
    --main-element-border: #3e3e3e;
    --background-color: #c6c6c6;
}

/* Main elements */
body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    font-family: 'Encode Sans Expanded', sans-serif;
}

.large-text {
    font-size: 40px;
    font-weight: bold;
}

.medium-text {
    font-size: 20px;
    font-weight: bold;
}

.heading-text {
    border-bottom: black 1px solid;
    padding: 5px;
}

.warning {
    color: red;
}

/* Layout elements */

/* Navbar */
nav {
    background-color: var(--main-element-background);
    margin: 0;
    padding: 0 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    margin: 0;
    padding: 0.5rem;
    display: flex;
    gap: 20px;
    align-items: end;
}

nav ul li {
    display: inline-block;
    list-style: none;
}

nav > ul > li > a > img {
    height: 5rem;
}

/* Style The Dropdown Menu Button */
.dropdown-menu-button {
    background-color: transparent;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* The container <div> - needed to position the dropdown content */
.dropdown-menu {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-menu-content {
    display: none;
    position: absolute;
    background-color: transparent;
    backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border: solid 1px var(--main-element-border);
    border-radius: 5px;
}

/* Links inside the dropdown */
.dropdown-menu-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 5px;
}

/* Text inside the dropdown */
.dropdown-menu-content p {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 5px;
}

/* Change color of dropdown links on hover */
.dropdown-menu-content a:hover {background: color-mix(in srgb, var(--main-element-background) 20%, transparent);}

/* Show the dropdown menu on hover */
.dropdown-menu:hover .dropdown-menu-content {
    display: block;
}

.user_data {
    display: flex;
    gap: 10px;
    align-items: center;
}

.small-btn {
    height: 30px !important;
    width: 90px !important;
    font-size: 15px !important;
    font-weight: normal !important;
}

.user_data > div {
    font-family: 'Encode Sans Expanded', sans-serif;
    font-size: 15px;
}

/* Main contents */

.layout-content {
    margin: 0.5rem;
}

/* Action elements */

.action-selector form {
    display: flex;
    margin-top: 20em;
    justify-content: center;
    gap: 33%;
}

/* Buttons */
.btn {
    height: 80px;
    width: 240px;
    border-radius: 10px;
    font-size: 30px;
    font-weight: bold;
    border: var(--main-element-border) solid 2px;
    background-color: var(--main-element-background);
    box-shadow: inset 0px 0px 1px 1px var(--main-element-border), 0px 0px 1px 1px var(--main-element-border);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--main-element-border);
}

a {
    text-decoration: none;
}

/* PIN page */

.pin-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 5em;
}

.pin {
    background-color: var(--main-element-background);
    height: 120px;
    width: 250px;
    border: black solid 1px;
    border-radius: 10px;
    display: flex;               /* Use flex to center input */
    align-items: center;         /* Vertically center */
    justify-content: center;     /* Horizontally center */
}

.pin input {
    width: 100%;                 /* Fill available width */
    border: none;
    background-color: transparent;
    font-size: 75px;
    font-weight: bold;
    text-align: center;          /* Horizontally center text */
}

.pin input:focus {
    outline: none;
}

.pin-submit-section {
    display: flex;
    justify-content: center;
    margin-top: 5em;
}

.error-msg {
    color: red;
    text-align: center;
    margin-top: 5em;
    margin-bottom: 5em;
    font-size: 30px;
    font-weight: bold;
}

/* Check In/Out page */

.user-action {
    display: grid;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 5em;
}

.user-section {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: 400px auto;
}

.done-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5em;
}

/* Loading spinner */
.loader {
    font-size: 10px;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    text-indent: -9999em;
    animation: mulShdSpin 1.1s infinite ease;
    transform: translateZ(0);
    display: block;

}
@keyframes mulShdSpin {
    0%,
    100% {
        box-shadow: 0em -2.6em 0em 0em #000000, 1.8em -1.8em 0 0em rgba(0,0,0, 0.2), 2.5em 0em 0 0em rgba(0,0,0, 0.2), 1.75em 1.75em 0 0em rgba(0,0,0, 0.2), 0em 2.5em 0 0em rgba(0,0,0, 0.2), -1.8em 1.8em 0 0em rgba(0,0,0, 0.2), -2.6em 0em 0 0em rgba(0,0,0, 0.5), -1.8em -1.8em 0 0em rgba(0,0,0, 0.7);
    }
    12.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.7), 1.8em -1.8em 0 0em #000000, 2.5em 0em 0 0em rgba(0,0,0, 0.2), 1.75em 1.75em 0 0em rgba(0,0,0, 0.2), 0em 2.5em 0 0em rgba(0,0,0, 0.2), -1.8em 1.8em 0 0em rgba(0,0,0, 0.2), -2.6em 0em 0 0em rgba(0,0,0, 0.2), -1.8em -1.8em 0 0em rgba(0,0,0, 0.5);
    }
    25% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.5), 1.8em -1.8em 0 0em rgba(0,0,0, 0.7), 2.5em 0em 0 0em #000000, 1.75em 1.75em 0 0em rgba(0,0,0, 0.2), 0em 2.5em 0 0em rgba(0,0,0, 0.2), -1.8em 1.8em 0 0em rgba(0,0,0, 0.2), -2.6em 0em 0 0em rgba(0,0,0, 0.2), -1.8em -1.8em 0 0em rgba(0,0,0, 0.2);
    }
    37.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.2), 1.8em -1.8em 0 0em rgba(0,0,0, 0.5), 2.5em 0em 0 0em rgba(0,0,0, 0.7), 1.75em 1.75em 0 0em #000000, 0em 2.5em 0 0em rgba(0,0,0, 0.2), -1.8em 1.8em 0 0em rgba(0,0,0, 0.2), -2.6em 0em 0 0em rgba(0,0,0, 0.2), -1.8em -1.8em 0 0em rgba(0,0,0, 0.2);
    }
    50% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.2), 1.8em -1.8em 0 0em rgba(0,0,0, 0.2), 2.5em 0em 0 0em rgba(0,0,0, 0.5), 1.75em 1.75em 0 0em rgba(0,0,0, 0.7), 0em 2.5em 0 0em #000000, -1.8em 1.8em 0 0em rgba(0,0,0, 0.2), -2.6em 0em 0 0em rgba(0,0,0, 0.2), -1.8em -1.8em 0 0em rgba(0,0,0, 0.2);
    }
    62.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.2), 1.8em -1.8em 0 0em rgba(0,0,0, 0.2), 2.5em 0em 0 0em rgba(0,0,0, 0.2), 1.75em 1.75em 0 0em rgba(0,0,0, 0.5), 0em 2.5em 0 0em rgba(0,0,0, 0.7), -1.8em 1.8em 0 0em #000000, -2.6em 0em 0 0em rgba(0,0,0, 0.2), -1.8em -1.8em 0 0em rgba(0,0,0, 0.2);
    }
    75% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.2), 1.8em -1.8em 0 0em rgba(0,0,0, 0.2), 2.5em 0em 0 0em rgba(0,0,0, 0.2), 1.75em 1.75em 0 0em rgba(0,0,0, 0.2), 0em 2.5em 0 0em rgba(0,0,0, 0.5), -1.8em 1.8em 0 0em rgba(0,0,0, 0.7), -2.6em 0em 0 0em #000000, -1.8em -1.8em 0 0em rgba(0,0,0, 0.2);
    }
    87.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(0,0,0, 0.2), 1.8em -1.8em 0 0em rgba(0,0,0, 0.2), 2.5em 0em 0 0em rgba(0,0,0, 0.2), 1.75em 1.75em 0 0em rgba(0,0,0, 0.2), 0em 2.5em 0 0em rgba(0,0,0, 0.2), -1.8em 1.8em 0 0em rgba(0,0,0, 0.5), -2.6em 0em 0 0em rgba(0,0,0, 0.7), -1.8em -1.8em 0 0em #000000;
    }
}

/* User Management page */

.user-blocks {
    display: grid;
    gap: 20px;
    margin: 20px;
}

.user-block {
    border: 1px solid black;
    border-radius: 5px;
    display: grid;
}

.staff-block {
    grid-template-columns: 50px 150px 150px 300px auto 100px;
}

.guardian-block {
    grid-template-columns: 50px 150px 150px 300px auto 100px;
}

.admin-block {
    grid-template-columns: 50px 300px 150px 150px auto;
}

.learner-block {
    grid-template-columns: 50px 150px 150px auto;
}

.user-block-title {
    border-bottom: 1px solid black;
    background-color: #8a8a8a;
    border-radius: 5px 5px 0 0;
    padding-left: 5px;
    padding-right: 5px;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 50px auto;
}

.user-data {
    display: inline-grid;
}

.user-data-entry {
    padding: 5px;
    border-bottom: 1px solid #808080;
}

.user-edit-add {
    cursor: pointer;
}

.learner-dropdown {
    position: relative;
    display: inline-block;
}

.learner-dropdown-btn {
    padding: 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background-color: white;
    font-size: 16px;
    border: solid 1px var(--main-element-border);
    border-radius: 5px;
}

.learner-dropdown-content {
    display: none;
    position: absolute;
    margin-top: 4px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: transparent;
    backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border: solid 1px var(--main-element-border);
    border-radius: 5px;
}

.learner-dropdown-content label {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
}

.learner-dropdown-content input {
    margin-right: 8px;
}

.learner-dropdown.open .learner-dropdown-content {
    display: block;
}

.user-form {
    gap: 10px;
    display: grid;
}

.form-group {
    display: grid;
    grid-template-columns: 150px 50%;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: solid 1px var(--main-element-border);
    border-radius: 5px;
    font-size: 16px;
}

.form-container {
    padding: 20px;
}

.form-buttons {
    display: flex;
    gap: 20px;
}

/* Hide native radios */
.form-group input[type="radio"] {
    display: none;
}

/* Label acts as the styled button */
.form-group .radio-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--main-element-border);
    width: 90px;
    height: 30px;
    border-radius: 9999px; /* pill shape */
    font-size: 14px;
    font-weight: 500;
    color: var(--main-element-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover effect */
.form-group .radio-label:hover {
    border-color: var(--main-element-border);
    color: var(--main-element-border) ;
}

/* Checked state */
.form-group input[type="radio"]:checked + span,
.form-group input[type="radio"]:checked + label {
    border-color: var(--main-element-border);
    background-color: var(--main-element-border);
    color: #fff;
}


.user-type-dropdown {
    position: relative;
    display: inline-block;
}

.user-type-dropdown-btn {
    height: 30px;
    width: 90px;
    border-radius: 10px;
    font-size: 15px;
    border: var(--main-element-border) solid 2px;
    background-color: var(--main-element-background);
    box-shadow: inset 0px 0px 1px 1px var(--main-element-border), 0px 0px 1px 1px var(--main-element-border);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.user-type-dropdown-content {
    display: none;
    position: absolute;
    margin-top: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: transparent;
    backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border: solid 1px var(--main-element-border);
    border-radius: 5px;
}

.user-type-dropdown-content label {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
}

/* buttons inside the dropdown */
.user-type-dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 5px;
    border: none;
    background: none; /* also removes background if you want */
    cursor: pointer;
    width: 100%;
}

/* Change color of dropdown links on hover */
.user-type-dropdown-content button:hover {background: color-mix(in srgb, var(--main-element-background) 20%, transparent);}

.user-type-dropdown.open .user-type-dropdown-content {
    display: block;
}

/* Change color of dropdown links on hover */
.user-type-dropdown-content a:hover {background: color-mix(in srgb, var(--main-element-background) 20%, transparent);}

/* Show the dropdown menu on hover */
.user-type-dropdown:hover .user-type-dropdown-content {
    display: block;
}