html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-family: Arial, sans-serif;
    background-color: black;

}

.card-container {
    display: flex;
    flex-direction: row; /*Arrange cards from right to left */
    flex-wrap: wrap;  /* Optional: allow wrapping to next row if space runs out justify-content: flex-start; */
    gap: 10px; /*Add some space between cards*/
}

 /*Mobile-friendly layout (top-to-bottom layout) */
@media (max-width: 768px) {
    .card-container {
        flex-direction: column;
        flex-wrap: nowrap;
        
    }
}

/* Add the fade-out class for the fade effect */
.fade-out {
    opacity: 0;
    transition: opacity 2s ease-out; /* Fades out over 2 seconds */
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease-in forwards; /* Adjust duration and timing */
    opacity: 0; /* Initial state */
}


.order-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    margin: 6px;
    width: 225px;
    height: 300px;
    background-color: white;
    /* Make the card a flex column so header is auto and body fills remaining space */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Finalised badge in order card header */
.finalised-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background-color: #6c757d;
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
}

/* Header Styling */
.order-header {
    display: flex;
    justify-content: space-between;
    padding: 6px;
    padding-bottom: 0;
    color: #fff;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    margin-bottom: 1px;
    cursor: pointer;
    /* Ensure header takes only needed height */
    flex: 0 0 auto;
}

    /* Disable cursor when print button is not shown */
    .order-header.no-print {
        cursor: default;
    }



    /* Optional: give the header a subtle left border when finalised */
    .order-header.finalised {
        border-left: 4px solid #6c757d;
    }

/* Let the order body stretch to fill the card */
.order-body {
    /* remove fixed max-heights and use flex to fill */
    flex: 1 1 auto;
    min-height: 0; /* allow the child to shrink inside flex container */
    overflow: auto;
}

    .order-body.has-arrows {
        overflow-y: auto; /* Enable vertical scrolling */
        /* no fixed max-height so it can stretch within the card */
    }

    .order-body.multicard {
        /* no fixed max-height so it can stretch within the card */
    }

.no-orders-msg {
    color: white;
}

.completed {
    background-color: green;
}

.pending {
    background-color: gray;
}


.table-info, .order-actions, .order-info {
    display: flex;
    flex-direction: column; /* Stack child elements vertically */
    font-size: 16px;
    margin: 0; /* Remove any additional margin */
    padding: 0; /* Remove padding */
}

.table-info {
    width: 90px;
    text-align: left; /* Center-align the content */
}
.order-actions {
    width: 40px;
    text-align: center;
}

.order-info {
    width: 90px;
    font-size: 14px;
    text-align: right;
}


.row {
    margin-bottom: 3px; /* Adds spacing between rows */
}

.row-align-right {
    margin-bottom: 3px; /* Adds spacing between rows */
    text-align: right;
}

.row-time-expired {

    align-items: baseline;
    text-align: right;
    gap: 4px;
}

.table-number {
    font-weight: bold;
}

.room-name {
    font-size: 12px;
    /* display: inline-block; /* Needed for width and text-overflow to work */
    max-width: 120px; /* Set the maximum width you want */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Show ellipsis (...) for truncated text */
    white-space: nowrap; /* Prevent text from wrapping */
    /* margin: 0; /* Remove any additional margin */
    /* padding: 0; /* Remove padding */
    line-height: 1.2;

}

.order-number {
    alignment: right;
    text-align: right;
    margin-left: 0px;
    width: 50px;
}

.order-time,
.order-time-expired-seconds {
    font-size: 14px;
    font-weight: normal;
    /* margin: 0; /* Remove any additional margin */
    /* padding: 0; /* Remove padding */
    line-height: 1.2;

}

.order-time-expired-minutes {
    font-size: 16px;
    font-weight: bold;
    /* margin: 0; /* Remove any additional margin */
    /* padding: 0; /* Remove padding */
    line-height: 1.2;
}

/*.order-actions {
    text-align: center;
    margin-bottom: 0px;
    display: inline-block;
    vertical-align: bottom;
}*/



.table-action-button,
.priority-Up-Button {
    display: inline-block;
    padding-right: 10px;
    padding-left: 0px;
    cursor: pointer;
    font-size: 32px; /* Adjust icon size */
}

    .table-action-button i,
    .priority-Up-Button i {
        margin-right: 0px; /* Space between icon and text */
        margin-left: 0px;
        pointer-events: none;
    }

    .table-action-button.clicked-animation {
        animation: printButtonClick 0.3s;
    }

    @keyframes printButtonClick {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.2);
        }

        100% {
            transform: scale(1);
        }
    }



/* Order Body */
.order-body {
    padding: 0px;
    background-color: #fff;
}

