/* ---------------------------------------
   style.css
   ---------------------------------------
*/

/* Main page styling */
body.index {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

body.index .container {
    width: 80%;
}

body.index .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.index .logo {
    /* Adjust the size of your logo */
    height: 50px;
    flex-grow: 0; /* Prevents the logo from stretching */
}

body.index .title {
    width: 100%;
    text-align: center;
    margin-left: -50%; /* Pulls the title back to the center */
}

/* ---------------------------------------
   Button-like anchors & form buttons
   ---------------------------------------
   We unify <a> and <button> with .button-link
   so they look & align the same.
*/
.buttons-container {
  display: flex;
  justify-content: flex-end; /* Align items to the right */
  align-items: left;         /* Align items vertically at the left/top */
}

.buttons-container form {
  display: inline;
  margin: 0 10px 0 0; /* Adjust spacing if needed */
}

/* Shared “button” styles for anchors and buttons */
.buttons-container .button-link {
  cursor: pointer;
  background-color: #585858;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  width: 150px;
  height: 30px;
  display: inline-block;  /* So width/height can apply */
  text-align: center;     /* Centers text horizontally */
  line-height: 30px;      /* Vertically center text within 30px height */
  text-decoration: none;  /* No underline if it’s an anchor */
  font-size: 14px;
  margin-right: 10px;     /* Spacing between buttons */
  vertical-align: middle; /* Helps align them in the same baseline row */
}

.buttons-container .button-link:hover {
  background-color: #22A8D9;
  color: #FFFFFF;
}

/* ---------------------------------------
   FontAwesome and sorting icons
   ---------------------------------------
   (If you still need them)
*/
.fa {
    display: inline-block;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fa-fw {
    width: 1.28571429em;
    text-align: center;
}

.fa-sort {
    display: inline-block; 
    width: 10px; 
    height: 10px; 
    background-image: url("./media/pictures/sort.png");
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center; 
    margin-left: 5px; 
}

/* ---------------------------------------
   Table styling
   ---------------------------------------
*/
table {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    font-size: 14px;
    text-align: left;
    padding: 4px;
    border: 1px solid #ddd; /* Border color for table cells */
}

thead th {
    background-color: #595959;
    color: #ffffff;
}

/* First row headers (sticky) */
.header-row-1 th {
    background-color: #595959;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Second row headers (sticky) */
.header-row-2 th {
    background-color: #D0CECE;
    color: #000000;
    position: sticky;
    top: 24px;
    z-index: 1;
}

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

tr:hover {
    background-color: #e8f4ff;
}

/* ---------------------------------------
   Tabs styling
   ---------------------------------------
*/
.tab-container {
    width: 100%;
    margin: 0 auto;
    border: none;
}

/* The tab row */
.tab {
    display: flex;
    overflow: hidden;
    background-color: #ffffff;
    margin-top: 10px;
}

/* Tab buttons */
.tab button {
    flex: 1;
    text-align: center;
    background-color: #EEEEEE;
    border-top: 1px solid #FFFFFF;
    border-bottom: 1px solid #333333;
    border-left: 1px solid #333333;
    border-right: 1px solid #333333;
    cursor: pointer;
    transition: 0.3s;
    font-size: 17px;
    margin: -1px; /* So they snugly fit together */
}

/* Hover on tab button */
.tab button:hover {
    background-color: #ddd;
    color: #ffffff; /* or pick a color you prefer */
}

/* Active tab button */
.tab button.active {
    background-color: #ffffff;
    border-bottom: none;
    border-top: 1px solid #333333;
    border-left: 1px solid #333333;
    border-right: 1px solid #333333;
    margin: 0;
}

/* Tab content sections */
.tabcontent {
    display: none;
    color: #333333;
    padding: 6px 12px; 
    border: 1px solid #333333;
    border-top: none;
    width: 100%;
    box-sizing: border-box;
}

/* Show active tabcontent */
.tabcontent.active {
    display: block;
}

/* ---------------------------------------
   Additional form inputs, etc.
   ---------------------------------------
*/
th input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 4px;
    border: 1px solid #ccc; 
}

/* ---------------------------------------
   Toggle switch styling (if in use)
   ---------------------------------------
*/
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 27px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 21px;
    width: 21px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #00B8DB;
}

input:focus + .slider {
    box-shadow: 0 0 1px #00B8DB;
}

/* Rounded sliders */
.slider.round {
    border-radius: 27px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Position knob to the right when checked */
input:checked + .slider:before {
    left: 27px;
}

/* ---------------------------------------
   Login page styling (if in use)
   ---------------------------------------
*/
body.login {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.login-container {
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 400px;
}

.login-container input {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-container form {
    display: flex;
    flex-direction: column;
}

.login-container label {
    margin-bottom: 5px;
}

.login-container button {
    cursor: pointer;
    padding: 10px 20px;
    background-color: #00B8DB;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #22A8D9;
}

.login-container .error-message {
    color: red;
    margin-bottom: 15px;
}

.login-container a {
    color: rgb(18, 104, 209);
    text-decoration: none;
    font-size: 12px;
}

/* Inline form styling for Excel export button */
.inline-form {
    display: inline;
}

/* Optional: Add margin if buttons are too close together */
.buttons-container .inline-form {
    margin-left: 0;
}
