/* ===========================
   HTML Reset
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

input,
textarea {
  border: 1px solid #ccc;
  padding: 0.5rem;
  border-radius: 4px;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: #4a90e2;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input[type=checkbox],
input[type=radio] {
  padding: 0;
  margin-right: 0.5rem;
}

body, html {
  background-color: #fff;
}
body:has(dialog[open]), html:has(dialog[open]) {
  overflow: hidden;
}

.btn-none {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.flex-grow,
.flex-fill {
  flex-grow: 1;
}

.buttonGroup {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.buttonGroup .secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 34px;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.buttonGroup .secondary:hover {
  background-color: #e4e4e4;
  color: #333;
  border-color: #bbb;
}

.app-header {
  padding: 10px;
  margin: 18px;
  border-radius: 40px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: sticky;
  top: 18px;
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(2px);
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.app-header .location-navigation ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 4px;
  border: 1px solid #eee;
  margin: 0;
  background-color: rgba(255, 255, 255, 0.8666666667);
  border-radius: 34px;
}
.app-header .location-navigation ul li a {
  display: block;
  padding: 0.6rem 1.2rem;
  border-radius: 60px;
  color: #333;
  background-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.app-header .location-navigation ul li a.active, .app-header .location-navigation ul li a:hover {
  background-color: #e4e4e4;
  color: #333;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}
@media (max-width: 500px) {
  .app-header .location-navigation ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
  }
  .app-header .location-navigation ul li a {
    padding: 0.6rem 0.25rem;
    text-align: center;
    font-size: 0.875rem;
    white-space: nowrap;
  }
}
.app-header .searchaddentry {
  display: flex;
  gap: 0.5rem;
}
@keyframes changecolor {
  0% {
    background-color: #ba1e86;
  }
  16.67% {
    background-color: #ff6b6b;
  }
  33.33% {
    background-color: #4ecdc4;
  }
  50% {
    background-color: #ffd166;
  }
  66.67% {
    background-color: #95e1d3;
  }
  83.33% {
    background-color: #c78bdb;
  }
  100% {
    background-color: #ba1e86;
  }
}
@media (max-width: 500px) {
  .app-header {
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    margin-bottom: 20px;
    align-items: stretch;
    border: 0;
  }
  .app-header .searchaddentry {
    justify-content: center;
  }
}

.searchInput {
  position: relative;
  padding-left: 40px;
  flex-grow: 1;
  flex-shrink: 0;
  border-radius: 34px;
  border: 1px solid #ccc;
  width: 260px;
  transition: width 0.2s ease;
}
@media (min-width: 600px) {
  .searchInput:has(input:focus) {
    border-color: #999;
    box-shadow: 0 0 0 transparent;
    width: 320px;
  }
}
@media (max-width: 500px) {
  .searchInput {
    width: calc(100% - 70px);
    flex-grow: 1;
  }
}
.searchInput input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0.9rem 0.7rem;
}
.searchInput input:focus {
  outline: none;
  border-color: #999;
  box-shadow: 0 0 0 transparent;
}
.searchInput::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("/resources/images/search.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

button.roundButton {
  background-color: #ba1e86;
  animation: changecolor 30s infinite;
  color: #fff;
  border-radius: 34px;
  border: none;
  width: 50px;
  height: 50px;
  aspect-ratio: 1/1;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease-in-out;
}
button.roundButton img {
  width: 20px;
  height: 20px;
}
button.roundButton:hover {
  background-color: #ba1e86;
  animation: none;
}

main {
  padding: 0 20px 20px;
}
@media (max-width: 500px) {
  main {
    padding: 0 10px 20px;
  }
}

/*

<dialog id="loginDialog" class="loginDialog">
      <div class="loginBox">
        <h2>Vorratsmanager</h2>
        <p id="loginError" class="loginError" hidden>Falsches Passwort</p>
        <form id="loginForm">
          <input type="password" id="loginPassword" placeholder="Passwort" autocomplete="current-password" required>
          <button type="submit" class="btn">Anmelden</button>
        </form>
      </div>
    </dialog>

*/
.loginDialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: 360px !important;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.loginDialog::backdrop {
  background-color: rgba(0, 0, 0, 0.95);
}
.loginDialog .loginBox {
  padding: 2.5rem 2rem;
  text-align: center;
}
.loginDialog .loginBox h2 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.9);
  transition: background-color 0.35s ease, overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
