
/* Fonts
---------------------------------------------------------------------------- */
@font-face {
	font-family: 'Open Sans';
	src: url('/media/fonts/open-sans/OpenSans-Regular-webfont.eot');
	src: url('/media/fonts/open-sans/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
		url('/media/fonts/open-sans/OpenSans-Regular-webfont.woff') format('woff'),
		url('/media/fonts/open-sans/OpenSans-Regular-webfont.ttf') format('truetype'),
		url('/media/fonts/open-sans/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Open Sans';
	src: url('/media/fonts/open-sans/OpenSans-Semibold-webfont.eot');
	src: url('/media/fonts/open-sans/OpenSans-Semibold-webfont.eot?#iefix') format('embedded-opentype'),
		url('/media/fonts/open-sans/OpenSans-Semibold-webfont.woff') format('woff'),
		url('/media/fonts/open-sans/OpenSans-Semibold-webfont.ttf') format('truetype'),
		url('/media/fonts/open-sans/OpenSans-Semibold-webfont.svg#open_sanssemibold') format('svg');
	font-weight: bold;
	font-style: normal;
}

/* Basic page settings
---------------------------------------------------------------------------- */

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	font-family: "Open Sans", sans-serif;
	letter-spacing: -0.25px;
}

html, body {
	color: #000;
	padding: 0;
	margin: 0;
	-webkit-text-size-adjust: 100%;
}

html {
	touch-action: manipulation;
	background-color: #F7F7F7;
	height: 100dvh;
}

body {
	margin: 0 auto;
	height: 100%;
	font-size: 12pt;
	line-height: 1.2;
	overflow: hidden; /* prevent overscroll on iOS */
	max-width: 700px;
}

a {
	-webkit-touch-callout: none !important; 
 	-webkit-user-select: none !important;
 	color: #4CC667;
 	text-decoration: none;
}

p {
	line-height: 24px;
	margin: 0;
	padding: 0.5em 0;
}

h1 {
	margin: 0;
	text-align: center;
	font-size: 166%;
	font-weight: bold;
	padding: 1em 0 0.5em 0;
}

h2 {
	margin: 0;
	text-align: center;
	font-size: 133%;
	font-weight: bold;
	padding: 0.5em 0 0.25 0;
}

h3 {
	margin: 0;
	font-size: 116%;
	font-weight: bold;
	padding: 0.5em 0 0.25 0;
}


/* Layout
---------------------------------------------------------------------------- */

#app {
	position: relative;
	height: 100%;
	max-width: 1440px;
	margin: 0 auto;
}

.page-stack {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 86px;
}

.page {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	z-index: 1;
}

.content-scroll {
	height: 100%;
	overflow: auto;
	background-color: #F7F7F7;
	background-attachment: fixed;
	background-repeat: repeat;
}

.content-scroll.splash {
	background-color: #fff;
	text-align: center;
	padding: 4em 1em 1em 1em;
}

.head {
	margin: 0 auto;
	width: 100%;
	overflow: hidden;
	flex-shrink: 0;
	background-color: #fff;
	padding: 1em 0.25em;
	position: relative;
	font-size: 116%;
	font-weight: bold;
	text-align: center;
}

.head-back {
	position: absolute;
	font-size: 166%;
	color: #000;
	height: 100%;
	display: flex;
	width: 1.5em;
	top: 0;
	bottom: 0;
	flex-direction: column;
	justify-content: center;
}

.head-tabs {
	background-color: #fff;
	display: flex;
	xjustify-content: space-between;
	xgap: 1em;
	padding: 1em;
}

.head-tabs .tab {
	background-color: #fff;
	border: 0;
	cursor: pointer;
	border-radius: 4px;
	padding: 0.5em 1em;
}

.head-tabs .tab.active {
	background-color: #4CC667;
	border-radius: 4px;
	padding: 0.5em 1em;
	color: #fff;
}

.head-tabs select.tab {
	font-size: 12pt;
	width: 11em;
	appearance: none;
}


.menu {
  margin: 0 auto;
  width: 100%;
  min-height: 86px;
  height: auto;                           /* allow growth */
  overflow: visible;                      /* avoid internal clipping */
  /* flex-shrink: 0; */
  background-color: #fff;
  border-top: 1px solid #EDEDED;
  position: absolute;
  bottom: 0;                              /* keep docked to screen bottom */
  display: flex;
  justify-content: space-between;
  padding: 10px 0 calc(38px + env(safe-area-inset-bottom, 0px)) 0; /* add safe area */
}

