
/* Base styling */

* {
    margin: 0;
    padding: 0;
    font: inherit;
}

body {
    background-color: #eeece7;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #555;
    font-size: 14px;
    font-weight: 300;
}

#app {
    min-height: 100vh; /* 100% viewport height so we can show footer at bottom */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* space between content and footer to move footer to bottom */
}
#app:focus {
    outline: none; /* app container may receive focus to fix tab order, but that focus should not be visible */
}

.clickable {
    cursor: pointer;
}

button {
    background-color: inherit;
    border: none;
    cursor: pointer;
}

/* Button for use on bare page (outside any box) */
.main-btn {
    padding: 10px 20px;
    background-color: #647b8b;
    color: white;
    border-radius: 3px;
    margin-top: 10px;
}



#main-menu {
    background-color: #3c5263;
}
#main-menu .menu {
    display: flex;
    flex-direction: row;
}
#main-menu .menu .grower {
    flex-grow: 1;
}
#main-menu .menu .item {
    padding: 20px 40px;
    font-size: 18px;
    cursor: pointer;
    color: #d3dee6;
    position: relative;
    overflow: hidden;
}
#main-menu .menu .item.title {
    cursor: default;
    color: #d3dee6;
}
#main-menu .menu .item:not(.title):hover {
    color: white;
}
#main-menu .menu .item.active {
    color: white;
}
#main-menu .menu .item .dot {
    display: none;
    width: 12px;
    height: 12px;
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    transform: rotate(45deg);
    background-color: #e3edf0;
}
#main-menu.with-submenu .menu .item .dot {
    background-color: #50687b;
}
#main-menu .menu .item.active .dot {
    display: block;
}

#interview-menu {
    background-color: #50687b;
}
#interview-menu .menu {
    display: flex;
    flex-direction: row;
}
#interview-menu .menu .item {
    padding: 20px 40px;
    font-size: 14px;
    cursor: pointer;
    color: #e8edf0;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
#interview-menu .menu .item.title {
    text-overflow: ellipsis;
}
#interview-menu .menu .item:hover {
    color: white;
}
#interview-menu .menu .item.active {
    color: white;
}
#interview-menu .menu .item .dot {
    display: none;
    width: 12px;
    height: 12px;
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    transform: rotate(45deg);
    background-color: #e3edf0;
}
#interview-menu .menu .item.active .dot {
    display: block;
}
#interview-menu .menu .issue-counter {
    font-size: 12px;
    margin-left: 5px;
    color: #ffb300;
}
#interview-menu .menu .item u {
    text-decoration: none;
}
#interview-menu .menu .item:hover u,
#interview-menu .menu .item.active u {
    text-decoration: underline;
}


.container {
    width: 1000px;
    margin: auto;
}

.page {
    padding-top: 20px;
}



/* Autosuggest input */
.autosuggest {
    display: inline-block;
    position: relative;
}
.autosuggest .options {
    position: absolute;
    top: 100%;
    z-index: 2; /* show on top of other elements */
    left: 0;
    margin-top: 0px;
    background-color: white;
    color: #607880;
    min-width: 100%;
    border-radius: 3px;
    box-shadow: rgba(0,0,0,0.3) 0 0 5px;
    /* max-height: 120;
    overflow-y: 'scroll'; */
}
.autosuggest ul {
    list-style: none;
}
.autosuggest .option {
    padding: 10px 20px;
    cursor: pointer;
}
.autosuggest .option:hover {
    background-color: #f7fbff;
}
.autosuggest .option.highlighted {
    background-color: #e4f0fb;
}



/* Main table */

