@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  background-color: rgb(246, 246, 246);
}

#logo {
  width: 150px;
  padding: 25px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 50px;
  min-width: 50vw;
}

main {
  display: flex;
  width: 50vw;
  margin: auto;
  flex-direction: column;
  flex: 1;
  align-items: center;
}

.submitted-page {
  text-align: center;
  margin-top: 50px;
}

.patience {
  font-style: italic;
  font-size: 1em;
}

.underline {
  font-weight: bold;
}

.velg-tidsrom {
  margin-top: 20px;
  margin-bottom: 0;
  font-weight: bold;
}

button {
  display: block;
  background-color: #1e6b3a;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
}

#submit-form,
#add-entry {
  margin-top: 30px;
  width: 48%;
  height: 40px;
  border-radius: 10px;
  border-width: 1px;
  font-family: "Montserrat", sans-serif;
  font-weight: bold;
  color: white;
}

#return-button {
  margin-top: 30px;
  height: 40px;
  width: 80%;
  border-radius: 10px;
  border-width: 1px;
  font-family: "Montserrat", sans-serif;
  font-weight: bold;
  color: white;
}

#submit-form {
  background-color: #1e6b3a;
}

#plus {
  font-size: 1.5rem;
  line-height: 1;
  vertical-align: middle;
  margin-right: 10px;
  transition: transform 1.3s;
  display: inline-block;
}

#plus:hover {
  font-size: 2rem;
  transform: rotate(3600deg);
  animation: rainbow 1.5s linear;
  animation-iteration-count: infinite;
}

#submit-form:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#multi-times {
  margin-top: 5%;
}

#add-entry {
  background-color: #20412a;
}

#submit-form:hover {
  background-color: #20412a;
}

#add-entry:hover {
  background-color: #1e6b3a;
}

.line {
  height: 1px;
  width: 100%;
  background-color: #1e6b3a;
  margin: auto;
}

button:hover {
  background-color: #254832;
  color: white;
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
}

footer {
  display: flex;
  height: 60px;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-weight: bold;
  background-color: rgb(246, 246, 246);
}

.youtube-link {
  color: #1e6b3a;
  font-weight: 600;
}

.youtube-link:hover {
  color: #20412a;
  text-decoration: none;
}

.github {
  width: 30px;
}

iframe {
  display: block;
  width: 90vw;
  height: 80vh;
  margin: auto;
}

#one-sub {
  text-align: center;
  font-size: 0.9em;
}

/* Tab content */

.tab-title {
  text-align: center;
  margin-bottom: 20px;
}

.tablinks {
  background-color: #1e6b3a;
  color: white;
  padding: 14px 16px;
  border: none;
  cursor: pointer;
  font-size: 17px;
  flex: 1;
  text-align: center;
}

.tab {
  overflow: hidden;
  display: flex;
  width: 100vw;
  margin: auto;
}

.tabcontent {
  display: none;
  margin: 20px 0 20px 0;
  animation: fadeEffect 0.7s;
  /* Fading effect takes 1 second */
}

.active {
  background-color: #254832;
}

/* Saved inputs */

.entries {
  margin-top: 50px;
}

#entries-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#entries-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid #ddd;
  background-color: rgb(246, 246, 246);
}

#entries-list li:last-child {
  border-bottom: none;
}

.delete-entry {
  all: unset;
  /* Completely resets any inherited styles */
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: red;
  padding: 0 4px;
  display: flex;
  align-items: center;
}

.delete-entry:hover {
  font-weight: bold;
  background: none !important;
  color: red !important;
}

/* Initially, desktop menu is shown, mobile is hidden */
.desktop-menu {
  display: flex;
}

.mobile-menu {
  display: none;
  /* Only appears when open on mobile */
}

/* Hamburger button only on mobile */
#hamburger {
  display: none;
  background: none;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 15px;
  z-index: 1000;
  width: 50px;
  color: black;
  transition: color 0.3s ease;
  /* Smooth change */
}

#hamburger.open {
  display: flex;
  color: white;
  transition: color 0.3s ease;
}

@keyframes fadeEffect {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes rainbow{
		100%,0%{
			color: rgb(255,0,0);
		}
		8%{
			color: rgb(255,127,0);
		}
		16%{
			color: rgb(255,255,0);
		}
		25%{
			color: rgb(127,255,0);
		}
		33%{
			color: rgb(0,255,0);
		}
		41%{
			color: rgb(0,255,127);
		}
		50%{
			color: rgb(0,255,255);
		}
		58%{
			color: rgb(0,127,255);
		}
		66%{
			color: rgb(0,0,255);
		}
		75%{
			color: rgb(127,0,255);
		}
		83%{
			color: rgb(255,0,255);
		}
		91%{
			color: rgb(255,0,127);
		}
}

@media (max-width: 600px) {
  main {
    width: 90vw;
  }

  .desktop-menu {
    display: none;
    /* Hide desktop version */
  }

  #hamburger {
    display: block;
    position: absolute;
    right: 20px;
    top: 15px;
  }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    flex-direction: column;
    background-color: #1e6b3a;
    z-index: 999;
    /* Slightly lower than hamburger */
  }

  /* When active */
  #mobile-menu.open {
    display: flex;
  }

  .mobile-menu button {
    width: 100%;
  }

  .tab {
    display: none;
  }

  #logo {
    width: 150px;
  }

  button {
    width: 90vw;
  }

  nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    background-color: rgb(246, 246, 246);
  }
}