:root {
  --primary-color: #313b7d;
  --secondary-color: #00b4f1;
  --background-color: #fceec0;
  --text-color: #010101;
  --red-color: #f60001;
  --white-color: #ffffff;
  --dark-green-color: #419149;
  --light-green-color: #a5d86c;
}

@font-face {
  font-family: "Comic Sans Hosted"; /* Define a name for your font */
  src: url("/assets/css/Comic Sans MS.ttf")
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

ul li::before {
  content: "\1F43E";
  margin-right: 10px;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

body {
  background-color: var(--background-color);
  min-height: 100vh;
  line-height: 2rem;
  font-family: "Comic Sans MS", "Comic Sans", "Comic Sans Hosted", sans-serif;
  font-size: 1.25rem;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Comic Sans MS", "Comic Sans", "Comic Sans Hosted", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--text-color);
}

h1 {
  font-size: 2.25rem;
  margin: 0 auto 2rem auto;
  text-align: center;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(45ch, 100vw);
  margin: 20px 0.25em;
  background: var(--white-color);
  border: 10px solid var(--red-color);
  box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 40px 20px;
  position: relative;
  background: repeating-linear-gradient(
    to bottom,
    #fffaf0,
    #fffaf0 1em,
    #d9ecf3 1em,
    #d9ecf3 calc(1em + 2px)
  );
}

.container::before {
  content: "";
  position: absolute;
  top: -19px;
  left: 0;
  width: 100%;
  height: 40px;
  background-image: url("../img/spiral.svg");
  background-repeat: repeat-x;
  background-position: left;
  background-size: contain;
  z-index: 2;
}

.noscript-message {
  background-color: #fff3f3;
  padding: 20px;
  margin: 10px;
  border: 1px solid #ff8888;
  color: #a3020b;
  text-align: center;
}

/* Header Styles */
#nav-bar {
  color: var(--text-color);
  padding: 0em 0 1em;
  z-index: 1000;
  display: flex;
  gap: 1em;
  align-items: center;
  justify-content: center;
}

#nav-bar a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 20px 10px;
  font-weight: 500;
}

#nav-bar a:hover {
  text-decoration: underline;
}

#nav-bar a.button {
  color: var(--white-color);
  padding: 10px;
  transition: background-color 0.3s ease;
}

#nav-bar a.button:hover,
#nav-bar a.button:focus {
  background-color: var(--secondary-color);
  text-decoration: none;
}

#banner-bar{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: top;
}
#banner-bar .notebook-name{
    font-weight: bold;
    text-align: center;
    flex-shrink: 1;
}

#banner-bar a.home-link {
  flex-shrink: 0;
}

#banner-bar button {
  height: max-content;
  padding: 0.25em;
}

#banner-bar a.home-link img {
  height: 2em;
  display: inline-block;
  vertical-align: bottom;
  object-fit: contain;
}

/* Form Styles */
form {
  background: var(--white-color);
  padding: 20px;
}

form h2 {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-sizing: border-box;
}

button,
.button {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 10px 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

form button {
  width: 100%;
  font-size: 1em;
  margin-top: 20px;
}

button:hover,
button:focus {
  background-color: var(--secondary-color);
}

/* Login/Register Tabs */
.tab {
  cursor: pointer;
  padding: 10px 20px;
  margin-right: 5px;
  display: inline-block;
  background-color: var(--secondary-color);
  border-radius: 10px 10px 0 0;
}
.tab.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}
.form-container {
  display: none;
  border: 4px solid var(--primary-color);
}
.form-container.active {
  display: block;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--primary-color);
  color: var(--white-color);
}

tr:nth-child(even) td {
  background-color: #f9f9f9;
}

tr:nth-child(odd) td {
  background-color: #e6f0fa;
}

.capitalize {
  text-transform: capitalize;
}

.view-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
}

.view-options button {
  font-size: 1rem;
}

#login-status,
#register-status {
  margin-bottom: 0;
  margin-top: 0;
}

#login-status:not(:empty),
#register-status:not(:empty) {
  padding: 15px;
  color: var(--white-color);
  background-color: var(--secondary-color);
  margin: 15px;
  text-align: center;
}

/* Progress Styles */
.progress-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#progress-status{
    margin: 0;
}

.scan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
}

.scan-item {
  align-content: center;
  justify-content: center;
  display: flex;
  padding: 15px;
  text-align: center;
  background-size: 100px auto;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  width: 100%;
  height: 140px;
  filter: opacity(0.5);
  -webkit-filter: opacity(0.5);
}

.scan-item.scanned {
  background-image: none !important;
  filter: opacity(1);
  -webkit-filter: opacity(1);
}

.stamp-image {
  max-width: 140px;
  max-height: 140px;
  margin-top: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.scan-item.scanned .stamp-image {
  opacity: 1; /* Fully visible when scanned */
}

.badge-image {
  max-width: 100px;
  max-height: 100px;
}

#user-list tr {
  cursor: pointer;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Tag Styles */
#tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tag {
  border: 2px dashed var(--primary-color);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
  align-items: center;
}

#video-container {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

#preview {
  width: 100%;
  height: auto;
  display: block;
  background-color: #333;
}

.scans-list{
    display: grid;
    grid-template-columns: auto auto;
}

.completion{
    color: #FFFFFF;
    font-size: 1.2em;
    text-align: center;
    font-weight: bold;
    padding: 0.5em 2em;
    border-radius: 0.25em 0.25em 0 0;
}

.completion.complete{
    background-color: #419149;
}

.completion.not-complete{
    background-color: #914148;
}

.congrats-message{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.centered{
    display: flex;
    flex-direction: column;
    align-items: center;
}