.menu.disabled .menu-tab {
	opacity: 0.3;
	pointer-events: none;
}

.menu-tab {
	text-align: center;
  color: #4C4C4C;
  position: relative;

  /* Equal widths across items */
  flex: 1 1 0;          /* modern */
  flex-grow: 1;         /* explicit */
  min-width: 0;         /* prevent content from stretching item */
  width: 0;             /* extra safeguard for older WebKit */

  /* Legacy flexbox fallbacks */
  -webkit-box-flex: 1;  /* very old iOS/Android */
  -ms-flex: 1 1 0;      /* old IE/EdgeHTML */

  /* Keep labels on one line, truncate if too long */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-tab.active {
	color: #4CC667;
}

.menu-tab-description {
	font-size: 83%;
}

.menu-tab-count {
	font-size: 60%;
	position: absolute;
	top: 4px;
	left: 0;
	margin: auto;
	right: 4px;
	color: #4c4c4c;
}

.menu-tab.active .menu-tab-count {
	color: #fff;
}

.disable-overlay {
	z-index: 500;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background-color: rgba(255,255,255,0.5);
	backdrop-filter: blur(2px);
}

.input-field {
	padding: 0.75em 0;
	position: relative;
}

.input-name {
	font-size: 100%;
	position: absolute;
	background-color: #fff;
	top: 0.2em;
	padding: 0 0.5em;
	left: 0.5em;
}

input[type=text],
input[type=tel],
input[type=email],
input[type=password],
textarea {
	font-size: 12pt;
	padding: 0.3em 0.75em;
	width: 100%;
	color: #000;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
}

input::placeholder, textarea::placeholder {
	color: #000;
	opacity: 0.5;
}

input[type=checkbox] {
	cursor: pointer;
	position: relative;
	display: inline-block;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: #fafafa;
	border: 1px solid #ccc;
	border-radius: 4px;
	height: 24px;
	width: 24px;
	vertical-align: top;
	margin-bottom: 0;
	margin-top: 3px;
}

input[type=checkbox]:hover {
	background: #fff;
}

input[type=checkbox]:hover:after {
	border-color: #ddd;
}

input[type=checkbox]:focus {
	border: 1px solid #4cc667;
	outline: none;
}

input[type=checkbox]:checked {
	border: 1px solid #4cc667;
	background: #4cc667;
	color: #fff;
}

input[type=checkbox]:after {
	display: block;
	position: absolute;
	content: "";
	left: 8px;
	top: 3px;
	width: 4px;
	height: 12px;
	border: solid #eee;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

input[type=checkbox]:checked:disabled {
	border: 1px solid #888;
	background: #888;
}

input[type=checkbox]:checked:after {
	border-color: #fff;
}



.pane.pane-choice-group {
	padding-top: 0;
	padding-bottom: 0;
}

label.pane-choice {
	display: block;
	position: relative;
	border-top: 1px solid #EDEDED;
	padding: 0.75em 0;
}
label.pane-choice:first-child {
	border-top: none;
}
label.pane-choice svg {
	margin-right: 0.25em;
	vertical-align: middle;
}

label.pane-choice input {
	appearance: none;
}

label.pane-choice input:checked:after {
	display: block;
	position: absolute;
	content: "";
	right: 1em;
	top: 1em;
	width: 6px;
	height: 14px;
	border: solid #4cc667;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}


@keyframes flash-invalid {
	0%, 40%, 100% {
		background-color: var(#fff);
	}
	20%, 60% {
		background-color: var(#fa0);
	}
}

input.invalid, select.invalid {
	animation-name: flash-invalid;
	animation-duration: 900ms;
	animation-iteration-count: 1;
	animation-timing-function: ease-in-out;
}

button, .button {
	font-size: 116%;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 0.5em 1.5em;
	color: #000;
	background-color: #fff;
	cursor: pointer;
}

button.primary {
	color: #fff;
	border: 1px solid #4CC667;
	background-color: #4CC667;
	width: 100%;
}

button.secondary {
	color: #4c4c4c;
	border: 1px solid #4c4c4c;
}

button.tertiary {
	color: #4CC667;
	border: 1px solid transparent;
}

.delivery-progress {
	padding: 2em 0 1em 0;
	display: flex;
}

.delivery-progress-bar {
	display: block;
	height: 2px;
	width: 100%;
	background-color: #d9d9d9;
	margin-top: 0.5em;
}

.delivery-progress-bar-done {
	background-color: #4cc667;
	width: 10%;
}

.delivery-progress-start-time {
	margin: 0 0.5em 0 0;
}

.delivery-progress-waiting {
	margin: 0 1em;
}

.delivery-progress-point {
	margin-left: 1em;
}

.delivery-progress-point:first-child {
	margin-left: 0;
	margin-right: 1em;
}
button.delivery-completed svg {
	vertical-align: -0.15em;
}

label {
	cursor: pointer;
}

div.submit-wrap {
	position: relative;
	text-align: center;
	padding: 1em 0;
}

.warn {
	display: block;
	margin: 16px 0 2px 4px;
	font-size: 14px;
	color: #E87007;
	opacity: 0.8;
}

.warn svg {
	vertical-align: -2px;	
}

.inline-warn {
	font-weight: bold;
	color: var(--accent-primary-color);
	margin: 0 0 4px 0;
}

.inline-warn svg {
	vertical-align: -3px;
}


/* Modal
---------------------------------------------------------------------------- */

body.modal-active #app {
	filter: blur(4px);
}

.modal-background-blind {
	z-index: 190;
	background-color: #fff;
	opacity: 0.4;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

.modal {
	z-index: 200;
	position: fixed;
	margin: auto;
	background-color: rgba(255,255,255,0.8);
	color: #000;
	border-radius: 6px;

	top: 10vh;
	left: 16px;
	right: 16px;
	max-width: 500px;
	padding: 12px;
	text-align: center;
	max-height: 80vh;
	overflow: auto;
	box-shadow: 0px 8px 32px rgba(0,0,0,.125), 0px 0 8px rgba(0,0,0,.125);
}

.modal-icon {
	text-align: center;
}

.modal-icon svg {
	width: 24px;
	height: 24px;
	margin-top: 16px;
}

.modal-buttons {
	margin-top: 2em;
	padding: 0 8px;
	display: flex;
	align-content: flex-start;
	justify-content: space-between;
}

.modal-button {
	background-color: #2ecc71;
	background-color: var(--accent-primary-color);
	color: #fff;
	color: var(--accent-secondary-color);

	-webkit-appearance: none;
	cursor: pointer;
	border: 0;
	font-size: 18px;
	font-weight: bold;
	margin: 0 0 8px 0;
	padding: 12px 8px;
	text-align: center;
	cursor: pointer;
	border-radius: 4px;
	box-shadow: 0px 2px 2px rgba(0,0,0,.125);

	display: block;
	inline-size: 100%;
}

.modal-button-cancel {
	margin-right: 8px;
	background-color: #888;
	color: #fff;
}

.modal-close {
	position: absolute;
	cursor: pointer;
	top: 0;
	right: 0;
	color: #555;
	font-size: 34px;
	padding: 0.5em 0.75em;
}

@keyframes page-loader { 
	0% {transform: rotate(0deg); } 
	100% { transform: rotate(360deg);}
}

.loader {
	content: "";
	border-radius: 50%;
	width: 48px;
	height: 48px;
	position: absolute;
	margin: auto;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	border-left: 2px solid #4CC667;
	transform: translateZ(0);
	animation: page-loader 1.1s infinite linear;
}

.pane {
	margin: 0.25em;
	border-radius: 8px;
	background-color: #fff;
	padding: 1em;
}

.pane-link {
	color: #000;
	display: flex;
	justify-content: space-between;
	margin: 0.5em;
	border-radius: 8px;
	background-color: #fff;
	padding: 0.75em 0.5em;
	position: relative;
}
.pane-link.forward {
	padding-right: 2em;
}

.pane-link.forward:active,
.pane-link.backward:active {
	background-color: #eee;
}

.pane-link.forward:after {
	content: "›";
	font-size: 22pt;
	position: absolute;
	right: 0.5em;
	top: 0.16em;
}

.pane-link.backward {
	padding-left: 2em;
}

.pane-link.backward:after {
	content: "‹";
	font-size: 22pt;
	position: absolute;
	left: 0.5em;
	top: 0.16em;
}

.pane-link-setting {
	color: #888;
	font-size: 12pt;
	margin-top: 0.2em;
}

.pane.order {
	overflow: hidden;
	position: relative;
	display: flex;
	border: 1px solid #fff;
	padding: 0.75em 0.25em 0.75em 0.25em;
	flex-grow: 0;
}

.history-totals {
	display: flex;
	justify-content: space-between;
}

.history-empty {
	padding: 1em;
	text-align: center;
}

.history-total {
	flex-grow: 1;
}

.history-total-description {
	text-align: center;
	color: #4c4c4c;
}

.history-total-value {
	margin-top: 0.5em;
	text-align: center;
	color: #000;
	font-size: 125%;
	font-weight: bold;
}

.order-icon {
	display: inline-block;
	width: 20px;
	text-align: center;
	margin-right: 8px;
}

.order-info-line {
	display: flex;
}

.order-icon svg {
	vertical-align: middle;
}

.order-address {
	display: flex;
	color: #4C4C4C;
}

.pane-link.forward svg,
.pane-link.backward svg {
	vertical-align: middle;
	margin-right: 0.25em;
}

.order-destination {
	flex-grow: 1;
}

.order-name {
	color: #4C4C4C;
	padding-bottom: 0.25em;
}
.order-number {
	font-weight: bold;
	padding-bottom: 0.25em;
}

.order-status {
	margin-right: 10px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 0.5em;
}

.order-history {
	flex-grow: 1;
	color: #4c4c4c;
}
.order-history-line {
	display: flex;
	justify-content: space-between;
	margin-top: 0.25em;
}
.order-history-line:first-child {
	margin: 0;
}

.order-history-title {
	font-weight: bold;
	color: #000;
}

.order-info {
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex-grow: 0;
	color: #4C4C4C;
}

.order-info .order-info-line {
	justify-content: flex-end;
}

.order-time {
	padding-bottom: 0.25em;
}
.order-distance svg {
	vertical-align: -0.1em;
}
.order-distance {
	margin-top: 0.3em;
	background-color: #f7f7f7;
	border-radius: 10px;
	font-size: 10pt;
	color: #7a7a7a;
	display: inline-block;
	padding: 0.2em 0.75em 0.25em 0.75em;
}

.order-distance-to-delivery {
	background-color: #EEFAF0;
	color: #167A2D;
}

.order-claim {
	margin-top: 0.3em;
	border: 1px solid #c4c4c4;
	border-radius: 4px;
	text-align: center;
	font-size: 24pt;
	color: #000;
	width: 40px;
	height: 40px;
	display: inline-block;
}

.order-claim:hover {
	background-color: #c4c4c4;
}

.order-in-delivery {
	margin-top: 0.3em;
	background-color: #ddf9d2;
	border-radius: 10px;
	font-size: 10pt;
	color: #159511;
	display: inline-block;
	padding: 0.2em 0.75em 0.25em 0.75em;
}


.order-detail {
	background-color: #fff;
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
	margin-top:-16px;
	z-index: 1;
	position: relative;
	padding: 1em;
}

.order-head {
	display: flex;
	justify-content: space-between;
}

.order-comments {
	margin-top: 0.5em;
	display: flex;
}

.order-delivery-info {
	padding: 1.5em 0;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-content: stretch;
}

.order-box {
	flex-grow: 1;
	background-color: #f7f7f7;
	border-radius: 4px;
	width: 50%;
	padding: 1em;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 5em;
}

.order-box-head {
	font-size: 116%;
	font-weight: bold;
	color: #000;
}

.order-box-head svg {
	vertical-align: -4px;
	margin-right: 4px;
}

.order-contents {
	padding: 1.5em 0;
}

.product-extra {
	padding-left: 1em;
}

.order-delivery-action {
	display: flex;
	gap: 16px;
}

.order-delivery-action button {
	width: 50%;
}

table {
	border-collapse: collapse;
	width: 100%;
}

td {
	border-collapse: collpase;
	padding: 0.1em;
	margin: 0;
}

td.product-count {
	width: 1em;
}

table.products {
	margin-top: 0.5em;
}
table.products td {
	vertical-align: top;
	border-bottom: 1px solid #eee;
	padding: 0.5em 0;
}

table.products tr:last-child td {
	border-bottom: none;
}

.product-number {
	background-color: #000;
	color: #fff;
	font-size: 12pt;
	display: inline-block;
	padding: 0 0.25em;
	margin: 0 0.25em;
	border-radius: 4px;
}

.product-variant {
	color: #666;
}

.sticky {
	position: sticky;
	top: 0;
}

.maps-embed {
	border: none;
	width: 100%;
	height: 190px;
	background-color: #eee;
}


.maps-wrap {
	position: relative;
}

.travel-time {
	position: absolute;
	right: 4px;
	bottom: 4px;
	background-color: rgba(255,255,255,0.75);
	color: #4c4c4c;
	border-radius: 4px;
	padding: 8px;
	display: flex;
	gap: 8px;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}

.travel-time-item {
	border-left: 1px solid rgba(0,0,0,0.2);
	padding-left: 8px;
}
.travel-time-item:first-child {
	border-left: none;
}

.travel-time-time {
	font-weight: bold;
	font-size: 116%;
}

.button-bottom-hover {
	position: absolute;
	z-index: 10;
	bottom: 0.5em;
	padding: 0.5em 1.5em;
	width: 90%;
	margin: auto;
	left: 0;
	right: 0;
	box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.time-5  {color: #00B50B;}
.time-4  {color: #00B50B;}
.time-3  {color: #78AC00;}
.time-2  {color: #A89640;}
.time-1  {color: #D7711B;}
.time-0  {color: #FF3103;}

.time-5 svg path {fill: #00B50B;}
.time-4 svg path {fill: #00B50B;}
.time-3 svg path {fill: #78AC00;}
.time-2 svg path {fill: #A89640;}
.time-1 svg path {fill: #D7711B;}
.time-0 svg path {fill: #FF3103;}


.store-info {
	display: flex;
	justify-content: space-between;
}

.store-icon {
	width: 80px;
	height: 80px;
	border-radius: 40px;
}

.detail {
	font-size: 80%;
}

.tooltip {
	position: absolute;
	background-color: #555;
	color: #fff;
	padding: 6px 10px;
	border-radius: 4px;
	z-index: 1000;
	white-space: nowrap;
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
	pointer-events: none; /* So it doesn't block mouse events */
}

.tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	right: 32px;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #555 transparent transparent transparent;
}

.tooltip.show {
	opacity: 1;
}

.sort-list {
	position: relative;
}

.sort-placeholder {
	border: 2px dashed #ccc;
	border-radius: 4px;
	margin: 0.25em;
}

.sort-handle {
	margin-right: 10px;
	cursor: move;
	user-select: none;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 0.5em;
}

.sort-item.dragged {
	position: absolute;
	z-index: 16;
/*	left: 10px;*/
	box-shadow: 0 0 32px rgba(0,0,0,0.25);
}


/* Animations
---------------------------------------------------------------------------- */

@keyframes page-slide-in-from-right { from { transform: translateX(100%); } to { transform: translateX(  0%); } }
@keyframes page-slide-in-from-left  { from { transform: translateX(-30%); } to { transform: translateX(  0%); } }
@keyframes page-slide-out-to-left   { from { transform: translateX(  0%); } to { transform: translateX(-30%); } }
@keyframes page-slide-out-to-right  { from { transform: translateX(  0%); } to { transform: translateX(100%); } }

@keyframes head-show  { 0% { opacity: 0; } 25% { opacity: 1; } }
@keyframes head-hide  { 0%, 25% { opacity: 1; } 100% { opacity: 0; } }

.slide-in-from-right .content-scroll,
.slide-in-from-right .product-add {
	animation: page-slide-in-from-right;
	animation-timing-function: ease-in-out;
	animation-duration: 200ms;
	transform: translateX(0%);
}
.slide-in-from-left .content-scroll,
.slide-in-from-left .product-add {
	animation: page-slide-in-from-left;
	animation-timing-function: ease-in-out;
	animation-duration: 200ms;
	transform: translateX(0%);
}
.slide-out-to-left .content-scroll,
.slide-out-to-left .product-add {
	animation: page-slide-out-to-left ;
	animation-timing-function: ease-in-out;
	animation-duration: 200ms;
	transform: translateX(-30%);
}
.slide-out-to-right .content-scroll,
.slide-out-to-right .product-add {
	animation: page-slide-out-to-right;
	animation-timing-function: ease-in-out;
	animation-duration: 200ms;
	transform: translateX(100%);
}

.slide-in-from-left .head,
.slide-in-from-right .head {
	animation: head-show;
	animation-timing-function: ease-in-out;
	animation-duration: 100ms;
}

.slide-out-to-left .head,
.slide-out-to-right .head {
	animation: head-hide;
	animation-timing-function: ease-in-out;
	animation-duration: 200ms;
	opacity: 0;
}


/* iPhone Screen size fixes
---------------------------------------------------------------------------- */

/* Move everything in the status bar down by a few pixels if we are
on ios, so that we have a nice, plain background for the status bar */


/* iPhone Screen size fixes */
.head {
  padding-top: calc(env(safe-area-inset-top, 1em) + 1em);
}

/* keep bar at the very bottom; don't lift it up */
.menu {
  bottom: 0;
}

/* content area leaves space for the menu + safe area */
.page-stack {
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}

