﻿/* Global elements */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
	margin: 0px;
	font-family: Arial, sans-serif;
	font-size: 14px;
}

.page-container {
    display: flex;
    width: 100%;
    background-color: #fff;
    overflow: auto;
    flex-direction: column;
}

.page-container-modal {
	display: flex;
    width: 100%;
    background-color: #fff;
    overflow: auto;
    justify-content: center;
    padding-top: 20px;
}

.main {
    padding: 0 20px;
    overflow: auto;
}

h1 {
	font-size: 24px;
}

h3 {
    margin: 0 0 5px 0;
}

li {
    list-style: none;
}

ul {
    list-style: none;
    padding: 10px;
    margin: 0;
}

a {
    color: #597ab3;
    text-decoration: none;
    cursor: pointer;
}

a:hover{
    text-decoration: underline;
}

button {
    background-color: #e8f0fe;
    border: 1px solid #7c7c7c;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.buttonIcon {
    padding:3px;
    background: none;
    border: none;
    cursor: pointer;
}

/* Navigation Bar */
.nav-list {
    display: flex;
    flex-direction: row;
}

.nav-list li {
    padding: 8px;
}

/* Tool Bar */
.toolbar {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.toolbar-left {
    display: flex;
    gap: 20px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 20px;
}

.searchbar {
    padding: 4px;
}

.view-allergens {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #e8f0fe;
    border: 1px solid #7c7c7c;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    color: #000;
}

.view-allergens:hover {
    text-decoration: none;
}

/* Tables */
table {
    width:100%;
}

th {
    background-color: #e8f0fe;
    color: #333;
    padding: 4px;
    text-align: left;
    font-weight: bold;
}

tbody tr:nth-child(odd) {
  background-color: #f7f7f7;
}

tbody tr:nth-child(even) {
  background-color: #ffffff;
}

td {
    padding: 0px 4px;
    
}

td input{
    border:none;
    width: 100%;
    background-color: transparent;
}

td input:focus {
    outline: none;
    background-color: transparent;
}

td select {
    background-color: transparent;
}

th select {
    background-color: transparent;
}

.textInput {
    border:none;
    width: 100%;
}

.textInput:focus {
    outline: none;
    background-color: transparent;
}

td:focus-within {
  background-color: #f0f8ff;
  outline: 2px solid #007BFF;
  transition: background-color 0.2s ease;
}

.drag-handle {
    cursor: grab;
    text-align: center;
    font-size: 18px;
    color: #888;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Allergen Page */
.allergen-header {
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.allergen-subheader {
    background-color: #8dd6b8;
    text-align: center;
    width: 55px;
    font-size: 8px;
    position: sticky;
    top: 38px;
    z-index: 2;
}

.allergen-checkbox {
    width: 55px;
    margin: 5px 0;
}

.allergen-checkbox-inline {
    width: 25px;
    margin: 5px;
}

/* Menu Builder Page*/
.menu-header {
    margin-bottom: 15px;
}

.course-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0;
}
#coursesContainer {
    margin-bottom: 20px;
}
.course-grid {
    display: grid;
    grid-template-columns: 200px 1fr 120px 160px 80px;
    gap: 10px;
    align-items: center;
}

.course-grid-header {
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 6px;
}

.menu-input{
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
}

.course-add-row {
    margin-top: 5px;
}

.pricing-field {
    margin-top: 10px;
}

.pricing-summary {
    margin-top: 15px;
}

.pricing-slider {
    width: 300px;
    max-width: 100%;
}

 #worstCaseList {
     margin: 10px 0;
 }

 .load-menu-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow: auto;
}

.load-menu-item {
    text-align: left;
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.load-menu-text {
    display: flex;
    justify-content: space-between;
}

.load-menu-item-title {
    font-weight: 600;
}

.load-menu-item-meta {
    opacity: 0.7;
    font-size: 0.9em;
    margin-top: 2px;
}


/* Modal */
#refreshOverlay {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
}

#overlayContent {
    background-color: #fff;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 350px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal-content {
    background-color: #fff;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 350px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close:hover {
    color: #000;
}


.search-results{
  border: 1px solid #ccc;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
}

.search-results .result-item{
  padding: 8px 10px;
  cursor: pointer;
}

.search-results .result-item:hover{
  background: #f2f2f2;
}

.toolbar-search {
  position: relative;
  display: inline-block;
}

.toolbar-searchInput {
    width: 300px;
}

.search-results-float {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  border: 1px solid #ccc;
  background: #fff;
  max-height: 260px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.search-results-float .result-item {
  padding: 8px 10px;
  cursor: pointer;
}

.search-results-float .result-item:hover {
  background: #f2f2f2;
}

.search-results-float .result-meta {
  font-size: 0.9em;
  opacity: 0.75;
  margin-top: 2px;
}