.table > .row {
    display: flex;
    align-items: stretch;
    background-color: white;
    margin-top: 2px;
    border-radius: 5px;
    color: #637481;
    min-height: 45px;
    padding-left: 10px;
    padding-right: 10px;
}
.table > .row.header {
    background-color: inherit;
    min-height: 0;
}
.table > .row.expanded { /* expanded row has a subrow below */
    border-radius: 5px 5px 0 0;
}
.table > .subrow {
    margin-top: 0;
    border-radius: 0 0 5px 5px;
    background-color: #50687b;
    box-shadow: inset 0px 20px 15px -20px rgba(0,0,0,0.3);
    padding: 10px 20px;
    color: #e0e6ec;
    display: block;
}
.table > .row > .cell {
    flex: 1 1 100px; /* all columns get same base size, grow equally independent of content size */
    display: flex;
    overflow: auto; /* scroll if content too large */
    box-sizing: border-box; /* width includes padding */
    align-items: center; /* input field text is also vertically centered */
}
.table > .row > .cell.padded {
    padding: 10px;
}
.table > .row > .cell.header {
    font-size: 12px;
    font-weight: 500;
    color: #596a78;
    padding: 10px;
}
.table > .row > .cell.expanded {
    position: relative; /* for .dot absolute positioning */
}
.table > .row > .cell .dot {
    display: none;
}
.table > .row > .cell.expanded .dot { /* triangle that indicates that a tab is expanded */
    display: block;
    width: 0;
    height: 0;
    border: solid 8px transparent;
    border-bottom-color: #455969;
    position: absolute;
    bottom: 0;
    left: 50%;
    margin-left: -8px;
    pointer-events: none; /* don't block clicks on parent */
}
.table > .row > .cell.centered {
    justify-content: center;
}


/* Main table form elements */
.table > .row > .cell input,
.table > .row > .cell select,
.table > .row > .cell button,
.table > .row > .cell textarea {
    outline: none;
    width: 100%;
    padding: 10px; /* minimum padding for when cell content exceeds row height */
    align-self: stretch; /* grow to full cell height */
    background-color: inherit;
    color: #233d4f;
    border: none;
    text-align: left;
    box-sizing: border-box; /* width includes padding */
}
.table > .row > .cell input::placeholder,
.table > .row > .cell textarea::placeholder {
    color: #acb8bd;
    opacity: 1; /* on firefox the default placeholder style is translucent */
}
.table > .row > .cell input:focus,
.table > .row > .cell select:focus,
.table > .row > .cell:not(.expanded) button:focus /* expanded cell has background image which would conflict with underline */ {
    border-bottom: solid 3px #ea9700; /* focusable elements in main rows get underline */
}
.table > .row > .cell button:focus {
    color: #ea9700; /* buttons also get text color and bold on focus */
}
.table > .row > .cell button.icon  {
    padding: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #637481;
}




/* Main table filters */
.table > .row.filter > .cell > input,
.table > .row.filter > .cell > select {
    margin: 10px;
    font-size: 12px;
    background-color: #e0e4e8;
    border-radius: 3px;
    padding: 5px 10px;
}
.table > .row.filter > .cell > select:focus {
    border: none; /* reset default bottom-border on inputs */
    background-color: #59758d;
    color: white;
}


/* Interview recall page */
#recall .table > .row > .cell {
    overflow: visible; /* must be visible for autosuggest dropdowns */
}
#recall .table > .row > .cell.time {
    flex: 0 0 120px;
}
#recall .table > .row > .cell.meal {
    flex: 0 0 150px;
}
#recall .table .row .cell.questions,
#recall .table .row .cell.ingredients,
#recall .table .row .cell.quantities {
    flex: 0 0 110px;
}
#recall .table .row .cell.volumes {
    flex: 0 0 120px;
}
#recall .table > .row > .cell.icon {
    flex: 0 0 40px;
}
#recall .table .row .cell.questions,
#recall .table .row .cell.ingredients,
#recall .table .row .cell.quantities,
#recall .table .row .cell.volumes {
    justify-content: center;
}
#recall .table .row .cell.questions button,
#recall .table .row .cell.ingredients button,
#recall .table .row .cell.quantities button,
#recall .table .row .cell.volumes button {
    text-align: center;
}
#recall .table > .row > .cell.name > .autosuggest {
    display: flex; /* allow input element to stretch vertically */
    align-self: stretch; /* fill cell height */
}


/* Interview notes page */
#notes textarea {
    min-height: 400px;
    line-height: 20px;
    padding: 15px 20px;
}


/* Issues page */
#issues .table .cell.success {
    color: #478200;
    font-weight: 500;
    justify-content: center;
}



/* Subrow form inputs */

