* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, oxygen,
    ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", Arial,
    sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.siteTitle {
  color: #4f5a4a;
  margin: 0;
  padding: 15px 0;
  font-size: 32px;
}

.submitError {
  text-align: center;
  color: rgb(148, 0, 0);
  margin: 0;
  padding: 15px 0;
  font-size: 32px;
}

.submitErrorSmall {
  text-align: center;
  color: rgb(148, 0, 0);
  margin: 0;
  padding: 15px 0;
  font-size: 22px;
}

.submitSuccess {
  text-align: center;
  color: rgb(47, 148, 0);
  margin: 0;
  padding: 15px 0;
  font-size: 32px;
}

.submitSuccessSmall {
  text-align: center;
  color: rgb(47, 148, 0);
  margin: 0;
  padding: 15px 0;
  font-size: 22px;
}

.hidden {
  display: none !important;
}
body {
  /* background-image: url('https://somehauki.fi/tulospalvelu/images/loginback.jpg'); */
  background-color: #cdceac;
  margin: 0;
  /* background-position: center; /* Center the image */
  /* background-repeat: no-repeat; Do not repeat the image */
  /* background-size: cover; Resize the background image to cover the entire container */
}
.login {
  width: 400px;
  max-width: 95%;
  background-color: #ffffff;
  box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
  margin: 100px auto;
}
.login h1 {
  text-align: center;
  color: #5b6574;
  font-size: 24px;
  padding: 20px 0 20px 0;
  border-bottom: 1px solid #dee0e4;
}
.login form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 20px;
}
.login form label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: #7b8b66;
  color: #ffffff;
}
.login form input[type="password"],
.login form input[type="email"],
.login form input[type="text"] {
  width: 310px;
  max-width: 80%;
  height: 50px;
  border: 1px solid #dee0e4;
  margin-bottom: 20px;
  padding: 0 15px;
}

/* Add a black background color to the top navigation */
.topnav {
  background-color: #4b6542;
  overflow: hidden;
}

/* Style the links inside the navigation bar */
.navicons a:not(.navi-admin) {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.navi-admin {
  float: left;
  display: block;
  color: #ffd45e;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

/* Change the color of links on hover */
.navicons a:hover {
  background-color: #ddd;
  color: black;
}

/* Add an active class to highlight the current page */
.topnav a.active {
  background-color: #04aa6d;
  color: white;
}

/* Hide the link that should open and close the topnav on small screens */
.topnav .icon {
  display: none;
}
.navicons {
  float: right;
  display: block;
}
.navtitle {
  color: white;
  margin-left: 10px;
  float: left;
  display: block;
}
.content {
  width: 80%;
  margin: 0 auto;
}

/* Esikatselukuvan maksimileveys 100% */
.preview-container img, #image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

.navtop {
  background-color: #4b6542;
  height: 60px;
  width: 100%;
  border: 0;
}
.navtop div {
  display: flex;
  margin: 0 auto;
  width: 80%;
  height: 100%;
}
.navtop div h1,
.navtop div a {
  display: inline-flex;
  align-items: center;
}
.navtop div h1 {
  flex: 1;
  font-size: 24px;
  padding: 0;
  margin: 0;
  color: #eaebed;
  font-weight: normal;
}
.navtop div a {
  padding: 0 20px;
  text-decoration: none;
  color: #c1c4c8;
  font-weight: bold;
}
.navtop div a i {
  padding: 2px 8px 0 0;
}
.navtop div a:hover {
  color: #eaebed;
}
body.loggedin {
  background-color: #f3f4f7;
}

.testi {
  background-color: #3354b8;
}
.content h2 {
  margin: 0;
  padding: 15px 0;
  font-size: 22px;
  border-bottom: 1px solid #e0e0e3;
  color: #4f5a4a;
}
/* .content h1 {
	margin: 0;
	padding: 15px 0;
	font-size: 22px;
	color: #4F5A4A;
} */
.content > p,
.content > div {
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  margin: 25px 0;
  padding: 25px;
  background-color: #fff;
}
.content > p table td,
.content > div table td {
  padding: 5px;
}
.content > p table td:first-child,
.content > div table td:first-child {
  font-weight: bold;
  color: #4f5a4a;
  padding-right: 15px;
}
.content > div p {
  padding: 5px;
  margin: 0 0 10px 0;
}

* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, oxygen,
    ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", Arial,
    sans-serif;
  font-size: 16px;
}

.register {
  width: 400px;
  max-width: 95%;
  background-color: #ffffff;
  box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
  margin: 100px auto;
}
.register h1 {
  text-align: center;
  color: #5b6574;
  font-size: 24px;
  padding: 20px 0 20px 0;
  border-bottom: 1px solid #dee0e4;
}
.register form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 20px;
}
.register form label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: #7b8b66;
  color: #ffffff;
}
.register form input[type="password"],
.register form input[type="text"],
.register form input[type="email"] {
  width: 310px;
  max-width: 80%;
  height: 50px;
  border: 1px solid #dee0e4;
  margin-bottom: 20px;
  padding: 0 15px;
}

form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

select {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.createteam form label {
  color: #313828;
  font-weight: bold;
  float: left;
}

.createteam form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.addfisher form label {
  color: #313828;
  font-weight: bold;
  float: left;
}

.addfisher form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.editteam form label {
  color: #313828;
  font-weight: bold;
  float: left;
}

.editteam form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}
.content input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.feedback form label {
  color: #313828;
  font-weight: bold;
  float: left;
}

.feedback form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.visible {
  display: block;
}

