/* ----- General ----- */
body {
    background-color: #F3EFF5;
}

/* General CSS for all batch pages */
.batch-dropdown select {
    border: none;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    padding: 5px;
    border-radius: 5px;
    width: 190px;
    background-color: white;
}

/* ----- Main batch page ----- */

/* The top buttons for the main batch page */
.batch-buttons {
    display: flex;
    justify-content: center;
}

.batch-btn {
    background-color: #32743D;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 25px 10px 25px;
    font-size: 2rem;
    margin: 20px 35px 20px 35px;
    text-decoration: none;
    width: 270px;
    display: flex;
    justify-content: center;
}
.batch-btn:hover {
    background-color: #54965f;
    color: white;
}

.recent-batches {
    text-align: center;
    margin: 50px 0px 20px 0px;
}

/* Sorting of the batches */
.batch-sorting {
    font-size: 20px;
    margin-top: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-sort-by {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
}
.batch-sort-by:hover {
    cursor: pointer;
}

.sorting-text {
    margin: 0px 10px 0px 10px;
}

/* The sorting popup */
.sorting-popup {
    background-color: white;
    box-shadow: 1px 3px 5px 4px rgba(0, 0, 0, 0.25);
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 20px 5px 20px;
    width: 50%;
    max-width: 800px;
    height: 27%;
    max-height: 27%;
    border-radius: 10px;
    z-index: 1000;
    transition: 1s;
    top: 48%;
    left: 50%;
}

.sorting-popup.my-batch {
    top: 39%;
}

.sorting-popup.scrap-ready {
    width: 35%;
    top: 28%;
    left: 55%;
}

.arrow-up {
    width: 0;
    height: 0;
    border-left: 10px solid transparent; 
    border-right: 10px solid transparent;
    border-bottom: 10px solid white; 
    position: absolute;
    top: -10px; 
    left: 73%; 
    transform: translateX(-50%); 
}

/* Inside the sorting popup */
.top-popup {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid gray;
    margin: 0px 10px 10px 10px;
    padding-bottom: 15px;
}
.sort-statuses {
    display: flex;
    flex-direction: column;
}

.middle-popup {
    border-bottom: 1px solid gray;
    margin: 0px 10px 10px 10px;
    padding-bottom: 15px;
}
.sort-middle {
    display: flex;
    justify-content: space-between;
}

.bottom-popup {
    display: flex;
    justify-content: space-between;
}
#clear-sort {
    background: none;
    border: none;
    color: #9A2E2E;
    font-weight: 500;
    margin-left: 10px;
}
#cancel-sort {
    background: none;
    border: none;
    color: gray;
    font-weight: 500;
    margin-right: 10px;
}
#apply-sort {
    background: none;
    border: none;
    color: #32743D;
    font-weight: 700;
    margin-right: 10px;
}

/* Column sorting */

.sorting-columns {
    display: flex;
    flex-direction: column;
}

/* Where the batches are being displayed */

/* A link on top of the batches that leads to open-batch
So you can see the devices in that batch*/
.batch-link {
    display: block;
    text-decoration: none;
    color: #000;
}
.batch-link:hover {
    text-decoration: none;
    color: black;
}

/* The batches */
.batch-items {
    display: block;
}

.batch-display {
    background-color: white;
    display: flex;
    justify-content: space-between;
    border-radius: 15px;
    margin: 20px 0px 30px 0px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}
.batch-display-left {
    margin: 10px 25px 10px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.batch-display-right {
    margin: 10px 25px 10px 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

/* The pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
}
.pagination-wrapper a, li {
    margin: 3px;
    text-decoration: none;
    color: black;
}
li.active {
    text-decoration: underline;
}

/* No batches message */
#no-batches-message {
    margin: 50px;
    color: #9A2E2E;
    font-size: 30px;
    text-align: center;
}

#no-batches-message p {
    font-size: 18px;
    font-weight: 600;
}