.order-items {
    list-style: none;
    padding: 0;
}
    .order-items li {
        margin: 0px 0;
        /*white-space: nowrap;*/
    }

    .order-items li.lineItem {
        margin-left: 0px;
        margin-right: 0px;
        margin-top: 1px;
        margin-bottom: 0px;
    }

    .order-items li.acknowledged {
        background-color: yellow;
        color: black;
    }

    .order-items li.completed {
        background-color: green;
        color: black;
    }

    .order-items li.allergy {
        color: red;
        font-weight: bold;
        margin-left: 5px;
    }


/*.order-item-info {
    list-style: none;
    padding: 0;
    margin-left: 10px;
}*/
.order-item-info {
    display: flex;
    align-items: center; /* Align items vertically in the center */
    justify-content: space-between; /* Space out the items horizontally */
    gap: 5px; /* Add some spacing between the items */
    margin-left: 5px;
    margin-right: 3px;
    margin-top: 0px;
    margin-bottom: 0px;
}
    .order-item-info .item {
        text-align: left; /* Ensure the text is always left-aligned */
    }


    .order-item-info .quantity {
        flex: 0 0 1px; /* Fixed width for the quantity */
        text-align: left;
    }

    .order-item-info .description {
        flex: 1; /* Takes up the remaining space */
        text-align: left;
        margin-top: 1px;
        margin-bottom: 0px;
    }

    /* Push action buttons to the right and keep them on one line */
.order-item-info .order-item-buttons {
    margin-left: auto; /* push group to the right */
    display: flex;
    justify-content: flex-end; /* align items to the right inside the group */
    column-gap: 0.2rem;
    row-gap: 0.25rem;
    flex: 0 0 auto; /* shrink-to-content; no growth or basis */
    width: auto; /* explicit shrink-to-fit */
    max-width: none; /* remove previous 60% constraint */
    flex-wrap: nowrap; /* keep buttons on one line */
}

/*
        .order-item-answers {
            list-style: none;
            padding: 0;
            margin-left: 20px;
        }
            .order-item-answers li {
                
                margin-top: 0px;
                margin-bottom: 0px;
                color: red;
                font-size: 14px;
            }*/

        .order-allergies {
    list-style: none;
    padding: 0;
    color: red;
    font-weight: bold;
}

    .order-allergies li {
        margin: 1px 0;
    }

/*.notes {
    display: block;
    color: red;
    font-size: 0.8em;
    margin-top: 5px;
}*/

.allergy {
    margin-right: 5px;
    font-size: 14px;
    font-weight: bold;
}

.answer {
    color: red;
    margin-left: 20px;
    margin-right: 5px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 14px;
}
.grid-answer {
    color: red;
    margin-left: 0px;
    margin-right: 2px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 14px;
}

.allergensTitle {
    color: red;
    margin-right: 0px;
    margin-top: 1px;
    font-size: 14px;
    margin-left: 20px;
}

.allergens {
    color: red;
    margin-right: 5px;
    margin-top: 1px;
    font-size: 14px;
    text-decoration: underline; /* Underline the text */
    margin-left: 0px;
    font-weight: bold;
}

.special-item {
    color: red;
    font-weight: bold;
}

/* More items */
.more-items {
    color: blue;
    cursor: pointer;
}

.combo-container {
    display: flex; /* Use Flexbox */
    flex-wrap: wrap;
    gap: 20px; /* Add space between elements */
    align-items: center; /* Align items vertically in the center */
    justify-content: center
}

/* Container for the Location label and combo box */
.select-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

     /*Style for the label*/
    .select-container label {
        margin-right: 10px;
        font-weight: bold;
        font-size: 18px;
        color: white;
    }

     /*Style for the combo box*/ 
    .select-container select {
        padding: 8px;
        font-size: 16px;
        border-radius: 4px;
        border: 1px solid #ccc;
        width: 300px
    }




.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    .order-table th, .order-table td {
        border: 1px solid #000;
        padding: 5px;
        text-align: center;
    }

    .order-table th {
        background-color: dimgrey; /* Yellow header */
        color: #f1c40f;
    }

    .order-table tr {
        background-color: #f2f2f2;  /* Light grey */
    }

    /*.order-table tr:nth-child(even) {
        background-color: #f2f2f2;*/ /* Light grey */
    /*}

    .order-table tr:nth-child(odd) {
        background-color: #dcdcdc;*/ /* Darker grey */
    /*}*/

    .order-table tr.active {
        background-color: yellow;
    }

    .order-table td:first-child {
        text-align: left;
        padding-left: 10px; /* Optional: Adds some spacing on the left for better visual balance */
    }

    .order-table td.left-align {
        text-align: left;
        padding-left: 30px; /* Optional: Adds some spacing on the left for better visual balance */
    }



.item-column {
    width: 30%; /* Adjust this percentage as needed */
}



/* Set a maximum width for the Room column and allow it to grow with its content */
.room-column {
    width: 20%; /* Adjust this percentage as needed */
    max-width: 20%;
    white-space:  normal; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add "..." for long content */
}

