/* Base styles */
body {
    font-family: 'Activ Grotesk', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    color: #333;
    display: flex;
    height: 100vh;
}

.container {
    display: flex;
    width: 100%;
}

.side-menu {
    width: 175px;
    background-color: #1C2D5A;
    padding: 20px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.side-menu .logo {
    max-width: 150px;
    margin-bottom: 40px;
}

.side-menu ul {
    list-style: none;
    padding: 0;
    width: 100%;
    margin-top: 20px;
}

.side-menu ul li {
    margin: 10px 0;
}

.side-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
}

.side-menu ul li a:hover,
.side-menu ul li a.active {
    background-color: #f5f5f5;
    color: #1C2D5A;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border: 1px solid #ccc; /* Light grey border */
    background-color: #ffffff; /* White background for the main section */
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header {
    width: 97%;
    background-color: #1C2D5A;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#datetime {
    font-size: 1em;
    color: #fff;
    position: absolute; /* Use absolute positioning */
    left: 0; /* Align to the far left */
    top: 95%; /* Vertically center the element within the header */
    transform: translateY(-50%); /* Adjust for centering */
    padding-left: 20px; /* Optional: add padding if you want a little space from the edge */
}

.main-title {
    font-size: 2.2em;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

.shift-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    text-align: left;
}

.shift-title {
    font-size: 1.5em; /* Reduced size */
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.box {
    position: relative;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.box:hover {
    box-shadow: 0 0 15px rgba(28, 45, 90, 0.5);
}

.box:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #1C2D5A;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.box-header {
    background-color: #1C2D5A;
    color: #fff;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.5px;
}

.box-content {
    padding: 25px;
    text-align: center;
    font-size: 1.2em;
    color: #333;
    letter-spacing: 0.5px;
}

/* Responsive design */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

/* Style for the drop-downs and text inputs in the downtime page */
.dropdown-section {
    margin-top: 20px;
}

.dropdown-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.dropdown {
    width: 250px; /* Matching the width of the side menu */
    padding: 20px 15px; /* Increase top and bottom padding for height */
    font-size: 1.2em; /* Keep the font size similar to the menu items */
    line-height: 1.5; /* Increase line-height for a taller appearance */
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.dropdown:hover {
    box-shadow: 0 0 10px rgba(28, 45, 90, 0.5);
}

.text-input-large {
    width: 750px; /* Approximately 3 times larger */
    padding: 15px;
    font-size: 1.2em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.submit-button {
    background: linear-gradient(180deg, #6eb061, #59964d); /* Green gradient */
    color: #fff;
    padding: 10px 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.25s ease, box-shadow 0.25s ease; /* Match edit button transition */
}

/* Hover state */
.submit-button:hover {
    background: linear-gradient(180deg, #81c673, #78ba6a); /* Black to dark grey gradient on hover */
    box-shadow: 0 0 2px rgba(28, 45, 90, 0.5); /* Match edit button hover shadow */
}


/* Edit button style */
.edit-button {
    background: linear-gradient(180deg, #e5ae5c, #df9739); /* Green gradient */
    color: #fff;
    padding: 10px 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover state */
.edit-button:hover {
    background: linear-gradient(180deg, #f9c580, #e89b3f); /* Black to dark grey gradient on hover */
    box-shadow: 0 0 2px rgba(28, 45, 90, 0.5);
}

/* Downtime entry styles */
.downtime-entry {
    display: grid;
    grid-template-columns: .58fr .4fr .75fr .8fr 2fr .7fr .25fr; /* Adjust these values to change column widths */
    gap: 10px; /* General spacing between columns */
}

/* Duplicate grid with all columns same as "Duration" */
.downtime-entry + .downtime-entry {
    grid-template-columns: repeat(7, 1fr); /* All columns the same width */
}

.row {
    display: contents;
}

.column-title,
.column {
    padding: 10px;
    text-align: left;
    font-size: 1em; /* Ensures all text has the same font size */
}

input[type="text"], button, select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 4px;
    height: 40px;
    line-height: 20px;
    font-size: 1em; /* Match font size */
    border: 1px solid #ccc;
    appearance: none; /* Remove default dropdown arrow */
    background: url('data:image/svg+xml;utf8,<svg fill="%23ccc" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-color: #fff;
    background-size: 16px;
    padding-right: 30px; /* Space for the custom arrow */
}

/* Remove border from Start Time, Duration */
.column:nth-child(1) input[type="text"],
.column:nth-child(2) input[type="text"] {
    border: none;
    background-color: transparent;
}

/* Stacked Date and Time */
.datetime-input {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1em; /* Match font size */
    color: #333;
}

button {
    background-color: #8CC63F;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    height: 40px;
    line-height: 20px;
    font-size: 1em; /* Match font size */
}

button:hover {
    background-color: #8CC63F;
}

.line-state-button {
    display: block;
    background-color: #8CC63F; /* Green background */
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 1.2em;
    border-radius: 5px;
    position: fixed; /* Fixed positioning */
    bottom: 100px; /* 80px from the bottom of the page */
    left: 20px; /* Align with the left edge of the side menu */
    width: calc(175px - 40px); /* Adjust width to fit inside the side menu */
    cursor: default;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.edit-button {
    background: linear-gradient(180deg, #e5ae5c, #df9739);
    color: #fff;
    padding: 0px 10px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    margin-top: -5px; /* Adjust this value as needed to vertically align the button */
}