.table .subrow input,
.table .subrow select {
    background-color: #344d61;
    border-radius: 3px;
    color: #cbd6df;
    border: none;
}
.table .subrow input:not([type="range"]):focus,
.table .subrow select:focus {
    outline: none; /* remove focus browser styling */
    border-bottom: solid 2px #ea9700;
    padding-bottom: 8px !important; /* default bottom is 10px, remove 2px for border */
}
.table .subrow input::placeholder {
    color: #738d9e;
    opacity: 1; /* on firefox the default placeholder style is translucent */
}
.table .subrow input:disabled {
    background-color: #435b6e;
}

/* Subrow autosuggest input */
.table .subrow .tags-container {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
.table .subrow .tags-container .autosuggest {
    flex-grow: 1;
}
.table .subrow .tags-container .tag {
    border-radius: 3px;
    padding: 10px;
    background-color: #344d61;
    color: #cbd6df;
    position: relative;
}

/* Subrow slider styling (some duplicates because browsers don't want it combined) */
.table .subrow input[type="range"] {
    -webkit-appearance: none;
    padding: 0; /* reset our general input style */
    background-color: inherit !important; /* reset our general input style */
    outline: none; /* remove focus browser styling */
}
.table .subrow input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #e3edf0;
    width: 15px;
    height: 15px;
    border-radius: 5px;
    border: none;
    margin-top: -5px; /* center vertically */
}
.table .subrow input[type="range"]::-moz-range-thumb {
    background: #e3edf0;
    width: 15px;
    height: 15px;
    border-radius: 5px;
    border: none;
}
.table .subrow input[type="range"]::-webkit-slider-runnable-track {
    background: #304657;
    height: 5px;
    border-radius: 5px;
}
.table .subrow input[type="range"]::-moz-range-track {
    background: #304657;
    height: 5px;
    border-radius: 5px;
}
.table .subrow input[type="range"]:focus::-webkit-slider-runnable-track {
    background: #223544;
}
.table .subrow input[type="range"]:focus::-moz-range-track {
    background: #223544;
}



/* Subrow tables common */
.expansion-table {
    display: flex;
    flex-direction: column;
    gap: 5px; /* 5px margin between rows */
}
.expansion-table > .row {
    display: flex;
    align-items: flex-start;
    gap: 2px; /* 2px margin between columns */
}
.expansion-table > .row > .cell {
    flex: 1 1;
    box-sizing: border-box; /* cell widths include padding */
}
.expansion-table > .row > .cell.padded {
    padding: 10px;
}
.expansion-table > .row > .cell.header {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
}
.expansion-table > .row > .cell input,
.expansion-table > .row > .cell select {
    box-sizing: border-box; /* input widths include padding */
    padding: 10px;
    width: 100%;
}
.expansion-table > .row > .cell > .autosuggest {
    width: 100%;
}


/* Questions subrow */
#recall .subrow.questions .cell.question {
    flex: 1 1 50%;
}
#recall .subrow.questions .cell.answer {
    flex: 1 1 50%;
}


/* Ingredients subrow */
#recall .subrow.ingredients .cell.name {
    flex: 0 0 300px;
    margin-right: 5px;
}
#recall .subrow.ingredients .cell.conditions {
    flex: 1 1 100%;
}
#recall .subrow.ingredients .cell.delete button {
    padding: 10px;
    color: #e0e6ec;
}
#recall .subrow.ingredients .cell.delete button:focus {
    outline: none;
    color: orange;
}
#recall .subrow.ingredients .cell.delete button:disabled {
    opacity: 0;
}


/* Quantities subrow */
#recall .subrow.quantities .cell.name {
    flex: 0 0 200px;
}
#recall .subrow.quantities .cell.conditions {
    flex: 1 1 200px;
    margin-left: 5px;
}
#recall .subrow.quantities .cell.quantity {
    flex: 0 0 80px;
}
#recall .subrow.quantities .cell.unit {
    flex: 0 0 150px;
}

