:root {
  --container-width: min(1200px, 100%);
  --primary-background: #ffffff;
  --mana-orange: #f58025;
  --mana-brown: #61452b;
  --mana-grey: #7d7e80;
  --mana-beige: #f2f1ec;
  /* Soft orange wash for icon chips and hover states. */
  --mana-orange-soft: rgba(245, 128, 37, 0.12);
  --secondary: #259AF5;
  --standard-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
  --secondary-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  --gradiant-1: linear-gradient(145deg, #f58025, #ff8c42);
  --gradiant-2: linear-gradient(0deg, #f58025, #ff8c42);
  --radius: 4px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  /* Minimum comfortable tap target on touch devices. */
  --tap-target: 44px;
}

/*
 * Breakpoints used across every stylesheet in this project:
 *   1200px — below the max container width
 *    768px — tablet
 *    480px — phone
 * Stick to these three so pages break at the same places.
 */

/* debug */

/* * {
  border: 1px solid greenyellow;
} */



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Helvetica, Arial, sans-serif;
}

/*
 * Static layered waves anchored to the bottom of the page. The waves.svg is
 * transparent above the shapes, so this background-color fills the rest.
 *
 * Both axes have a pixel floor, for the same reason in each direction — the
 * artwork is drawn with preserveAspectRatio="none", so it takes whatever shape
 * background-size asks for:
 *
 *   width   max(100%, 1280px) — below 1280px the waves would be squashed
 *           horizontally, turning gentle swells into steep squiggles on a
 *           phone. Pinning the artwork at its desktop width keeps the wave
 *           shape identical at every screen size; the viewport simply crops to
 *           the middle of it. At 1280px and up this is plain 100%, so wide
 *           screens are unchanged.
 *
 *   height  max(60vh, 400px) — on a short viewport 60vh alone would shrink the
 *           solid front wave below the height of the footer and leave white
 *           text on pale orange.
 */
html {
  background-color: var(--primary-background);
  background-image: url("/static/village/assets/waves.4c82d160ea7f.svg");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: max(100%, 1280px) max(60vh, 400px);
}

/*
 * List links (the slide-out nav, the allauth menus) take the surrounding text
 * colour rather than the browser's blue/purple defaults.
 */
li > a,
li > a:visited {
  color: inherit;
}

h1 {
  padding-bottom: var(--space-lg);
}

h2 {
  padding-bottom: var(--space-md);
}

h3,
h4,
h5,
h6 {
  padding-bottom: var(--space-sm);
}

p {
  padding-bottom: var(--space-xs);
}

html,
body {
  width: 100%;
  height: auto;
  min-height: 100vh;
}

body {
  position: relative;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
}

body > * {
  padding-left: 1rem;
  padding-right: 1rem;
}

#primary-header,
#primary-footer {
  z-index: 5;
}

main {
  z-index: 3;
}

#primary-nav {
  z-index: 7;
}

#primary-header,
#primary-footer,
main {
  width: var(--container-width);
}

#primary-header {
  height: min-content;
  /* Breathing room between the header and page content. */
  margin-bottom: var(--space-xl);
}

.primary-header-row {
  padding-top: .5rem;
  margin-bottom: .5rem;
  height: min-content;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

/* If no banners, then we need to remove this space */
.primary-header-row:only-child {
  margin-bottom: 0px;
}

#menu-toggle {
  height: 32px;
  width: 32px;
  font-size: 18px;
  background: var(--gradiant-1);
  color: white;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  /* box-shadow: var(--secondary-shadow); */
}

#menu-toggle:hover {
  background: var(--gradiant-2);
  cursor: pointer;
}

#primary-logo-link {
  display: inline-block;
  line-height: 0;
}

#primary-logo {
  height: 32px;
}

#primary-nav {
  position: absolute;
  width: 300px;
  right: calc(((100vw - var(--container-width)) / 2 + 1.5rem + 32px));
  /* Sizes to its content, and scrolls rather than clipping on a short screen. */
  max-height: calc(100vh - 4px);
  overflow-y: auto;
  background-color: white;
  z-index: 9;
  border: 2px solid var(--secondary);
  margin-top: 2px;
  margin-bottom: 2px;
}

