* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
}

body {
  background: linear-gradient(135deg, #e4efe9 0%, #7db9e8 100%);
  background-attachment: fixed;
  font-family: Helvetica, Arial, sans-serif;
}

.site-wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  align-items: center;
  justify-content: space-between;
}

#demo-header,
#demo-footer {
  width: 100%;
}

#demo-header {
  text-align: center;

  nav {
    text-align: left;
    background-color: #efefef;
    display: block;
  }
}

#demo-footer {
  width: 100%;

  nav {
    background-color: #666;
    text-align: right;
  }
}

#main_content {
  padding-bottom: 50px;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#demo-footer ul,
#demo-header ul {
  list-style: none;
  padding: 7px 5px 0;
  max-width: 1280px;
  margin: auto;
}

#demo-footer li,
#demo-header li {
  display: inline-block;
}

#demo-footer a,
#demo-header a {
  padding: 5px 10px;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  line-height: 0;
}

.inner {
  width: 100%;
  max-width: 1280px;
  margin: auto;
}

#debug-wrap {
  display: none;
  text-align: left;
}

#debug-wrap.open {
  display: block;
  background: rgba(75, 75, 75, 0.75);
}

.debug-window {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-content: stretch;
  align-items: flex-start;
}

#debug-wrap .debug-type {
  width: 33%;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  -webkit-align-self: stretch;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  padding: 20px;
}

.form-rendered .build-form {
  display: none;
}

.render-form {
  display: none;
  width: 100%;
  max-width: 800px;
  margin: auto;
  padding: 32px 0;
}

.form-rendered .render-form {
  display: block;
}

.render-btn-wrap {
  text-align: center;
  padding: 32px 0;
  display: flex;
  gap: 8px;

  button {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid gray;
  }
}

#control-filter {
  line-height: 1em;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes shimmer {
  0%,
  80% {
    // Keep shimmer off for the first 80% of the duration
    background-position: -120px 0;
  }
  81% {
    background-position: 120px 0; // Start shimmer animation briefly
  }
  100% {
    background-position: 120px 0; // End with the shimmer completed
  }
}

#formeo-logo-wrap {
  display: inline-block;
  width: 224px;
  height: 150px;
  mask-image: url("/assets/img/formeo-logo.svg");
  mask-repeat: no-repeat;
  background-image: linear-gradient(
    -60deg,
    black 45%,
    rgba(255, 255, 255, 0.6) 50%,
    black 55%
  );
  background-position: -120px 0;
  background-size: 105% 100%;

  animation: shimmer 45s ease-in-out infinite;
}

#formData-popover[popover] {
  width: 50%;
  height: 50%;
  padding: 16px;
  border: 1px solid #ccc;
  background-color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  border-radius: 8px;

  &:popover-open {
    display: flex;
  }

  &::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
  }

  pre {
    width: 100%;
    min-height: 100px;
    margin-bottom: 8px;
    flex: 1;
    padding: 4px;
  }

  .popover-header {
    display: flex;
    justify-content: space-between;

    button {
      background-color: rgba(75, 75, 75, 0.75);
      color: white;
    }
  }

  button {
    padding: 4px 8px;
    border: 0 none;
    border-radius: 4px;
  }

  .formData-actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    gap: 8px;

    button {
      &:first-child {
        background-color: rgb(131, 0, 0);
        color: #fff;
      }
      &:last-child {
        background-color: rgb(0, 124, 0);
        color: #fff;
      }
    }
  }
}
