.customization {
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 1px solid var(--light-gray);
  position: relative;

  & nav {
    display: flex;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }

  & nav a {
    border: 1px solid var(--medium-purple);
    border-radius: 1rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  & nav a.active {
    background-color: var(--medium-purple);
  }

  & nav a:hover,
  & nav a.inactive:hover {
    background-color: var(--lightest-gray);
  }

  & nav a.inactive {
    background-color: var(--light-gray);
    color: var(--dark-gray);
  }

  & main {
    position: absolute;
    inset: 0;
    overflow: auto;
    padding: 1rem;
  }

  & header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  & h2 {
    margin-bottom: 0;
  }

  & p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
  }

  .arrow {
    display: flex;
    align-items: center;
  }

  .flow {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    overflow: hidden;
    overflow-x: auto;

    & > div {
      display: flex;
    }
  }

  & div.iframe {
    width: 274px;
    height: 280px;
    border-radius: 0.25rem;
    overflow: hidden;
    border: 1px solid var(--light-gray);
    z-index: -1;
    margin-bottom: 0.25rem;

    &.inactive {
      opacity: 0.5;
    }

    & iframe {
      transform: scale(0.4);
      transform-origin: top left;
      border: none;
      width: 680px;
      height: 700px;
    }
  }

  & a {
    text-decoration: none;
    color: black;
  }

  & b {
    font-size: 0.875rem;
    font-weight: 500;
  }

  & span {
    font-size: 0.8rem;
  }

  & span {
    color: var(--dark-gray);
    display: block;
    max-width: 274px;
  }

  & div.custom-template {
    position: relative;
    padding-top: 25px;
    line-height: 0.9rem;

    &:hover {
      & div.iframe {
        border-color: rgb(0 0 255 / 0.3);
      }
    }

    & .custom-template-type {
      align-items: center;
      display: flex;
      justify-content: space-between;

      & div.badge {
        font-size: 0.75rem;
      }
    }
  }

  & div.custom-template.custom-template-email {
    & .iframe {
      background-color: var(--window-gray);
    }

    & p {
      color: var(--gray-700);
      font-size: 6px;
      line-height: 1.5;
      margin: 0;
      padding: 0 0.5rem;

      &:first-child {
        font-size: 8px;
        padding-top: 0.25rem;
        padding-bottom: 0.125rem;
      }

      &:last-of-type {
        padding-bottom: 0.5rem;
      }
    }
  }

  & div.custom-template.custom-template-web {
    & .iframe {
      background-color: var(--window-gray);
    }

    & .web-container {
      align-items: center;
      display: flex;
      gap: 2px;
      padding: 0.25rem calc(0.5rem + 19px) 0.25rem 0.5rem;
    }

    & .web-button {
      background-color: var(--gray-700);
      border-radius: 5px;
      display: block;
      height: 5px;
      width: 5px;
    }

    & .web-search {
      background-color: white;
      border-radius: 5px;
      height: 7px;
      justify-self: center;
      margin: auto;
      width: 50%;
      font-size: 0.3rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  & .inactive-overlay {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    z-index: 2;
    border-radius: 0.25rem 0.25rem 0 0;
    font-size: 0.825rem;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: start;
    line-height: 17px;
    background: var(--light-purple);
    border: 1px solid var(--medium-purple);

    & svg {
      margin-top: 2px;
    }
  }

  & div.overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;

    & a {
      display: block;
      flex: 1;
    }
  }
}

.dark-mode .customization {
  & nav a {
    border: 1px solid var(--dark-purple);
  }

  & nav a.active {
    background-color: var(--dark-purple);
  }

  & nav a.inactive {
    background-color: var(--dark-gray);
    color: var(--medium-gray);
  }

  & nav a:hover {
    background-color: var(--dark-purple);
  }

  & nav a.inactive:hover {
    background-color: var(--gray-500);
  }

  & .inactive-overlay {
    border: 1px solid var(--dark-gray);
    background: var(--gray-700);
  }
}
