/* Basic styling */
body {
    font-family: Arial, sans-serif;
    background-color: #87c7b4;
    color: #fff;
    text-align: center;
    padding: 5px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#logo {
    margin-bottom: 10px;
}

#logo img {
    max-width: 75%; /* Adjust logo size */
    height: auto;
}

#logo2 {
    margin-bottom: 0px;
}

#logo2 img {
    max-width: 25%; /* Adjust logo size */
    height: 25%;
}

#login {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background: #a0a3a2;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

h2 {
    margin-bottom: 5px;
    font-size: 24px;
}

input {
    width: 80%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

button {
    width: 90%;
    padding: 10px;
	margin: 10px 0;
   background: #1db954;
    color: white;
    border: 2px solid #7a7a7a;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}
button:hover {
    background-color: #666666; /* Darker grey on hover */
    border-color: #5a5a5a; /* Darker border on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Slightly bigger shadow */
    transform: translateY(-2px); /* Button lift effect */
}


/* Mobile specific styles */
@media (max-width: 480px) {
    body {
        padding: 20px;
    }

    #login {
        width: 100%;
        max-width: 300px;
    }
}
/* Button Styles (for <button> elements) */
button.admin-button {
    background-color: #808080; /* Grey background */
    color: white; 
    padding: 2px 2px;
    font-size: 1.2em;
    margin: 5px;
    border: 2px solid #7a7a7a; /* Slightly darker grey border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transition for hover effect */
}

/* Hover effect for admin buttons */
button.admin-button:hover {
    background-color: #666666; /* Darker grey on hover */
    border-color: #5a5a5a; /* Darker border on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Slightly bigger shadow */
    transform: translateY(-2px); /* Button lift effect */
}

#data {
    max-width: 300px;
    width: 90%;
}

/* Button Styles (for <button> elements) */
button.data-button {
    background-color: #c49c23; /* Grey background */
    color: white; 
    padding: 2px 2px;
    font-size: 16px;
    margin: 5px;
    border: 2px solid #7a7a7a; /* Slightly darker grey border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transition for hover effect */
}

/* Hover effect for admin buttons */
button.data-button:hover {
    background-color: #666666; /* Darker grey on hover */
    border-color: #5a5a5a; /* Darker border on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Slightly bigger shadow */
    transform: translateY(-2px); /* Button lift effect */
}
/* Focus effect for admin buttons */
button.admin-button:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.6); /* Red focus ring */
}

#logout {
    display: flex;
    width: 100%;
    max-width: 300px;
}

button.logout {
    background-color: #0356a6; /* Grey background */
    color: white; /* Red text */
    padding: 2px 2px;
    font-size: 1.2em;
    margin: 2px;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transition for hover effect */
    flex: 1; /* Make each button expand to fill the container */
}

/* Hover effect for admin buttons */
button.logout:hover {
    background-color: #666666; /* Darker grey on hover */
    border-color: #5a5a5a; /* Darker border on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Slightly bigger shadow */
    transform: translateY(-2px); /* Button lift effect */
}

/* Focus effect for admin buttons */
button.logout:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.6); /* Red focus ring */
}

button.back {
    background-color: #68abed;
    color: white; /* Red text */
    padding: 2px 2px;
    font-size: 1.2em;
    margin: 2px;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transition for hover effect */
    flex: 1; /* Make each button expand to fill the container */
}

/* Hover effect for admin buttons */
button.back:hover {
    background-color: #666666; /* Darker grey on hover */
    border-color: #5a5a5a; /* Darker border on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Slightly bigger shadow */
    transform: translateY(-2px); /* Button lift effect */
}

/* Focus effect for admin buttons */
button.back:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.6); /* Red focus ring */
}

.scoresheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px; /* spacing between entries */
  margin-left: 5px;
}
.score-container {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.left-container,
.right-container {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each row container */
.entry {
  display: grid;
  grid-template-columns: 32px 200px 60px; /* flag | name | score */
  align-items: center;
  width: 100%;
  padding: 0px 8px;
  box-sizing: border-box;
  
}

/* Flag */
.entry img {
  width: 28px;
  height: auto;
  justify-self: start;
}

/* Country name */
.entry label {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Score input */
.entry input[type="number"] {
  width: 100%;
  max-width: 55px;
  justify-self: end;       /* forces right alignment */
  text-align: center;
  padding: 3px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.ranksheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px; /* spacing between entries */
  margin-left: 5px;
}
.rank-container {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

/* Each row container */
.ranks {
  display: grid;
  grid-template-columns: 40px 32px 200px 60px; /* flag | name | score */
  align-items: center;
  width: 100%;
  padding: 0px 8px;
  box-sizing: border-box;
  
}

.ranks rank[type="number"] {
  width: 100%;
  max-width: 40px;
  justify-self: end;       /* forces right alignment */
  text-align: center;
  padding: 3px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

/* Flag */
.ranks img {
  width: 28px;
  height: auto;
  justify-self: start;
}

/* Country name */
.ranks label {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Score input */
.ranks score[type="number"] {
  width: 100%;
  max-width: 55px;
  justify-self: end;       /* forces right alignment */
  text-align: center;
  padding: 3px;
  font-size: 0.9rem;
  box-sizing: border-box;
}


/* SCOREBOARD TABLE */

/* Scrollable container */
.table-container {
    max-height: 75vh;
    overflow-y: auto;
    margin: 20px auto;
    width: 95%;
    border-radius: 8px;
}

/* Sticky header row */
.table-container table thead tr {
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Sticky header cells */
.table-container table th {
    background: #07360b;
    color: white;
    padding: 2px 10px;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 2px solid #2c2c70;
}


table {
    width: auto;
    margin: 2px auto;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 12px;
    background: #276e09;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* CELLS */
table td {
    padding: 2px 2px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
}

/* ZEBRA STRIPES */
table tr:nth-child(even) {
    background: #12c438;
}

/* HOVER EFFECT */
table tr:hover {
    background: #cfc804;
    transition: 0.2s;
}

/* FIRST COLUMN (Running Order) */
table td:first-child,
table th:first-child {
    font-weight: bold;
    background: #07360b;
}

/* COUNTRY COLUMN */
table td:nth-child(2),
table th:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

.view-only {
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-only .tick {
    color: #28a745; /* green */
    font-size: 18px;
    font-weight: bold;
}

.view-only .cross {
    color: #d9534f; /* red */
    font-size: 18px;
    font-weight: bold;
}
.actions {
    text-align: center;
    white-space: nowrap;
}

.edit-icon {
    color: #007bff;
    margin-right: 10px;
    text-decoration: none;
    font-size: 18px;
}

.delete-icon {
    color: #d9534f;
    text-decoration: none;
    font-size: 18px;
}
.filter {
    height: 18px;
    padding: 2px 4px;
    font-size: 12px;
    line-height: 12px;
    width: 90%;
    box-sizing: border-box;
}

