@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

:root 
{
  --ultraviolet: #4b5fd8;
  --jacaranda: #ab9dff;
  --buttercream: #fffeec;
  --sailboat: #4d86c1;
  --ballet: #edb4f8;
  --tangerine: #ff681d;
  --sky: #7ab8ff;
  --mint: #b0e7ec;
  --banana-cake: #e9fc88;
  --sorbet: #ffb985;
  --sorbet-light: #ffead9;
  --translucent-black: #00000011;
  --light-gray: #b6b6b6;
  --medium-gray: #707070;
  --border: #000;
  --dev: #f00;
  --text-light: #fff;
  --text-dark: #000;
  --table-hdr-text: #4F60D1;
  --table-cell: #D8E7FB;
  --form-label: #707070;
  --light-blue: #BFDDFF;
  --light-gray: #D9D7D7;
  --messages-border: #007dff;
  --messages-checker-1: #D6EEF6;
  --messages-checker-2: #BFDDFF;
  --messages-checker-3: #7ab8ff;
  --messages-checker-4: #fffeec;
  --pale-blue: #B0E7EC;
  --light-cyan: #BAE5EB;
  --coral-orange: #EC7237;
  --light-peach: #d1c8b2
}

html
{
  font-size: 20px;
  font-family: "Josefin Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
  background-color: var(--buttercream);
  overflow-x: hidden;
}
body
{
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-x: hidden;
}
html:not(.p4p-ready) body > *
{
  visibility: hidden;
}
html:not(.p4p-ready) body::before
{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--buttercream);
}
html:not(.p4p-ready)::before
{
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  width: min(28vw, 150px);
  height: min(28vw, 150px);
  margin-top: calc(min(28vw, 150px) / -2);
  margin-left: calc(min(28vw, 150px) / -2);
  background: url("../image/asset/Logos/CMYK/SVG/CMYK_Buttons_Balloon-BCream.svg") center / contain no-repeat;
}
html:not(.p4p-ready) body::after
{
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10001;
  width: min(38vw, 200px);
  height: min(38vw, 200px);
  margin-top: calc(min(38vw, 200px) / -2);
  margin-left: calc(min(38vw, 200px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at center, transparent 61%, var(--buttercream) 62%);
  border: 6px solid var(--jacaranda);
  border-top-color: var(--ultraviolet);
  animation: spin 0.9s linear infinite;
}
[hidden]
{
  display: none !important;
}
h1
{
  font-size: 4rem;
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}
h2
{
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}
h3
{
  font-size: 1.4rem;
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}
footer
{
  text-align: center;
}
a
{
  cursor: pointer;
  text-decoration: underline;

  img
  {
    font-size: 0;
  }
}
button, .button
{
  background-color: var(--ultraviolet);
  border: 1px solid #000;
  color: #fff;
  border-radius: 20px;
  font-family: inherit;
  font-size: inherit;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  padding: 14px 14px 10px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  xwidth: 100%;

  .text
  {
    xpadding: 5px 0 0 0;
  }
  &.primary
  {
    background: var(--banana-cake);
    color: #000;
  }
  &.fixed
  {
    width: 240px;
  }
  &#menu-icon
  {
    text-transform: uppercase;
    width: 18vw;
    xborder-radius: 10em;
    xpadding: 16px 14px 14px 14px;
    xfont-family: inherit;
    font-weight: 700;
  }

  .waiting
  {
    width: 26px; 
    height: 26px; 
    animation: spin 1s linear infinite;
    xstroke-width: 5;
  }
}

#login-title
{
  color: #AAB1E0;
}
/* Landing page + header styling overrides (per UI screenshots) */
#create_party_btn
{
  border: none;              /* remove black block border */
  background: var(--ballet); /* change yellow/cream to pink */
  color: var(--text-dark);
}

#login_btn
{
  border: none;              /* remove black block border */
}

#menu-icon
{
  border: none;               /* remove black block border */
  color: white;
  background: var(--ultraviolet); /* change MENU font colour */
}

#mob-menu-icon
{
  border: none; /* remove black block border */
}
svg.hidden
{
  display: none;
}
#link_btn,
#back_btn
{
  padding: 10px 14px 8px 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}
input[type="checkbox"], input[type="radio"]
{
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
}
input:not([type="range"]), textarea, select, de-select-img
{
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 15px;
  padding: 14px;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  display: inline-block;
  xalign-self: start;
  box-sizing: border-box;
  xwidth: 300px;
}
/* Disabled form controls visual state */
input[disabled], textarea[disabled], select[disabled]
{
  background-color: var(--translucent-black);
  color: var(--medium-gray);
  border-color: var(--light-gray);
  cursor: not-allowed;
}
input:focus, input:focus-visible
{
  outline: none;
  border: 1px solid var(--sorbet);
}
de-text
{
  word-break: break-all;
}
textarea
{
  height: 100%;
}
main
{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-grow: 1;

  nav
  {
    width: 100%;
  }

  table
  {
    width: 100%;
    border-spacing: 8px;

    thead
    {
      th
      {
        color: var(--table-hdr-text);
        text-align: center;
        font-weight: 700;
        font-size: 1rem;
        text-transform: uppercase;
      }
    }
    tbody
    {
      tr
      {
        background-color: var(--table-cell);
      }
      td
      {
        vertical-align: middle;
        text-align: center;
        border-radius: 10px;
        padding: 8px 16px;
        min-height: 20px;
      }
      xtd:nth-child(1)
      {
        text-align: center;
      }
      .actions-img
      {
        font-size: 0;
        line-height: 0;

        img
        {
          width: 24px;
          height: 24px;
          margin: 0 6px;
        }
      }
    }
    tfoot
    {
      font-weight: bold;
      
      td:nth-child(1)
      {
        text-align: right;
      }  
    }

    .actions
    {
      padding: 6px;
      background-color: var(--buttercream);

      div
      {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
      }
    }
  }

  .xmainbuttons
  {
    display: flex;
    gap: 3vw;
    max-width: 80vw;
  }
  h4  
  {
    text-align: center;
  }
}
div[popover] /* menu */
{
  border: none;
  padding: 1.25rem;
  position: relative;
  border-radius: 32px;
  box-shadow: 0 20px 10px var(--text-dark);
  background-color: #fffeec;
  max-width: 520px;

  .close
  {
    background-color: transparent;
    color: var(--ultraviolet);
    border: none;
    padding: 0;
    width: 25px;
    height: 25px;
    font-size: x-large;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 0;
    margin: 20px;
  }

  .menu
  {
    display: flex;
    flex-direction: column;
    font-size: 40px;
    font-weight: bold;
    gap: 15px;
    align-items: center;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0 !important;

    .logo
    {
      width: 318.3px !important;
      margin-top: 10px;
      margin-bottom: 0;
      fill: var(--ultraviolet);
    }

    button, a
    {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      box-sizing: border-box;
      min-height: 56px;
      padding: 14px 18px;
      border-radius: 999px;
      border: none;
      cursor: pointer;
      background: var(--ultraviolet);
      color: var(--text-light);
      font-weight: 600;
      font-size: 20px;
      line-height: 1;
      text-decoration: none;
      max-width: 280px;
    }

    button.primary , a.primary
    {
      background: var(--coral-orange);
      color: var(--text-light);
    }
  }
}
.btn-bar
{
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
de-sort
{
  display: flex;
  gap: 4px;
  align-items: center;

  .field_list
  {
    display: flex;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    flex-direction: column;
  }

  .field_btns, .field_item
  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .sort_list
  {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;

    .sort_item
    {
      display: flex;
      font-size: .8rem;
      font-weight: 400;
      align-items: center;
      gap: 6px;
      background-color: var(--table-cell);
      border-radius: 10px;
      padding: 5px 5px 5px 10px;

      .remove_btn
      {
        width: 24px;
        height: 24px;
        padding: 0 6px 2px 6px;
        min-height: 0;
      }
    }
  }
}
de-filter
{
  .filter_list
  {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;

    .filter_item
    {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
  }

  [cid=min_view_div]
  {
    display: flex;
    gap: 4px;
    align-items: center;
  }

  [cid=min_summ_div]
  {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;

    .fb_summ
    {
      display: flex;
      font-size: .8rem;
      font-weight: 400;
      align-items: center;
      gap: 6px;
      color: var(--ultraviolet);
      background-color: #fff;
      border: 1px solid var(--jacaranda);
      border-radius: 10px;
      padding: 5px 5px 5px 10px;

      .fb_del_btn
      {
        width: 24px;
        height: 24px;
        padding: 0 6px 2px 6px;
        min-height: 0;
      }
    }
  }
}
de-range
{
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  margin: 1rem 0 0 0;

  input
  {
    flex-grow: 1;
    margin: 0;
  }
  .value-display
  {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
  }
  .range-row
  {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.5rem;
  }
  .range-label
  {
    width: 2rem;
    text-align: center;
    font-size: 0.9rem;
  }
}
de-select-img
{
  position: relative;
  padding-right: 40px;
  font-size: 0;

  .bk
  {
    width: 100%;
  }

  .edit
  {
    width: 24px;
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    padding: 0;
    font-size: 0;
    background: transparent;

    img
    {
      width: 100%;
    }
  }

  .img-panel
  {
    height: 80%;
    width: 80%;
    padding: 20px;
    border: 5px solid #000;
    
    ul
    {
      display: flex;
      flex-direction: row;
      list-style: none;
      margin: 0;
      padding: 0;
      flex-wrap: wrap;
      justify-content: center;
      gap: 20px;

      li
      {
        img
        {
          width: 300px;
          height: 100%;
          object-fit: cover;
        }
      }
    }
  }
}
de-input-image
{
  img 
  {
    display: block;
    width: 28vw;
    max-width: 300px;
    background-color: #fff;
    border: 1px solid #000;
    margin-top: 10px;
  }

  input
  {
    width: 100%;
  }

  img:not([src]), img[src=""]
  {
    display: none;
  }
}
de-input-pdf
{
  input
  {
    width: 100%;
  }
}
de-input-password
{
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;

  input
  {
    width: 100%;
    padding-right: 3.5rem;
    box-sizing: border-box;
  }
  svg
  {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
  }
}

/* Login / Create Account / etc.: main is flex; stretch password row so eye aligns to field edge */
de-dialog-login field de-input-password,
de-dialog-new-account field de-input-password,
de-dialog-new-charity-account field de-input-password,
de-dialog-recover-account field de-input-password
{
  align-self: stretch;
}
de-dialog-login field de-input-password input,
de-dialog-new-account field de-input-password input,
de-dialog-new-charity-account field de-input-password input,
de-dialog-recover-account field de-input-password input
{
  /* Beat any dialog input padding shorthand so text never sits under the eye */
  padding-right: 3.5rem !important;
}
p4p-header
{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  /* Pushed down when p4p-admin-preview-banner is visible (see P4P_AdminPreviewBanner) */
  padding-top: var(--p4p-admin-preview-offset, 0px);

  [cid=user_name]
  {
    color: var(--text-light);
    font-size: 0.8rem;
    opacity: 0.8;
    text-align: right;
  }
  [cid=dev_warning]
  {
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    margin: 6px 0 0 0;
  }
  [cid=branch_name]
  {
    display: block;
    font-size: 0.6rem;
  }
  .banner
  {
    padding: 4vw 0 4.5vw 0;
    background-color: var(--jacaranda);
    width: 100%;
  }
  .banner-content
  {
    padding: 0 3.5vw;
    width: 100%;
    max-width: 1710px;
    display: flex;
    justify-content: space-between;
    align-items: top;
    box-sizing: border-box;
    margin: 0 auto;
  }
  .logo
  {
    width: 25vw;
  }
  .title
  {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 0;
    margin-top: 20px;
    color: #fff;
    text-align: center;

    h2
    {
      margin: 0 auto;
      font-size: clamp(28px, 5.5vw, 5.5vw);
    }
  }
  nav
  {
    align-self: baseline;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;

    .menu {
      button
      {
        color: #fff;
      }
    }
  }
  .triangle
  {
    fill: var(--jacaranda);
    transform: translate(0, -1px);
  }
  #mob-triangle
  {
    display: none;
  }
  .badge
  {
    transform: translate(0, -50%);
  }
  .referral-badge
  {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 999px;
    padding: 6px 20px 6px 6px;
    margin: -32px auto 12px auto;
    max-width: max-content;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 2;
  }
  .referral-badge[hidden]
  {
    display: none;
  }
  .referral-badge img
  {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--light-gray);
    padding: 3px;
    box-sizing: border-box;
    flex: 0 0 auto;
  }
  .referral-badge .referral-text
  {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }
  .referral-badge .referral-label
  {
    font-size: 0.7rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.6px;
  }
  .referral-badge .referral-name
  {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ultraviolet);
  }
  .referral-badge .referral-close
  {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    border: 1px solid var(--light-gray);
    border-radius: 50%;
    background: #fff;
    color: var(--medium-gray);
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .referral-badge:hover .referral-close,
  .referral-badge:focus-within .referral-close,
  .referral-badge .referral-close:focus-visible
  {
    opacity: 1;
    transform: scale(1);
  }
  .referral-badge .referral-close:hover
  {
    color: var(--ultraviolet);
    border-color: var(--ultraviolet);
  }
  @media (hover: none)
  {
    .referral-badge .referral-close
    {
      opacity: 1;
      transform: scale(1);
    }
  }
  &.dev 
  {
    .banner
    {
      background-color: var(--dev);
    }
    .triangle
    {
      fill: var(--dev);
      stroke: var(--dev);
    }
  }

  .xmenu_button 
  {
    background-color: transparent;
    border: none;
    padding: none;
    height: 3vw;
    width: 3vw;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .xmenu_button img 
  {
    height: 8vw;
    max-height: 100px;
  }
  xh2 
  {
    font-size: clamp(1.5em, 5vw, 4em); 
  }
  #mob-menu-icon
  {
    padding: 20px 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #000;
  }
}

p4p-invite-intro
{
  de-dialog-alert
  {
    dialog
    {
      max-width: 760px;
      border-radius: 28px;
      padding: 40px 44px;
    }
    header
    {
      color: var(--text-light);
      margin: 0 0 22px 0;
      text-transform: none;
    }
    p[slot="body"],
    h3[slot="header"] {
      font-family: inherit;
      font-size: 25px;
      margin: 0;
    }

    h3[slot="header"] 
    { 
      font-weight: 700; 
      color: var(--ultraviolet);
    }
    p[slot="body"] 
      { 
        font-weight: 500;
        color: var(--text-dark);  
      }
    main
    {
      margin: 0 0 22px 0;
      color: var(--text-dark);
      text-align: center;
      line-height: 1.2;

      a.intro-link
      {
        color: var(--table-hdr-text) !important;
        text-decoration: underline !important;
        text-underline-offset: 3px;
        text-decoration-thickness: 1px;
        border-radius: 3px;
      }
      a.intro-link:visited
      {
        color: var(--table-hdr-text) !important;
        text-decoration: underline !important;
      }
      a.intro-link:focus-visible
      {
        outline: none;
        box-shadow: none;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
      }
    }
    footer
    {
      gap: 12px;
    }
    button[cid=ok_btn]
    {
      background-color: var(--ballet);
      color: var(--text-dark);
      border-radius: 999px;
      min-width: 190px;
    }
  }
}
p4p-invite
{
  width: clamp(650px, 45vw, 45vw);
  background-size: 100% 100%;
  background-position: center;

  main
  {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 30px 40px 40px 40px;
    margin: 3.5vw;
    gap: 0;
    background-color: #fffb;

    h2
    {
      font-family: inherit;
      text-transform: uppercase;
      font-size: 23px;
      font-weight: 600;
    }
    #help_sentence {
      font-family: inherit;
      font-size: 25px;
      font-weight: 500;
      color: var(--ultraviolet);
    }
  }

  .logo
  {
    width: 345px;
    margin-top: 10px;
  }
  [cid=party_address]
  {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    /*color: var(--ultraviolet);*/
  }
  [cid=additional_details]
  {
    max-width: 100%;
    overflow-wrap: break-word;
    text-align: center;
    font-size: 22px;
    font-style: italic;
    margin: 30px 0 24px 0;
    font-weight: 600;
    color: var(--ultraviolet);
  }
  [cid=rsvp_by]
  {
    font-size: 26px;
    font-weight: 600;
  }
  .host
  {
    margin: 10px 0 20px 0;
    font-size: 22px;
    font-weight: 600;
  }
  .bottom
  {
    display: flex;
    margin: 0 0 70px 0;
    gap: 5vw;
  }
  .charity,.gift
  {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .charity img
  {
    width: 200px;
  }

  h1
  {
    font-family: inherit;
    font-size: 2.5rem;
    text-align: center;
    margin: 40px 0;
    font-weight: bold;
  }
  h2
  {
    margin: 0;
  }
  h3
  {
    margin: 20px 0 0 0;
    text-align: center;
  }
  h4
  {
    text-align: center;
    margin: 0;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
  }
  h5
  {
    font-family: inherit;
    font-size: 20px;
    margin: 20px;
    font-weight: 600;
    color: var(--ultraviolet);
  }
  #gift_info
  {
    font-size: 28px;
  }
}
de-form
{
  button
  {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px 0;

    img[cid=prog_img]
    {
      margin: -4px 0 0 0;
      animation: spin 1s linear infinite;
    }
  }

  .hint 
  {
    color: grey;
    margin: 4px 0 0 0;
  }

  footer
  {
    button
    {
      text-transform: uppercase;
      color: var(--text-light);
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
  }
}
de-form.plain
{
  width: 100%;

  main, p4p-acc-fields
  {
    display: flex;
    padding: 0 0 40px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  h3
  {
    margin: 60px 0 0 0;
    color: var(--ultraviolet);
    font-family: inherit;
    font-size: 40px;
  }
  label 
  {
    margin-top: 20px;
    align-content: end;
    font-weight: 600;
  }
  p4p-acc-fields, p4p-party-fields
  {
    width: 100%;
  }
  p4p-party-fields
  {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px 20px;
  }
  input
  {
    width: 100%;
  }
  button[cid="ok_btn"]
  {
    background-color: var(--ballet);
    color: var(--text-dark);
  }
  [cid="clr_btn"] button
  {
    background-color: var(--mint);
    color: var(--text-dark);
  }
  [cid="cancel_btn"] button
  {
    background-color: var(--tangerine);
  }
}
de-dialog-confirm,
de-dialog-alert,
de-dialog-form,
de-dialog-login,
de-dialog-new-account,
de-dialog-new-charity-account,
de-dialog-recover-account,
p4p-account,
de-filter,
de-sort
{
  dialog
  {
    box-sizing: border-box;
    border-radius: 32px;
    border: 2px solid var(--light-gray);
    background-color: var(--buttercream);
    padding: 40px 38px 28px 36px;
    box-shadow: 0 10px 24px var(--translucent-black);
    position: relative;

    button 
    {
      border-radius: 999px;
      padding: 12px 30px 10px 30px;
      min-height: 52px;
      border-color: transparent;
      min-width: 10rem;
    }
  }
  dialog::backdrop
  {
    background-color: var(--translucent-black);
  }
  header
  {
    font-family: inherit;
    font-size: 24px;
    text-transform: none;
    text-align: center;
    margin: 0 0 26px 0;
    color: var(--ultraviolet);
    display: flex;
    flex-direction: column;

    h2
    {
      font-family: "Josefin Sans", sans-serif;
      font-size: 1.4rem;
      padding: 0;
      margin: 0;
    }
  }
  main
  {
    margin: 0 0 24px 0;
    align-items: flex-start;
    gap: 10px;
    align-items: center;
  }
  label
  {
    color: var(--form-label);
  }
  field
  {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;

    label
    {
      font-size: 1rem;
      margin: 0 0 8px 0;
      display: inline-block;

      &[for="p4p_new_acc_dlg_tnc"]
      {
        margin-left: 20px;
      }
    }

    [cid="forgot_password"]
    {
      text-align: right;
      font-style: italic;
      font-size: 0.9rem;
      color: var(--medium-gray);
      cursor: pointer;
    }
  }
  footer
  {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    justify-content: center;

    a
    {
      cursor: pointer;
      text-decoration: underline;
      line-height: 1.5rem;
    }
  }
  input
  {
    width: 100%;
    margin: 0 0 10px 0;
  }
  button, span[cid="cancel_btn"], span[cid="clr_btn"]
  {
    text-transform: uppercase;
  }

  .output
  {
    color: #000;
    border: 1px solid #000;
    border-radius: 20px;
    padding: 14px;
    display: inline-block;
    align-self: start;
    box-sizing: border-box;  
  }
  .close-btn
  {
    fill: #4F60D1;
    width: 32px;
    height: 32px;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
  }

  [cid="error_span"] 
  {
    color: var(--tangerine);
    font-size: 0.9rem;
    background: rgba(255, 104, 29, 0.1);
    border: 1px solid var(--tangerine);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }
  button[cid=ok_btn]
  {
    background-color: var(--ballet);
    color: var(--text-dark);
  }
  button[cid="cancel_btn"], span[cid="cancel_btn"] button
  {
    background-color: var(--sorbet);
    color: var(--text-dark);
  }
  button[cid="login_btn"],
  button[cid="new_btn"],
  button[cid="cancel_btn"],
  button[cid="create_btn"],
  button[cid="save_btn"]
  {
    color: var(--text-dark);
  }
  button[cid="login_btn"],
  button[cid="create_btn"]
  {
    background-color: var(--ballet);
  }
  button[cid="new_btn"]
  {
    background-color: var(--mint);
  }
  button img {
    margin: -4px 0 0 0;
    animation: spin 1s linear infinite;
  }
}

/* de-filter: brand border + field borders (overrides shared dialog light-gray) */
de-filter dialog
{
  border: 2px solid var(--jacaranda);
}
de-filter dialog main input:not([type="checkbox"]):not([type="radio"]),
de-filter dialog main select
{
  border-color: var(--jacaranda);
}

de-dialog-confirm,
de-dialog-alert
{
  main
  {
    color: var(--table-hdr-text);
    text-align: center;
    font-size: clamp(1rem, 1.6vw, 1.45rem);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 28px 0;
  }
}
de-dialog-form.readonly
{
  dialog
  {
    background-color: var(--light-blue);
  }
  main
  {
    display: grid;
    grid-template-columns: 1fr 5fr;
    align-items: center;
    justify-items: start;
    gap: 12px 20px;

    img 
    {
      background-color: #fff;
      border-radius: 15px;
      padding: 14px;

      width: 30vw;
      height: 30vw;
      overflow: hidden;
      object-fit: cover;
    }
    de-text, de-currency, de-link
    {
      background-color: #fff;
      color: #000;
      border-radius: 15px;
      padding: 14px;
      font-family: inherit;
      font-weight: inherit;
      font-size: inherit;
      display: inline-block;
      box-sizing: border-box;
      width: 100%;
    }
    label
    {
      color: var(--table-hdr-text);
      font-weight: 700;
      font-size: 1rem;
      text-transform: uppercase;
      width: 100%;
    }
    de-table
    {
      width: 100%;
    }
  }
}
de-dialog-alert main
{
  text-align: center;
  align-items: center;
}
p4p-footer
{
  width: 100%;
  background-color: var(--ultraviolet);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
  padding: 6vw 0 10vw 0;
  margin-top: 140px;

  .logo{
    width: 33vw;
    filter: brightness(2);
  }
  .social
  {
    margin-top: 20px;
    display: flex;
    gap: clamp(8px, 0.7vw, 20px);
  }
  .social .icon
  {
    width: clamp(14px, 1vw, 22px);
    height: clamp(14px, 1vw, 22px);
    background-color: var(--ultraviolet);

    &.facebook
    {
      -webkit-mask: url("/image/facebook-white.svg") no-repeat center / contain;
      mask: url("/image/facebook-white.svg") no-repeat center / contain;
      image-rendering: pixelated;
    }
    &.instagram
    {
      -webkit-mask: url("/image/instagram-white.svg") no-repeat center / contain;
      mask: url("/image/instagram-white.svg") no-repeat center / contain;
      image-rendering: pixelated;
    }
    &.linkedin
    {
      -webkit-mask: url("/image/linkedin-white.svg") no-repeat center / contain;
      mask: url("/image/linkedin-white.svg") no-repeat center / contain;
      image-rendering: pixelated;
    }
    &.pinterest
    {
      width: clamp(17px, 1.25vw, 28px);
      height: clamp(17px, 1.25vw, 28px);
      -webkit-mask: url("/image/pinterest-white.svg") no-repeat center / contain;
      mask: url("/image/pinterest-white.svg") no-repeat center / contain;
      image-rendering: pixelated;
    }
  }
  .social a.img
  {
    background-color: var(--banana-cake);
    border-radius: 10em;
    width: clamp(36px, 2vw, 52px);
    height: clamp(36px, 2vw, 52px);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  a
  {
    color: #fff;
    text-decoration: none;
  }
  a.email
  {
    font-size: 2.5vw;
    font-weight: 300;
  }
  .copyright
  {
    font-weight: lighter;
    font-size: 14px;
  }
}
p4p-link-dlg
{
  [cid="link_dlg"]
  {
    dialog
    {
      width: 900px;
    }
    .link-actions
    {
      display: flex;
      justify-content: center;
      gap: 10px;
      width: 100%;
    }
    [cid="link_anchor"]
    {
      color: var(--tangerine);
      width: 640px;
      text-align: center;
      margin: 0 auto 20px auto;
      line-height: 1.4;
    }
    button[cid="copy_btn"],
    button[cid="close_btn"]
    {
      text-transform: uppercase;
      color: #000;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 398px;
      gap: 6px;
      border-radius: 10em;
    }
    button[cid="copy_btn"]
    {
      background-color: var(--ballet);
    }

  }
  [cid="bank_dlg"]
  {
    input
    {
      width: 100%;
    }
    main
    {
      align-items: flex-start;
    }
    p4p-acc-fields
    {
      display: contents;
    }
  }
}
.tnc
{
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

img.thumbnail
{
  display: block;
  background-color: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
  margin-top: 10px;
}
img.charity, .charity img
{
  object-fit: contain;
}

div[popover] button[disabled]
{
    opacity: 0.5;
    cursor: not-allowed;
}

/* desktop screens LARGER than 768px */
@media screen and (min-width: 768px)
{
  button, .button
  {
    max-width: 280px;
  }
  h2
  {
    font-size: 2rem;
  }
  main
  {
    margin: 0 40px 20px 40px;
  }
  div[popover] /* menu */
  {
    .menu
    {
      padding: 100px 80px;

      .logo
      {
        width: 27vw;
      }
    }
  }
  de-form
  {
    .hint 
    {
      font-size: smaller;
    }
  }
  p4p-header
  {
    .badge
    {
      width: 8.6vw;
      height: 8.6vw;
    }
  }
  p4p-footer
  {
    .logo
    {
    }
    .copyright
    {
    }
  }
  de-table
  {
    .cell-label
    {
      display: none;
    }
  }

  img.thumbnail
  {
    width: 200px;
    xheight: 200px;
  }
  #menu-icon
  {
    display: block;
  }
  #mob-menu-icon
  {
    display: none;
  }
}
/* mobile screens SMALLER than 768px */
@media screen and (max-width: 768px)
{
  h2
  {
    font-size: 1.5rem;
  }
  main
  {
    margin: 0 20px 20px 20px;
  }
  div[popover] /* menu */
  {
    .menu
    {
      padding: 7vh 10vw;
      gap: 2vh;
      font-size: 1.5rem;

      .logo
      {
        width: 70vw;
      }
    }
  }
  de-form
  {
    .hint 
    {
      font-size: 0.9em;
    }
    footer
    {
      button
      {
        width: 80vw;
        margin: 1vh;
      }
    }
  }
  de-form.plain
  {
    main p4p-party-fields
    {
      grid-template-columns: 1fr 1fr;
      gap: 3px 10px;

      h3
      {
        font-size: 24px;
      }
      label
      {
        font-size: 14px;
      }
      .hint
      {
        font-size: 12px;
      }
      input:not([type="range"]),
      textarea,
      select
      {
        font-size: 14px;
        padding: 10px;
        border-radius: 6px;
      }
    }
  }
  de-dialog-confirm,
  de-dialog-alert,
  de-dialog-form,
  de-dialog-login,
  de-dialog-new-account,
  de-dialog-new-charity-account,
  de-dialog-recover-account,
  de-filter,
  de-sort
  {
    dialog
    {
      padding: 30px 18px 24px 18px;
      border-radius: 24px;
    }
    header
    {
      margin: 0 0 20px 0;
    }
    a
    {
      width: 80vw;
      word-wrap: break-word;
      font-size: 0.8rem;
    }
    footer
    {
      flex-direction: column;
    }
  }
  p4p-header
  {
    nav
    {
      gap: 0;
    }
    h2
    {
      width: clamp(194px, 194px, 100%);
    }
    .banner
    {
      padding-top: 3vw;
      padding-left: 2vw;
      padding-bottom: 7vw;
      padding-right: 2vw;
    }
    .referral-badge
    {
      gap: 8px;
      padding: 4px 14px 4px 4px;
      margin: -22px auto 8px auto;
      max-width: 90vw;
    }
    .referral-badge img
    {
      width: 36px;
      height: 36px;
    }
    .referral-badge .referral-label
    {
      font-size: 0.62rem;
    }
    .referral-badge .referral-name
    {
      font-size: 0.85rem;
    }
    .logo
    {
      width: clamp(194px, 194px, 60vw);
    }
    .badge
    {
      width: 15vw;
      height: 15vw;
    }
    #menu-icon
    {
      display: none;
    }
    #mob-menu-icon
    {
      display: block;
      padding: 0;
    }
    #triangle
    {
      display: none;
    }
    #mob-triangle
    {
      display: block;
    }
  }
  p4p-footer
  {
    padding-top: 32px;
    margin-top: 30px;

    .logo
    {
      width: clamp(205px, 205px, 70vw);
    }
    .copyright
    {
      font-size: 0.8rem;
      text-align: center;
      padding: 0 20px;
    }
    .social
    {
      margin-top: 0;
      gap: 12px;
    }
    .social .icon
    {
      width: 20px;
      height: 20px;
    }
    .social .icon.pinterest
    {
      width: 24px;
      height: 24px;
    }
    .social a.img
    {
      width: 36px;
      height: 36px;
    }
    a.email
    {
      font-size: clamp(18px, 18px, 2.5vw);
    }
  }
  p4p-link-dlg
  {
    [cid="link_dlg"]
    {
      .link-actions
      {
        flex-direction: column;
        align-items: center;
      }
      [cid="link_anchor"]
      {
        width: 70vw;
      }
      button[cid="copy_btn"],
      button[cid="close_btn"]
      {
        width: 70vw;
        min-width: unset;
      }
    }
  }
  p4p-invite-intro
  {
    de-dialog-alert
    {
      dialog
      {
        width: min(92vw, 560px);
        max-width: min(92vw, 560px);
        max-height: calc(100vh - 24px);
        padding: 20px 16px;
        border-radius: 16px;
        overflow-y: auto;
      }
      header
      {
        margin-bottom: 12px;
      }
      main
      {
        margin-bottom: 14px;
        font-size: 1rem;
        line-height: 1.25;
      }
      h3[slot="header"]
      {
        font-size: 1.15rem;
      }
      p[slot="body"]
      {
        font-size: 0.95rem;
      }
      a.intro-link
      {
        font-size: inherit;
      }
      button[cid=ok_btn]
      {
        width: 100%;
        min-width: unset;
      }
    }
  }
  p4p-invite
  {
    width: 90vw;
    main
    {
      padding: 20px;
      margin: 0;
    }
    .logo
    {
      width: clamp(220px, 220px, 80vw);
    }
    h1
    {
      font-size: 2rem;
      margin: 40px 0 0 0;
    }
    h3#help_sentence
    {
      margin-top: 2vw;
      font-size: 1.3rem;
    }
    h4
    {
      /*margin-top: 20px;*/
    }
    h5
    {
      margin: 2vw 0 1vw 0;
    }
    .host
    {
      text-align: center;
    }
    [cid=party_address]
    {
      /*margin: 10px 0 0 0;*/
      text-align: center;
    }
    [cid=additional_details]
    {
      margin-top: 20px;
      text-align: center;
    }
    [cid=start_date],
    [cid=start_time],
    [cid=end_time]
    {
      font-size: 0.8rem;
    }
    .bottom
    {
      flex-direction: column;
      margin: 0 0 2vw 0;
    }
  }
  de-table
  {
    [cid=colsRow]
    {
      display: none;
    }
    [cid=tableBody] tr
    {
      display: grid;
      grid-template-columns: 1fr 2fr;
      column-gap: 13px;
      row-gap: 8px;
      margin: 0 0 30px 0;
    }
    [cid=tableBody] td
    {
      word-break: break-word;
    }
    .cell-label
    {
      text-align: right;
      font-weight: 300;
      font-size: 0.9rem;
    }
  }

  img.thumbnail
  {
    width: 50vw;
    xheight: 50vw;
  }
}

@keyframes spin
{
  0% 
  {
    transform: rotate(0deg);
  }
  100% 
  {
    transform: rotate(360deg);
  }
}

/* round buttons with a single icon */
table tbody button, 
de-sort .add_btn,
de-sort .sort_btn,
de-filter .fb_filter_btn, 
de-filter [cid=min_search_btn]
{
  text-transform: uppercase;
  border-spacing: 8px;
  font-size: 0;
  font-weight: 400;
  line-height: 0;
  margin: 0;
  padding: 6px 0;
  width: fit-content;
  height: fit-content;

  img, svg, span
  {
    width: 24px;
    height: 24px;
    margin: 0 6px;
    display: inline-block;
  }
  span
  {
    font-size: 24px;
    line-height: 24px;
  }
}

@property --gradient-angle 
{
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotation 
{
  0%   { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}

.in-progress
{
  background: conic-gradient(
    from var(--gradient-angle),
    var(--ballet), 
    #fff0, 
    var(--ballet), 
    #fff0, 
    var(--ballet), 
    #fff0, 
    var(--ballet), 
    #fff0, 
    var(--ballet), 
    #fff0, 
    var(--ballet), 
    #fff0, 
    var(--ballet)
  );
  animation: rotation 4s linear infinite;
  height: 1.5vh;
}

/* Admin "View as" preview banner ============================================ */
p4p-admin-preview-banner
{
  box-sizing: border-box;
  width: 100%;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-top: max(0px, env(safe-area-inset-top));
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  background: var(--tangerine, #ff681d);
  color: #fff;
  font-family: "Josefin Sans", sans-serif;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
p4p-admin-preview-banner[hidden]
{
  display: none;
}
.admin-preview-banner-inner
{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 16px);
  row-gap: 10px;
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 3vw, 20px);
  flex-wrap: wrap;
  text-align: center;
  max-width: 100%;
}
.admin-preview-banner-text
{
  flex: 1 1 12rem;
  min-width: 0;
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  letter-spacing: 0.03em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.admin-preview-banner-detail
{
  display: inline;
  font-weight: 400;
  opacity: 0.9;
  margin-left: 0.35em;
}
.admin-preview-banner-exit
{
  flex: 0 0 auto;
  background: #fff;
  color: var(--tangerine, #ff681d);
  border: none;
  border-radius: 999px;
  padding: 0.5em 1.1em;
  min-height: 2.5rem;
  min-width: 7rem;
  font-family: "Josefin Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.5vw, 0.85rem);
  cursor: pointer;
  touch-action: manipulation;
}
.admin-preview-banner-exit:hover
{
  background: var(--buttercream, #fffeec);
}
.admin-preview-banner-exit:disabled
{
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 36rem)
{
  .admin-preview-banner-inner
  {
    flex-direction: column;
    align-items: stretch;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .admin-preview-banner-text
  {
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-preview-banner-detail
  {
    display: block;
    margin-left: 0;
    margin-top: 0.35em;
    font-size: 0.88em;
  }

  .admin-preview-banner-exit
  {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
    min-height: 2.75rem;
  }
}