/* Volumes subrow */
#recall .subrow.volumes {
    display: flex;
}
#recall .subrow.volumes .pie {
    flex: 0 0 150px;
    display: flex;
    align-items: center;
}
#recall .subrow.volumes .expansion-table {
    flex: 1 0 100px;
}
#recall .subrow.volumes .cell.icon {
    flex: 0 0 30px;
    align-self: stretch;
    display: flex;
    align-items: center;
}
#recall .subrow.volumes .cell.label {
    flex: 0 0 150px;
}
#recall .subrow.volumes .cell.quantity {
    flex: 0 0 100px;
}
#recall .subrow.volumes .cell.unit {
    flex: 0 0 150px;
}
#recall .subrow.volumes .cell.ratio {
    margin-left: 5px;
    flex: 0 0 200px;
    align-self: stretch;
    display: flex;
    align-items: stretch; /* grow slider inputs to full height */
}



#interviews .table > .row > .cell.code,
#interviews .table > .row > .cell.meeting {
    flex: 0 0 120px;
}
#interviews .table > .row > .cell.updated,
#interviews .table > .row > .cell.sent {
    flex: 0 0 120px; /* note: cell may contain time (narrow) OR date (wider) */
}
#interviews .table > .row > .cell.dishes,
#interviews .table > .row > .cell.send,
#interviews .table > .row > .cell.delete {
    flex: 0 0 80px;
    justify-content: center;
}
#interviews .table .icon.sent,
#interviews .table .icon.unsent {
    color: #fff;
    padding: 5px;
    background-color: #a9b0b5;
    border-radius: 40px; /* circle */
}
#interviews .table .icon.sent {
    background-color: #a3bd5a;
}
#interviews .table .icon.unsent {
    background-color: #e6a52d;
}
#interviews .table .icon.empty {
    background-color: #a9b0b5;
}


#interviews .status-bar,
#assignments .status-bar {
    background-color: #d1cdc4;
    padding: 10px;
    color: #60563f;
    text-align: center;
    border-radius: 3px;
}
#interviews .status-bar .action,
#assignments .status-bar .action {
    margin-left: 10px;
    padding-left: 10px;
    border-left: solid 1px #60563f;
    font-weight: 500;
}

#interviews .empty-message,
#assignments .empty-message {
    background-color: white;
    border-radius: 3px;
    padding: 10px 20px;
    margin-top: 2px;
    text-align: center;
}


#assignments .table > .row > .cell.id {
    flex: 0 0 80px;
}
#assignments .table > .row > .cell.code {
    flex: 0 0 120px;
}
#assignments .table > .row > .cell.date {
    flex: 0 0 120px;
}
#assignments .table > .row > .cell.comment {
    flex-grow: 3;
}
#assignments .table > .row > .cell.add {
    flex: 0 0 80px;
    justify-content: center;
}
#assignments .table > .row > .cell.add button {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



#login {
    max-width: 500px;
    background-color: white;
    padding: 30px 40px;
    margin-top: 40px;
    border-radius: 3px;
    color: #365e6a;
}
#login h2 {
    font-size: 30px;
    margin-bottom: 20px;
    font-weight: 100;
}
#login label {
    display: inline-block;
    width: 100px;
}
#login input {
    border: none;
    border-radius: 3px;
    padding: 10px 20px;
    background-color: #f7f5ef;
    color: #6d6859;
    margin-bottom: 10px;
}
#login button {
    border: none;
    border-radius: 3px;
    padding: 10px 20px;
    background-color: #7f9da6;
    color: white;
    margin-left: 100px;
}
#login .loading {
    margin-left: 10px;
}
#login .error {
    margin-left: 100px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #970404;
}


#logout {
    text-align: center;
}

#settings .logout-msg {
    padding: 15px;
    background-color: white;
    color: #365e6a;
    border-radius: 3px;
    line-height: 20px;
}



#init .loading {
    text-align: center;
}
#init h1 {
    font-size: 20px;
    color: #db0000;
    margin-bottom: 10px;
}
#init h2 {
    font-size: 16px;
    margin-bottom: 10px;
}
#init p {
    margin-bottom: 10px;
}
#init textarea {
    width: 100%;
}
#init button {
    margin: 0;
    margin-bottom: 10px;
}
#init button.warning {
    background-color: #b30000;
}



#app-footer {
    padding: 30px 0 20px;
    font-size: 11px;
    text-align: center;
    color: #50687b;
    line-height: 18px;
}
#app-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}