/* CSS for viewing a batch's units */
.batch-table {
    background-color: white;
    border-spacing: 0;
    border-collapse: collapse;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    margin: 20px 0px 20px 0px;
    overflow: hidden;
}
.batch-table table, tr, th, td{
    background-color: white;
    border-radius: 15px;
}
.batch-table th, td{
    padding: 10px;
    border: 1px solid black;
}

th:nth-child(1) {
    text-align: center;
}
td:nth-child(1) {
    text-align: center;
    width: 110px;
}
td:nth-child(6) {
    text-align: center;
    width: 50px;
}
td:nth-child(7) {
    text-align: center;
    width: 50px;
}

.batch-table tr:first-child th:first-child {
    border-top-left-radius: 15px;
}
.batch-table tr:first-child th:last-child {
    border-top-right-radius: 15px;
}
.batch-table tr:last-child td:first-child {
    border-bottom-left-radius: 15px;
}
.batch-table tr:last-child td:last-child {
    border-bottom-right-radius: 15px;
}

/* Overview table */
.batch-table.overview td:nth-child(6) {
    width: auto;
    text-align: left;
}
.batch-table.overview td:nth-child(7) {
    width: auto;
    text-align: left;
}
.batch-table.overview td:nth-child(8) {
    text-align: center;
    width: 50px;
}
.batch-table.overview td:nth-child(9) {
    text-align: center;
    width: 50px;
}

/* Deleting units */
.delete-unit {
    border: none;
    background: none;
    color: #9A2E2E;
    font-size: 20px;
    text-align: center;
    width: 30px;
    height: 30px; 
    margin: 0; 
    cursor: pointer;
    line-height: 30px;
}
.delete-unit i {
    display: block; 
    margin: 0 auto; 
    pointer-events: none;
}

/* CSS for creating new batch */
.new-batch-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-label {
    display: none;
}

/* The form for creating a new batch */
.new-batch-form {
    margin-top: 30px;
    background-color: white;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 30px 0px 30px 0px;
}

.form-input {
    margin: 20px 40px 20px 40px;
}
.form-input.title input {
    border-radius: 7px;
    width: 400px;
    height: 40px;
    border: 1px solid gray;
}
.form-input.description textarea {
    border-radius: 10px;
    width: 100%;
    height: 200px;
    border: 1px solid gray;
}
.form-input.buttons {
    display: flex;
    justify-content: space-between;
}

.top-form {
    display: flex;
    justify-content: space-between;
}
.top-form i {
    font-size: 20px;
    float: right;
}

.middle-form {
    display: flex;
    justify-content: space-between;
}
.middle-form i {
    font-size: 60px;
}

.drag-n-drop {
    border-radius: 6px;
    border: 1px solid #979DA5;
    background: #F6F6F6;
    width: 400px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 20px;
}
.dropzone {
    border-radius: 6px;
    position: absolute;
    top: 40.1%;
    left: 18.25%;
    width: 400px;
    height: 150px;
    min-height: 50px !important; 
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
}

.show-device {
    margin-top: 15px;
}
.show-device-btn {
    background-color: #F6F6F6;
    color: black;
    border: 1px solid #979DA5;
    border-radius: 6px;
    padding: 5px 15px 5px 15px;
    font-size: 18px;
    text-decoration: none;
    width: 150px;
    display: flex;
    justify-content: center;
}
.show-device-btn:hover {
    background-color: #e6e6e6;
    color: black;
}

/* Cancel button */
.cancel {
    background-color: #9A2E2E;
    color: white;
    font-size: 18px;
    text-decoration: none;
}
.cancel:hover {
    background-color: #d35050;
    color: white;
}
.cancel a {
    text-decoration: none;
    color: white;
}
/* Confirm button */
.confirm {
    background-color: #32743D;
    color: white;
    font-size: 18px;
}
.confirm:hover {
    background-color: #4ba059;
    color: white;
}