#scoreboard {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

#scoreboard td,
#scoreboard th {
  border: 1px solid rgb(255, 255, 255);
  padding: 8px;
}

/* #scoreboard tr:hover {background-color: #ddd;} */

#scoreboard th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4b6542;
  color: white;
}
#scoreboard tr:nth-child(even) {
  background-color: #dfdfdf;
}
#scoreboard tr:nth-child(odd) {
  background-color: #ffffff;
}
#juryboard {
  margin-left: auto;
  margin-right: auto;
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 80%;
}

#juryboard td,
#juryboard th {
  border: 1px solid rgb(255, 255, 255);
  padding: 8px;
}

#juryboard tr:nth-child(even) {
  background-color: #dfdfdf;
}

/* #juryboard tr:hover {background-color: #ddd;} */

#juryboard th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4b6542;
  color: white;
}

@media screen and (max-width: 850px) {
  #juryboard {
    margin-right: 10%;
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    transform: scale(0.97);
  }
}

.inline-right {
  float: right;
  display: block;
  width: 49%;
  margin-bottom: 10px;
}
.inline-left {
  float: left;
  display: block;
  width: 49%;
  margin-bottom: 10px;
}

.submitlink {
  display: block;
  text-decoration: none;
  text-align: center;
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background-color: #7b8b66;
  border: 0;
  cursor: pointer;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.2s;
}
.submitlink:hover {
  background-color: #626d49;
  transition: background-color 0.2s;
}

.deletelink {
  display: block;
  text-decoration: none;
  text-align: center;
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background-color: #892726;
  border: 0;
  cursor: pointer;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.2s;
}
.deletelink:hover {
  background-color: #661d1c;
  transition: background-color 0.2s;
}

img {
  cursor: pointer;
  transition: 0.3s;
}

img:hover {
  opacity: 0.7;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 90%;
  max-height: 75%;
}

/* Caption of Modal Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 90%;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation */
.modal-content,
#caption {
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {
    -webkit-transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
  }
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

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

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
  .modal-content {
    width: 100%;
  }
}

@media screen and (max-width: 850px) {
  .topnav a:not(.logo) {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
  .content {
    width: 95%;
    margin: 0 auto;
  }
  .login {
    margin: 0 auto;
  }
  .register {
    margin: 0 auto;
  }
  .topnav.responsive {
    position: relative;
  }
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: inline-block;
    text-align: left;
  }
  .content {
    width: 95%;
    margin: 0 auto;
  }
}
.green {
  background-color: #647d55;
  color: white;
}
.red {
  background-color: #892726;
  color: white;
}
.yellow {
  background-color: #c3bc8e;
  color: black;
}

.bottom-link {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 20px 0;
}
.bottom-link a {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  padding: 10px 20px;
  background-color: #647d55;
  border-radius: 5px;
  transition: background-color 0.3s;
}
.bottom-link a:hover {
  background-color: #647d55;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  background-color: #4b6542;
  color: #fff;
}

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

/* Form styles */
form {
  margin-top: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="range"],
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

input[type="checkbox"] {
  margin-right: 5px;
}

/* Buttons */
button,
input[type="submit"] {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  background-color: #7b8b66;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

button:hover,
input[type="submit"]:hover {
  background-color: #626d49;
}

/* Link buttons */
.editcomp,
.deletecomp {
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  text-align: center;
  display: inline-block;
  margin-right: 5px;
}

.editcomp {
  background-color: #4b6542 !important;
  color: #fff;
}

.deletecomp {
  background-color: #892726 !important;
  color: #fff;
}

.editcomp:hover {
  background-color: rgb(63, 102, 50) !important;
}

.deletecomp:hover {
  background-color: #661d1c !important;
}

/* Responsive design */
@media screen and (max-width: 768px) {
  .content {
    width: 95%;
  }

  .navtop div {
    width: 95%;
  }
}

@media screen and (max-width: 480px) {
  .navtop div h1 {
    font-size: 20px;
  }

  .navtop div a {
    padding: 0 10px;
  }
}

.admin-section {
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.competition-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"] {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.checkbox-group label {
  display: block;
  margin-bottom: 5px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .admin-section {
    padding: 10px;
  }
}
/* Style for mobile-friendly table */
.responsive-table table {
  width: 100%;
  border-collapse: collapse;
}

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

/* Hide table headers on mobile */
@media screen and (max-width: 600px) {
  .responsive-table thead {
    display: none;
  }

  .responsive-table td {
    display: block;
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  .responsive-table td .content-wrap {
    display: inline-block;
    max-width: 65%; /* Limit text wrap to 50% of the td */
    box-sizing: border-box;
  }

  /* Display the data-label as a pseudo-element for each cell */
  .responsive-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
  }
}

/* Use the general sibling combinator (~) if the label follows the checkbox */
/* Or use the parent selector if the checkbox is wrapped by the label */
.checkbox-button input[type="checkbox"]:checked + span {
  background-color: #3f6632;
}

/* General label styles */
form label {
  display: block;
  margin-bottom: 5px;
  color: #313828;
  font-weight: bold;
}

/* Custom checkbox and radio button label styles */
.checkbox-group label,
.radio-group label {
  display: inline-block;
  margin-right: 10px;
  padding: 10px 20px;
  background-color: #696969;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
}

/* Hide the actual checkbox and radio input */
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  display: none;
}

/* Style for when the checkbox or radio is checked */
.checkbox-group input[type="checkbox"]:checked + label,
.radio-group input[type="radio"]:checked + label {
  background-color: #3f6632;
}
