:root {
    /* update colors in color.css */
  --color-1: #fff;
  --color-2: #333;
  --color-3: #C0D3E4;
  --color-4: #393939;
  
  /* header and logo image can be modified by users */
  --logo-max-h: 52px;
  --logo-w: 96px;

  /* update this in each style css */
  --block-element-max-width: none;
  --char-length-max-width: none;
  --text-align: center;

    /* base */
  --container-h: 100%;
  --container-w: 100%;
  --footer-h: 320px;
}

/*  container start ------------------------------------ */

.container {
  background-color: var(--color-1);
  color: var(--color-2);
  container-type: size;
  height: var(--container-h);
  overflow-y: scroll;
  margin: auto;
  position: relative;
  width: var(--container-w);

  scroll-behavior: smooth;
}

/*  header starts ------------------------------------ */

.pp-logo {
  .pp-logo-svg {
    display: block;
    margin-top: 8px;
  }
  .custom-logo-svg {
    display: none;
  }
}

.custom-logo {
  .pp-logo-svg {
    display: none;
  }
  .custom-logo-svg {
    display: block;
  }
}

.no-logo {
  .header {
    display: none;
  }

  .event-block {
    padding-block-start: 24px;
  }
}

.pp-logo-svg {
  display: block;
}
.custom-logo-svg {
  display: none;
  max-height: var(--logo-max-h);
}

.tool-hide {
  --logo-max-h: 48px;
}

.header {
  align-items: center;
  display: flex;
  position: relative;
  width: 100%;
  z-index: 100;
}

.logo-image {
  display: flex;
  fill: currentColor;
  width: var(--logo-w);

  svg {
    transform-origin: center left;
    width: fit-content;
  }
}

body:is(.logo-center) .header {
  justify-content: center;

  svg {
    transform-origin: center;
  }

  .logo-image {
  
    svg {
      margin-inline: auto;
    }
  }
}

body:is(.logo-right) .header {
  justify-content: flex-end;

  svg {
    transform-origin: center right;
  }
}

.scrolling .header{
  position: sticky;
  top: 0;
  z-index: var(--z-level-1000);
}

/*  Blocks starts ------------------------------------ */
.blocks {
  position: relative;
  z-index: var(--z-level-1);
}

.block {
  /* background-color: var(--color-1); */
  position: relative;
  width: 100%;
  z-index: calc(var(--z-level-1000) + 1);

  &:is(.event-block) {
    z-index: var(--z-level-1000);
  }

  &:not(.event-block) {
    .block-description,
    .paragraph {
      margin-inline: auto;
      max-width: var(--char-length-max-width);
    }
  }

  &:is(.details, .travel, .speaker, .sponsor, .accommodation, .registry, .guestlist) {
    &:is(.hide) {
      display: none;
    }
  }
}

.event-title-wrapper{
  margin-inline: auto;
}

.time-wrapper,
.address-wrapper {
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.label,
.date-time,
.venue-name,
.address-1,
.address-2,
.date,
.time,
.link,
.link-button {
  display: block;
  margin: auto;
  width: fit-content;
}

.rsvp-button-wrapper {
  display: flex;
  position: sticky;
  margin: auto;
  padding: 3cqh 0;
  bottom: 0px;
  z-index: var(--z-level-1000);
  transform: scale(.88) translateX(-24px);
  height: fit-content;
  width: 100%;  
}

body:is(.rsvp-center) .rsvp-button-wrapper {
  place-content: center;
  bottom: -12px;
  transform: scale(.88);

  &::after {
    content: '';
    display: block;
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
    z-index: -1;

    background-color: rgb(from var(--color-1) r g b / 96%);
    mask-image: linear-gradient(180deg, 
          rgba(255,255,255,0) 0%,
          rgba(255,255,255,.5) 15%,
          rgba(255,255,255,1) 30%,
          rgba(255,255,255,1) 100%
      );
  }

}

.rsvp-button,
.link-button {
  display: grid;
  place-content: center;
  transition: background-color 0.2s ease-in-out;
  width: fit-content;
}

.rsvp-button {
  background-color: var(--color-3);
  color: var(--color-4);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);

  &:hover {
    background-color: var(--color-4);
    color: var(--color-3);
    cursor: pointer;
  }
}