@starting-style {
  dialog::backdrop {
    background-color: rgba(0, 0, 0, 0);
  }
}
dialog:modal {
  max-width: calc(100% - 1rem);
  max-height: calc(100% - 1rem);
}

#addEntryDialog {
  width: 100vw;
  height: 100dvh;
  border: 1px solid #ccc;
  border-radius: 18px;
  padding: 20px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
#addEntryDialog .mobileCloseDialog {
  display: none;
  margin-bottom: 1rem;
  text-align: left;
}
@media (max-width: 600px) {
  #addEntryDialog {
    display: flex;
    flex-direction: column-reverse;
  }
  #addEntryDialog .mobileCloseDialog {
    display: block;
  }
  #addEntryDialog .dialogHeader {
    margin-bottom: 0;
    margin-top: 1rem;
    flex-direction: row-reverse;
  }
  #addEntryDialog .productgrid {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-content: flex-start;
    justify-content: stretch;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  #addEntryDialog .productgrid .product {
    aspect-ratio: 1/0.8;
    min-height: 0;
    width: calc(33% - 0.3rem);
  }
  #addEntryDialog .productgrid .product .product_info {
    padding: 0.5rem 0.35rem;
  }
  #addEntryDialog .productgrid .product h3 {
    font-size: 0.875rem;
  }
  #addEntryDialog .closeDialog {
    display: none;
  }
}
#addEntryDialog:not([open]) {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 40px));
  pointer-events: none;
}
@starting-style {
  #addEntryDialog[open] {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 40px));
  }
}
#addEntryDialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
}
#addEntryDialog header::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -10px;
  top: -10px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 80px;
  z-index: -1;
  border: 1px solid #eee;
}
#addEntryDialog header #searchAddList {
  flex-grow: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#addEntryDialog header #searchAddList:focus {
  outline: none;
  border-color: #4a90e2;
}
#addEntryDialog header .closeDialog {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 10px;
}
#addEntryDialog header .closeDialog:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.dialogHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.productDialog {
  width: 100%;
  max-width: 400px !important;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 18px;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