.highlight-row td {
    color: red;
}

button {
    padding: 5px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white;
    width: 175px
}

.button-width-small {
    width: 105px;
}



.acknowledge {
    background-color: #2c3e50; /* Dark grey */
    border: 1px solid black;
}

    .acknowledge.active {
        background-color: yellow;
        color: black;
    }

    .acknowledge:disabled {
        color: #666; /* Dimmed text */
        cursor: not-allowed; /* Show not-allowed cursor */
        opacity: 0.7; /* Semi-transparent look */
    }

.completed-button {
    background-color: #2c3e50; /* Dark grey */
    border: 1px solid black;
}

    .completed-button.completed-true {
        background-color: green;
    }

.completed-button:disabled {
        color: #666; /* Dimmed text */
        cursor: not-allowed; /* Show not-allowed cursor */
        opacity: 0.7; /* Semi-transparent look */
    }

.scrollDownBtn, .scrollUpBtn {
    cursor: pointer;
    font-size: 34px; /* Adjust icon size */
    padding-left: 35px;
    padding-right: 35px

}

/*.scrollUpBtn {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid black;*/ /* Upward triangle */
    /*cursor: pointer;
    margin-bottom: 5px;
    margin-top: 0px;
    margin-left: 15px;
}

.scrollDownBtn {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid black;*/ /* Downward triangle */
    /*cursor: pointer;
    margin-top: 0px;
    margin-bottom: 5px;
    margin-right: 15px;
}*/

/* Container for the triangle buttons */
.upDownButtons {
    display: flex;
    flex-direction: row; /* Arrange the buttons in a column (vertical) */
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    height: 30px; /* Adjust height to control the vertical space */
}

/* Style the maximize button */
.maximize-button {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: background-color 0.3s;
}

    .maximize-button:hover {
        background-color: #0056b3;
    }

/* Style the settings button */
/* Common button styles */
.maximize-button,
.settings-button,
.previous-hour-button {
    position: fixed;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: background-color 0.3s;
}

.maximize-button {
    top: 80px;
}

.settings-button {
    top: 140px;
}

.previous-hour-button {
    top: 220px;
    width: 75px;
    height: 75px;
}

.maximize-button:hover,
.settings-button:hover,
.previous-hour-button:hover {
    background-color: #0056b3;
}

    .settings-button:hover {
        background-color: #0056b3;
    }


/* Overlay settings panel */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.settings-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 500px;
    position: relative;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* Close button (cross) */
#close-settings {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

    .close-settings:hover {
        color: #ff0000;
    }

/* Hidden class for toggling overlay visibility */
.hidden {
    display: none;
}



/* Toggle switch container */
.setting-item {
    margin: 14px 0;
    font-size: 14px;
}
    /*Style for the combo box*/
    .setting-item select {
        padding: 8px;
        font-size: 14px;
        border-radius: 4px;
        border: 1px solid #ccc;
    }

    .setting-item button {
        font-size: 14px;
    }

/* Custom toggle styling */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.toggle-input {
    width: 20px;
    height: 20px;
    accent-color: #007bff; /* Checkbox color */
}

/* Optional: If you'd like a modern toggle switch style */
.toggle-label .toggle-input {
    appearance: none;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .toggle-label .toggle-input:checked {
        background-color: #007bff;
    }

        .toggle-label .toggle-input:checked::before {
            transform: translateX(20px);
        }

    .toggle-label .toggle-input::before {
        content: "";
        position: absolute;
        width: 18px;
        height: 18px;
        background-color: #fff;
        border-radius: 50%;
        top: 1px;
        left: 1px;
        transition: transform 0.3s;
    }

/* General styling for the date picker */
.date-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.date-input {
    font-size: 16px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
}

    /* Disabled styling for the date picker */
    .date-input:disabled {
        background-color: #e9ecef;
        cursor: not-allowed;
    }


.make-again-button {
    background: none;
    border: none;
    color: yellow; /* Bootstrap's primary color */
    font-size: 16px;
    cursor: pointer;
    padding: 1px;
    /* margin-left: auto;  Push the button to the far right */
    width: 20px;
    margin-right: 5px
}
    .make-again-button:hover {
        color: #0056b3; /* Darker shade for hover */
    }

    .make-again-button i {
        font-size: 16px; /* Adjust icon size */
        vertical-align: middle;
        
    }

@keyframes rotate-animation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(1080deg); /* 3 full rotations */
    }
}

.make-again-button.rotate {
    animation: rotate-animation 1s ease-in-out;
}

.make-again-button:disabled {
    color: #666; /* Dimmed text */
    cursor: not-allowed; /* Show not-allowed cursor */
    opacity: 0.7; /* Semi-transparent look */
}


.selected-location {
    display: flex;
    align-items: center;
    margin-right: 0px; /* Adjust spacing */
    margin-left: 0px; /* Adjust spacing */
    font-size: 12px;
}