/* The popup for clicking show devices */
#popup, #popup-box {
    display: none;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(000, 0, 0, 0.5);;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
    transition: 1s;
}
.popup-box {
    position: absolute;
    padding: 20px;
    width: 80%;
    max-width: 1420px;
    height: 80%;
    max-height: 1400px;
    border-radius: 15px;
    background: #F3EFF5;
    z-index: 1001;
    overflow: hidden;
    transition: 1s;
}

/* Inside the popup */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
.top-bar p {
    margin: 40px 0px 0px 40px;
    font-size: 40px;
}

.slider-alignment {
    display: flex;
    justify-content: center;
    position: absolute;
    width: 100%;
    top: 5px;
}
.open-slider-alignment {
    display: flex;
    justify-content: center;
    width: 100%;
    top: 10%;
    max-width: 1290px;
}
.slider-container {
    background-color: rgb(218, 218, 218);
    width: 329px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    margin-top: 50px;
}
.slider {
    width: 159px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: rgb(218, 218, 218);
}
#ready {
    background-color: #32743D;
    color: white;
}

.close-btn {
    opacity: 1;
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    border: none;
    background-color: #F3EFF5;
    font-size: 28px;
    color: #9A2E2E;
}
.close-btn:hover {
    font-size: 30px;
    transition: 0.3s;
}

.index {
    position: absolute;
    opacity: 0;
    display: none;
}

/* The sorting inside the popup */
.unit-filters {
    margin: 9% 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* The table inside the popup */
.unit-table {
    margin: 25px 20px 50px 20px;
    overflow-y: scroll;
    max-height: 55%;
}

.device-info-btn {
    color: black;
}
.device-info-btn:hover {
    color: black;
}

/* Creating a new device */
.new-unit-btn {
    font-size: 20px;
    border: none;
    border-radius: 8px;
    background-color: #32743D;
    color: white;
    padding: 10px 20px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    display: block;
}
.new-unit-btn:hover {
    background-color: #4ba059;
}


/* Cancel and submitting creating a new device */
.device-buttons-container {
    display: flex;
    justify-content: space-evenly;
    margin: 10px 20px 20px 20px;
}

.cancel-device-btn {
    background-color: #9A2E2E;
    color: white;
    font-size: 18px;
    text-decoration: none;
}
.cancel-device-btn:hover {
    background-color: #d35050;
    color: white;
}

.submit-device-btn {
    background-color: #32743D;
    color: white;
    font-size: 18px;
    text-decoration: none;
}
.submit-device-btn:hover {
    background-color: #4ba059;
    color: white;
}

/* Device info page */
.info-background {
    width: 100%;
    height: 800px;
    background-color: white;
    box-shadow: 1px 3px 5px 4px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    margin-top: 30px;
    padding: 30px 40px;
}

.edit-unit {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.top-div {
    display: flex;
    justify-content: space-between;
}

.device-details {
    display: flex;
    flex-direction: column;
}
.device-details h2 {
    margin-bottom: 20px;
}
.input-field {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.input-field input {
    width: 50%;
}
.input-field select {
    width: 50%;
}

.device-checklist {
    margin-top: 50px;
}

.bottom-div {
    display: flex;
    justify-content: space-between;
}

.device-comment {
    height: 300px;
    width: 75%;
}
.device-comment textarea {
    height: 80%;
    width: 100%;
    border-radius: 10px;
}
.device-condition {
    margin-right: 70px;
    margin-top: 30px;
}

.form-control {
    max-width: 250px;
}

/* Buttons */
.btn-headers {
    display: flex;
    justify-content: space-between;
}
.batch-btn.top-btn {
    font-size: 1rem;
    width: auto;
    margin: 0;
    align-items: center;
    padding: 0 15px;
    margin-left: 20px;
}

/** Overview style **/
#search-button {
    border: none;
    color: white;
    background-color: #32743D;
    padding: 2px 7px;
    border-radius: 3px;
}

#pagination-links {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.active-page {
    text-decoration: underline; 
}