.productDialog:not([open]) {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 14px)) scale(0.96);
  pointer-events: none;
}
@starting-style {
  .productDialog[open] {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px)) scale(0.96);
  }
}
.productDialog h3,
.productDialog .changeMessage {
  text-align: center;
}
.productDialog:focus {
  outline: none;
}
.productDialog .dialogContent {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.productDialog .dialogContent .dialogCards {
  flex-grow: 1;
  border-radius: 18px;
  padding: 1rem;
  overflow: auto;
}
.productDialog .dialogContent .dialogSteps {
  flex-shrink: 0;
  flex-grow: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
}
.productDialog .dialogContent .dialogSteps .dialogStepButton {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #eee;
}
.productDialog .dialogContent .dialogSteps .dialogStepButton.active {
  background-color: #1e1e1e;
}
.productDialog .dialog_step {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.productDialog .dialog_step.active {
  display: flex;
}

.productDialogHeader {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 1rem 0;
  gap: 1rem;
}
.productDialogHeader .closeDialog {
  background: none;
  border: none;
  cursor: pointer;
}

.btn {
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  font-weight: 500;
  border: none;
  border-radius: 40px;
  background-color: #25222b;
  color: #fff;
  cursor: pointer;
}
.btn.btn--danger {
  background-color: #d0021b;
}

input[type=text],
select {
  border: 1px solid #eee;
  padding: 0.6rem;
  text-align: center;
  border-radius: 8px;
  width: 100%;
}

.quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.quantity button {
  width: 120px;
  height: 90px;
  border-radius: 14px;
  background-color: #eee;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
}
.quantity button:hover {
  background-color: #d1d1d1;
}
.quantity input[type=number] {
  width: 60px;
  text-align: center;
  border: 1px solid transparent;
  padding: 0.6rem;
  font-size: 20px;
  border-radius: 8px;
  flex-grow: 1;
  outline: none;
  appearance: textfield;
}
.quantity input[type=number]::-webkit-outer-spin-button, .quantity input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
.quantity input[type=number]:focus {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}

.chargeList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.charge {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  min-height: 64px;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.charge:has(input:checked) {
  background-color: #dfe8f5;
  border-color: #4a90e2;
}
.charge .charge_label {
  display: flex;
  align-items: center;
  font-weight: 600;
}
.charge .charge_quantity {
  color: #5b6170;
  white-space: nowrap;
}
.charge.charge--expired .charge_label {
  color: #b0011a;
}
.charge input[type=radio] {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ccc;
  appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.charge input[type=radio]:checked {
  background-color: #4a90e2;
}
.charge input[type=radio]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
}
.charge [name=best_before_date] {
  border: 0px solid transparent;
  padding: 0.5rem;
  text-align: right;
}

.js-product-addition-display {
  text-align: center;
}

.location-info:not([hidden]) + .quantity {
  margin-top: -0.25rem;
}

.edit-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.edit-dialog-content h3 {
  margin-bottom: 0.25rem;
}
.edit-dialog-content .location-info {
  margin: 0;
}
.edit-dialog-content .buttonGroup {
  margin-top: 0.5rem;
}

.productgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  height: fit-content;
}
.productgrid .product[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .productgrid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.product {
  background-color: #cddaed;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4/3;
  outline: 1px solid #cddaed;
  outline-offset: 1px;
  transition: background-color 0.2s ease, outline-offset 0.2s ease, outline-width 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  max-width: 400px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 600px) {
  .product {
    aspect-ratio: auto;
    min-height: 124px;
  }
}
.product::highlight {
  background-color: transparent;
  outline: none;
}
.product.ablauf-bald {
  background-color: #f8d7da;
  outline-color: #f5c6cb;
}
.product.ablauf-bald:hover {
  background-color: #f5c6cb;
}
.product.abgelaufen {
  background-color: #ec9aa3;
  outline-color: #e5838e;
}
.product.abgelaufen:hover {
  background-color: #e5838e;
}
.product.abgelaufen .product_expiry {
  color: #7a0b18;
  font-weight: 600;
}
.product:hover {
  background-color: #b5c8e6;
  outline-offset: 3px;
  outline-width: 2px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}
.product.touching {
  outline-offset: 0;
}
.product .product_info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  flex-grow: 1;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.product .product_info .product_title {
  font-size: 1.2rem;
  margin-bottom: 0.1rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.product .product_info .product_location {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8f99;
  margin-bottom: 0.2rem;
}
@media (max-width: 600px) {
  .product .product_info {
    padding: 0.75rem 0.5rem;
  }
  .product .product_info .product_title {
    font-size: 1.05rem;
  }
  .product .product_info .product_addition {
    font-size: 0.875rem;
  }
}
.product .product_info .product_addition {
  font-size: 1rem;
  color: #666;
}
.product .product_quantity {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  text-align: center;
  font-size: 1rem;
  border-radius: 0 0 18px 18px;
  position: relative;
}
.product .product_quantity .product_count {
  font-weight: 600;
}
.product .product_quantity .product_expiry {
  font-size: 0.8rem;
  color: #5b6170;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .product .product_quantity {
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
    column-gap: 0.5rem;
  }
}

.loginDialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: 360px;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.loginDialog::backdrop {
  background-color: rgba(0, 0, 0, 0.95);
}
.loginDialog .loginBox {
  padding: 2.5rem 2rem;
  text-align: center;
}
.loginDialog .loginBox h2 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}
.loginDialog #loginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.loginDialog #loginForm input[type=password] {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.2em;
}
.loginDialog #loginForm input[type=password]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.loginDialog .loginError {
  color: #d0021b;
  background: #fde8ea;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #888;
  font-size: 0.95rem;
  grid-column: 1/-1;
}

.empty-hint {
  text-align: center;
  padding: 2rem 1rem;
  color: #999;
  font-size: 0.95rem;
  grid-column: 1/-1;
}

.location-info {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  margin: 0.25rem 0 0.5rem;
}

button.roundButton[hidden] {
  display: none;
}

button.roundButton--ghost {
  background-color: #fff;
  animation: none;
  border: 1px solid #ccc;
  color: #999;
  cursor: pointer;
}
button.roundButton--ghost svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.roundButton--ghost .icon-moon {
  display: none;
}
button.roundButton--ghost:hover {
  background-color: #f4f4f4;
}
button.roundButton--ghost.is-on {
  color: #ba1e86;
  border-color: #ba1e86;
}
button.roundButton--ghost.is-dark .icon-sun {
  display: none;
}
button.roundButton--ghost.is-dark .icon-moon {
  display: block;
}
@media (max-width: 500px) {
  button.roundButton--ghost {
    display: none;
  }
}

.wakeLockVideo {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  bottom: 0;
  left: 0;
}

/*# sourceMappingURL=main.css.map */