.link-button {
  background-color: var(--color-4);
  color: var(--color-3);

  &:hover {
    background-color: var(--color-3);
    color: var(--color-4);
  }

}

.venue-name,
.address-1,
.address-2,
.date,
.time,
.link .text { 
  border-bottom: 1px solid currentColor;
  margin: auto;
  width: fit-content;
}

.time-wrapper,
.address-link,
.link .text {
  transition: opacity 0.2s ease-in-out;

  &:hover {
    cursor: pointer;
    opacity: 0.5;
  }
}

.event-date,
.event-address {
  display: flex;
  height: 100%;
  justify-content: center;
  position: relative;

  &:hover {
    &::after {
      visibility: visible;
    }
  }

  &::after {
    content: 'View Map';
    font-family: var(--app-font);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    display: block;
    height: fit-content;
    padding: 4px 8px;
    position: absolute;
    visibility: hidden;
    width: fit-content;
    z-index: 10;
    background-color: #333;
    color: #fff;
    top: -40px;
  }
}

.event-date {
  &::after {
    content: 'Add to Calendar';
  }
}

/* Sticky Card Styles Start */
.sticky-card {
  display: none; /* Initially hidden */
  bottom: 16px;
  place-content: center;
  padding: 8px;
  position: sticky;
  width: 100%;
  z-index: var(--z-level-1000);
}

.micro-form-wrapper {
  --font-family: var(--app-font);

  display: grid;
  place-content: center;

  background-color: rgb(from var(--color-1) r g b / 60%);
  backdrop-filter: blur(10px);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  padding: 16px;
  transition: opacity 0.3s ease-in-out;
  width: 320px;
}

.micro-form-copy {
  color: var(--color-2);
  font-weight: 500;
  margin: 0 0 16px;
}

.reply-button-groups {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.reply-button {
  background-color: var(--color-3);
  border-radius: 0px;
  color: var(--color-4);
  font-weight: bold;
  padding: 8px 16px;
  width: 120px;

  &:hover {
    background-color: var(--color-4);
    color: var(--color-3);
    cursor: pointer;
  }
}

.sticky-card.visible {
  display: grid;
  place-content: center;

  .micro-form-wrapper {
    opacity: 1;
  }
}

/* footer Styles Start */
.footer {
  --font-family: var(--app-font);

  align-items: center;
  display: flex;
  height: var(--footer-h);
  flex-direction: column;
  justify-content: center;
  position: relative;
  text-align: center;
  width: 100%;

  svg {
    fill: currentcolor;
    height: 28px;
    width: 105px;
  }
}

.footer-ul {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 24px;
  padding: 0px 16px;
}

.footer .credit {
  --font-size: 10px;
}

/* container queries for event-block -------------------------  */
@container (min-width: 600px) {

  .rsvp-button-wrapper {
    padding: 4cqh 0;
    transform: scale(1) translateX(-24px);
  }

  body:is(.rsvp-center) .rsvp-button-wrapper {
    transform: scale(1);
  }

  .sticky-card {
    bottom: 4cqh;
  }

  .logo-image {
    --logo-w: 112px;
  }
}

@container (min-width: 1024px) and (orientation: landscape) {
  .logo-image {
    --logo-w: 120px;
  }

  .blocks {
    --char-length-max-width: 75ch;
  }

  .rsvp-button-wrapper {
    padding: 6cqh 0;
    transform: scale(1);
  }

  .event-block {
    display: flex;
    align-items: center;
    justify-content: center;

  }

  .block:nth-last-child(1 of :not(.hide)) {
    min-height: 0;
  }
}

@container (min-width: 1280px) and (orientation: landscape) {
  .logo-image {
    --logo-w: 144px;
  }
}

/*  @container (min-width: 1600px) and (orientation: landscape) {
  .stage {
    background-color: black;
  }
}

@container (max-height: 48cqw) and (orientation: landscape)  {
  .stage {
    background-color: purple;
  }
}

@container (min-aspect-ratio: 90/100) and (max-aspect-ratio: 100/85) and (min-width: 600px) {
  .stage {
    background-color: blue;
  }
} */
