@import "https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap";

body {
  margin: 0;
  padding: calc(5rem + env(safe-area-inset-top)) 0 calc(6rem + env(safe-area-inset-bottom)) 0;
  font-family: 'Silkscreen', monospace;
  background-color: #f5f5f5;
  color: #2d3748;
}

.page {
  min-height: calc(100vh - 11rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

@media (min-width: 1100px) {

  body {
    padding: calc(2rem + env(safe-area-inset-top)) 0 calc(6rem + env(safe-area-inset-bottom)) 0;
  }
  
  .page {
    min-height: calc(100vh - 8rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  color: #333;
  margin-top: 0;
}

.header-with-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.header-with-link a {
  color: #ff8c00;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
}

.header-with-link a:hover {
  text-decoration: underline;
}

.header-links {
  display: flex;
  gap: 1rem;
}

.info-section {
  margin-top: 2rem;
  color: #666;
}

.info-section, ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.login-container {
  max-width: 600px;
  margin: 4rem auto;
  padding: 3rem;
  background-color: #ffffff;
}

.login-container, h1 {
  font-family: 'Silkscreen', monospace;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #2d3748;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  border: 3px solid #2d3748;
  background-color: #ffffff;
  color: #2d3748;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #ff8c00;
}

.remember-me {
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.remember-me input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #2d3748;
  background-color: #ffffff;
  margin-right: 0.75rem;
  cursor: pointer;
}

.remember-me input:checked {
  background-color: #ff8c00;
  border-color: #ff8c00;
}

.remember-me label {
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.btn-submit {
  width: 100%;
  font-family: 'Silkscreen', monospace;
  border: 3px solid #2d3748;
  padding: 1rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  background-color: #2d3748;
  color: #ffffff;
}

.week-section {
  margin-bottom: 3rem;
}

.week-header {
  font-size: 1.5rem;
  color: #2d3748;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.dinner-plan {
  margin-top: 2rem;
}

.days {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dinner-day {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background-color: #ffffff;
  border: 3px solid #2d3748;
}

.dinner-day:hover {
  border-color: #ff8c00;
}

.day-name {
  font-weight: bold;
  min-width: 150px;
  color: #2d3748;
  font-size: 1rem;
}

.meal-name {
  color: #666;
  font-size: 1rem;
}

.plan-history {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 2rem;
}

.plan-week-item {
  background-color: #ffffff;
  border: 3px solid #2d3748;
  margin-bottom: 1rem;
}

.plan-week-item:hover {
  border-color: #ff8c00;
}

.week-link {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.week-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.week-label {
  color: #2d3748;
  font-size: 1rem;
  font-weight: bold;
}

.current-label {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: normal;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  overflow: visible;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.delete-button {
  background-color: #dc3545;
  color: #ffffff;
  border: none;
  cursor: pointer;
  height: 100%;
  flex: 1;
  padding: 0;
}

.delete-button svg {
  height: 60%;
  width: auto;
}

.todo-item.completed .todo-label {
  color: #ff8c00;
}

.todo-input-wrapper {
  right: 0;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  max-width: 100%;
  align-items: center;
  padding: 0 0.5rem 1.5rem 0.5rem;
  position: fixed;
  border-top: 3px solid #2d3748;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  display: flex;
  bottom: 0;
  left: 0;
}

.todo-input-wrapper:focus-within {
  border-top-color: #ff8c00;
}

.todo-input {
  flex: 1;
  height: 2.5rem;
  padding: 0.5rem 0;
  font-family: 'Silkscreen', monospace;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: #2d3748;
}

.todo-input:focus {
  outline: none;
}

.todo-submit-icon {
  width: 2.5rem;
  justify-content: center;
  height: 2.5rem;
  border: none;
  align-items: center;
  padding: 0.5rem;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  background: transparent;
  color: #2d3748;
}

.todo-submit-icon:hover {
  color: #ff8c00;
}

.todo-submit-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (min-width: 400px) {

  .todo-input-wrapper {
    padding: 1rem 1.5rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  
  .todo-input {
    padding: 0.5rem;
    font-size: 1.2rem;
  }

}

@media (min-width: 1100px) {

  .todo-input-wrapper {
    bottom: 1rem;
    border: 3px solid #2d3748;
    max-width: 800px;
    margin: 0 auto;
    padding: 0.5rem 0.75rem;
    padding-bottom: 0.5rem;
  }
  
  .todo-input-wrapper:focus-within {
    border-color: #ff8c00;
  }
  
  .todo-input {
    padding: 0.5rem;
  }

}

.dinner-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dinner-item {
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  overflow: visible;
}

.dinner-name {
  padding: 1rem;
  flex: 1;
  color: #2d3748;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.delete-button {
  background-color: #dc3545;
  color: #ffffff;
  border: none;
  cursor: pointer;
  height: 100%;
  flex: 1;
  padding: 0;
}

.delete-button svg {
  height: 60%;
  width: auto;
}

.dinner-input-wrapper {
  gap: 1rem;
  right: 0;
  align-items: center;
  padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom));
  position: fixed;
  z-index: 1000;
  background-color: transparent;
  display: flex;
  bottom: 0;
  left: 0;
}

.dinner-input {
  flex: 1;
  padding: 1rem;
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  border: 3px solid #2d3748;
  background-color: #ffffff;
  color: #2d3748;
}

.dinner-input:focus {
  outline: none;
  border-color: #ff8c00;
}

.dinner-submit-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dinner-submit-icon svg {
  height: 3rem;
  width: 3rem;
  color: #2d3748;
}

.dinner-submit-icon:hover, .dinner-submit-icon svg {
  color: #ff8c00;
}

.staple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.staple-item {
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  overflow: visible;
}

.staple-name {
  padding: 1rem;
  flex: 1;
  color: #2d3748;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.delete-button {
  background-color: #dc3545;
  color: #ffffff;
  border: none;
  cursor: pointer;
  height: 100%;
  flex: 1;
  padding: 0;
}

.delete-button svg {
  height: 60%;
  width: auto;
}

.staple-input-wrapper {
  gap: 1rem;
  right: 0;
  align-items: center;
  padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom));
  position: fixed;
  z-index: 1000;
  background-color: transparent;
  display: flex;
  bottom: 0;
  left: 0;
}

.staple-input {
  flex: 1;
  padding: 1rem;
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  border: 3px solid #2d3748;
  background-color: #ffffff;
  color: #2d3748;
}

.staple-input:focus {
  outline: none;
  border-color: #ff8c00;
}

.staple-submit-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.staple-submit-icon svg {
  height: 3rem;
  width: 3rem;
  color: #2d3748;
}

.staple-submit-icon:hover, .staple-submit-icon svg {
  color: #ff8c00;
}

.pxl-checkbox-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.todo-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #2d3748;
  background-color: #ffffff;
  margin-right: 1rem;
  cursor: pointer;
}

.todo-checkbox:checked {
  background-color: #ff8c00;
  border-color: #ff8c00;
}

.todo-label {
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.pxl-icon-button {
  justify-content: center;
  border: none;
  align-items: center;
  padding: 0.25rem;
  cursor: pointer;
  margin-left: 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  background: none;
  color: #2d3748;
}

.pxl-icon-button:hover {
  background-color: #e2e8f0;
}

.pxl-icon-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (pointer: coarse) {

  .mouse-only {
    display: none;
  }

}

.pxl-opts-menu-anchor {
  position: relative;
}

.pxl-opts-menu {
  min-width: 150px;
  right: 0.5rem;
  top: 2.5rem;
  border: 1px solid #e2e8f0;
  position: absolute;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  border-radius: 0.5rem;
  display: none;
}

.pxl-opts-menu.show {
  display: block;
}

.pxl-opts-menu-item {
  width: 100%;
  gap: 0.5rem;
  border: none;
  align-items: center;
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  background: none;
  color: #2d3748;
}

.pxl-opts-menu-item:hover {
  background-color: #f7fafc;
}

.pxl-opts-menu-item svg {
  width: 1rem;
  height: 1rem;
}

.pxl-opts-menu-item-danger {
  color: #dc3545;
}

.pxl-opts-menu-item-danger:hover {
  background-color: #fff5f5;
}

.swipe-container {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.swipeable-content {
  width: 100%;
  align-items: center;
  touch-action: pan-y;
  padding: 1rem 0;
  position: relative;
  z-index: 2;
  background-color: #f5f5f5;
  display: flex;
  transition: transform 0.3s ease-out;
}

.swipeable-revealed-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 1;
}

.navbar-toggle {
  width: 3rem;
  right: 1rem;
  top: 1rem;
  justify-content: center;
  height: 3rem;
  border: none;
  align-items: center;
  position: fixed;
  z-index: 1000;
  cursor: pointer;
  background-color: transparent;
  border-radius: 0.5rem;
  display: flex;
  transition: all 0.2s ease;
  color: #2d3748;
}

.navbar-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.navbar-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar-toggle:active {
  transform: scale(0.95);
}

.navbar-backdrop {
  right: 0;
  top: 0;
  position: fixed;
  z-index: 1010;
  background-color: rgba(0, 0, 0, 0.5);
  bottom: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  opacity: 0;
  left: 0;
}

.navbar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.navbar-menu {
  width: 80%;
  right: 0;
  padding-bottom: env(safe-area-inset-bottom);
  max-width: 20rem;
  top: 0;
  overflow-y: auto;
  transform: translateX(100%);
  position: fixed;
  z-index: 1020;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  background-color: #2d3748;
  bottom: 0;
  transition: transform 0.3s ease-out;
}

.navbar-menu.open {
  transform: translateX(0);
}

.navbar-menu:after {
  right: 0;
  background-repeat: repeat-x, no-repeat;
  height: 30%;
  transform: scaleY(-1);
  position: absolute;
  z-index: 1;
  content: '';
  background-size: auto 100%, 100% 100%;
  bottom: 0;
  pointer-events: none;
  background-image: url(/dither-gradient.svg), linear-gradient(to top, #6b7a8f, #f5f5f5);
  left: 0;
}

.navbar-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 3px solid #f5f5f5;
}

.navbar-title {
  margin: 0;
  font-size: 1.5rem;
  color: #f5f5f5;
}

.navbar-close {
  line-height: 1;
  width: 2.5rem;
  justify-content: center;
  height: 2.5rem;
  border: none;
  align-items: center;
  cursor: pointer;
  font-size: 2rem;
  background-color: transparent;
  border-radius: 0.25rem;
  display: flex;
  transition: background-color 0.2s ease;
  color: #f5f5f5;
}

.navbar-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-close:active {
  background-color: rgba(255, 255, 255, 0.15);
}

.navbar-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.navbar-link {
  display: block;
  padding: 1rem 1.5rem;
  color: #f5f5f5;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-left: 4px solid transparent;
}

.navbar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #ff8c00;
}

.navbar-link:active {
  background-color: rgba(255, 255, 255, 0.15);
}