#primary-footer {
  bottom: 0;
  color: white;
  text-align: center;
}

#primary-footer > *{
  margin-bottom: 1rem;
  margin-top: 1rem;
}

#primary-footer .row {
  justify-content: center;
  align-items: baseline;
  gap: var(--space-sm);
}

/*
 * Separators between the core values, drawn by CSS rather than sitting in the
 * markup: they cannot fall out of step with the list, and screen readers do
 * not announce them as content.
 */
#primary-footer .row > p {
  padding-bottom: 0;
}

#primary-footer .row > p + p::before {
  content: "|";
  padding-right: var(--space-sm);
  opacity: 0.65;
}

/* messages */
.messages {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 100%;
  text-align: center;
  z-index: 9;
}

.messages > .delete-icon {
  width: 100%;
  text-align: right;
}

.messages>li {
  list-style-type: none;
}

.debug {
  background-color: #f9f9f9;
  border-left: 4px solid #bdbdbd;
  color: #555;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.info {
  background-color: #e6f2fa;
  border-left: 4px solid #31708f;
  color: #31708f;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.success {
  background-color: #dff0d8;
  border-left: 4px solid #3c763d;
  color: #3c763d;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.warning {
  background-color: #fcf8e3;
  border-left: 4px solid #8a6d3b;
  color: #8a6d3b;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.error {
  background-color: #f2dede;
  border-left: 4px solid #a94442;
  color: #a94442;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.message {
  border-radius: 3px;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 1rem 0 1rem;
  max-width: var(--container-width);
}

.errorlist > li {
  background-color: #f2dede;
  color: #a94442;
  padding: 8px 16px;
}

.errorlist > li:not(:last-child) {
  margin-bottom: 10px;
}

.errorlist {
    list-style: none;
}

#login-container {
  margin: 0 auto 0 auto;
}

.allauth {
  width: clamp(300px, 400px, calc(100% - 2rem));
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

.allauth>*>p {
  text-align: center;
}

.allauth-menu {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
}

.allauth-menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.allauth-menu-list>li {
  list-style-type: none;
}

.allauth-main {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem;
}

.allauth-main > form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: .75rem;
}

.allauth-main>ul>li {
  list-style-type: none;
}

.menu-title {
  font-size: 2rem;
  font-weight: bold;
  text-decoration: 2px solid underline var(--secondary);
}

.menu-list {
  list-style-type: none;
}

/*
 * Section heading inside the menu. Mirrors a homepage card's title, so the two
 * views of the same list look like the same list.
 */
.menu-group-title {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding-bottom: var(--space-xxs);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mana-grey);
  border-bottom: 1px solid var(--mana-beige);
}

.menu-list > li {
  /* Full-width tap target rather than a text-sized one. */
  min-height: var(--tap-target);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-list > li > a {
  cursor: pointer;
  display: block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
}

.menu-list > li > a:hover {
  background-color: var(--mana-orange-soft);
}

.menu-list > li > a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: -2px;
}

/* Account actions sit apart from the destination groups. */
.menu-list-account {
  margin-top: var(--space-lg);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--mana-beige);
}

@media screen and (max-width: 1200px) {
  /* to keep visual lock in to top left */
  .primary-header-row {
    padding-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

@media only screen and (max-width: 768px) {

  body > * {
    padding-left: .5rem;
    padding-right: .5rem;
  }

  /* to keep visual lock in to top left */
  .primary-header-row {
    padding-top: .5rem;
  }

  #primary-header {
    margin-bottom: var(--space-lg);
  }
  
}

@media only screen and (max-width: 480px) {

  body > * {
    padding-left: .25rem;
    padding-right: .25rem;
  }

  /* to keep visual lock in to top left */
  .primary-header-row {
    padding-top: .25rem;
  }

  #primary-header {
    margin-bottom: var(--space-md);
  }

  /*
   * The three values do not fit on one line here. Stack them and drop the
   * separators, which would otherwise start each wrapped line with a pipe.
   */
  #primary-footer .row {
    flex-direction: column;
    gap: var(--space-xxs);
  }

  #primary-footer .row > p + p::before {
    content: none;
  }

}
