@use 'variables' as *;

.site-footer {
  background-color: #ffffff;
  padding: 80px 64px;
  font-family: $font-family;

  @media (max-width: $tablet-breakpoint) {
    padding: 48px 20px;
  }

  &__content>div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;

    @media (min-width: $tablet-breakpoint) {
      grid-template-columns: 1.5fr 1fr 1fr 1fr 2fr;
      gap: 1rem;
    }

    @media (min-width: $desktop-breakpoint) {
      grid-template-columns: 1.5fr 1fr 1fr 1fr 2fr;
      gap: 2rem;
    }
  }

  #block-convene-theme-sitebranding-2 {
    position: relative;

    img {
      height: 36px;
      width: auto;
      max-width: 100%;
      filter: brightness(1) invert(1);
    }

    >a {
      text-decoration: none;
      color: #000;
      font-weight: 700;
      font-size: 1.5rem;
      display: inline-block;
      margin-top: 0.5rem;
    }
  }

  .block-convene-theme-mainnavigation {
    position: relative;

    h2 {
      margin: 0;
      padding: 0;
      margin-bottom: 1rem;
      font-family: $font-family;
      font-weight: 600;
      font-size: 1rem;
      line-height: 150%;
      color: $menu-heading-color;
    }

    ul:not(.contextual-links) {
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        margin-bottom: 1rem;

        a {
          color: $text-regular-color;
          text-decoration: none;
          font-size: 14px;
          display: block;
          font-family: $font-family;
          font-weight: 400;
          line-height: 150%;

          &:hover {
            color: $btn-blue;
          }
        }
      }
    }
  }

  #block-convene-theme-updatemodule {
    .contextual-region {
      position: relative;
    }

    .field--name-field-title .field__item,
    h2 {
      font-size: 1.125rem;
      font-weight: 700;
      color: #000;
      margin-bottom: 1rem;
      font-family: $font-family;
    }

    .field--name-field-description {
      color: #4b5563;
      margin-bottom: 1.5rem;
      line-height: 1.5;
      font-size: 1rem;

      p {
        margin: 0;
      }
    }

    form.webform-submission-form {
      display: flex;
      gap: 0.5rem;
      align-items: flex-start;
      flex-wrap: wrap;

      @media (min-width: $desktop-breakpoint) {
        flex-wrap: nowrap;
      }

      @media (max-width: $tablet-breakpoint) {
        flex-direction: column;
        gap: 0.5rem;
      }

      .form-item-email {
        flex: 1;
        margin: 0;
        min-width: 200px;

        input[type="email"] {
          width: 100%;
          background-color: #0308040D;
          border: unset;
          border-radius: 12px;
          font-size: 1rem;
          color: #03080499;
          height: 40px !important;
          padding: 8px 12px;
          box-shadow: 0px -2px 1px 0px #0308040D inset;

          &::placeholder {
            color: #9ca3af;
            font-family: $font-family;
            font-weight: 400;
            font-size: 1rem;
            line-height: 150%;
            letter-spacing: 0%;
          }

          box-sizing: border-box;
        }

        .description {
          font-family: $font-family;
          font-weight: 400;
          font-size: 12px;
          line-height: 150%;
          letter-spacing: 0%;
          color: #030804;

          * {
            color: #030804;
          }
        }
      }

      .form-actions {
        margin: 0;

        @media (max-width: $tablet-breakpoint) {
          max-width: 100%;
          width: 100%;
        }

        input[type="submit"] {
          background-color: #0308040D;
          color: #030804;
          font-weight: 500;
          font-size: 16px;
          line-height: 0;
          padding: 14px 24px;
          border-radius: 12px;
          border: unset;
          outline: unset;
          box-shadow: 0px -2px 1px 0px #0308040D inset;
          height: 40px !important;
          cursor: pointer;

          @media (max-width: $tablet-breakpoint) {
            max-width: 100%;
            width: 100%;
          }
        }
      }
    }

    .webform-element-description {
      margin-top: 0.5rem;
      font-size: 0.75rem;
      color: #6b7280;
      width: 100%;
    }
  }

  &__bottom {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 60px;

    &__inner {
      display: flex;
      flex-direction: column-reverse;
      gap: 2rem;
      align-items: flex-start;
      width: 100%;

      @media (min-width: $tablet-breakpoint) {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1.5rem;
      }

      &__left {
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1.5rem;
        font-size: 0.875rem;
        color: #4b5563;
        
        @media (min-width: $tablet-breakpoint) {
          flex-direction: row;
          align-items: center;
          gap: 24px;
        }

        /* The block itself should flex in row */
        .block, .content {
          display: flex;
          align-items: flex-start;
          gap: 16px;
          flex-wrap: wrap;
          justify-content: flex-start;
          
          @media (min-width: $tablet-breakpoint) {
            align-items: center;
            justify-content: center;
          }
          
          p { margin: 0; }
        }

        .legal-links, ul {
          display: flex;
          flex-direction: column;
          gap: 1.5rem;
          list-style: none;
          padding: 0;
          margin: 0;

          @media (min-width: $tablet-breakpoint) {
             flex-direction: row;
          }

          a {
            color: #4b5563;
            text-decoration: underline;

            &:hover {
              color: $btn-blue;
            }
          }
        }
      }

      &__right {
        .social-icons {
          display: flex;
          gap: 1.5rem;
          list-style: none;
          padding: 0;
          margin: 0;

          a {
            color: #000;
            font-size: 1.25rem;
            transition: color 0.2s;
            display: flex;
            align-items: center;

            &:hover {
              color: $btn-blue;
            }

            svg {
              width: 24px;
              height: 24px;
              fill: currentColor;
            }
          }
        }
      }
    }
  }

  .update-module {
    .visually-hidden+div {
      font-family: $font-family;
      font-weight: 600;
      font-size: 1rem;
      line-height: 150%;
      color: #030804;
      margin-bottom: 1rem;

      p {
        margin: 0;
        padding: 0;
        font-family: $font-family;
        font-weight: 400;
        font-size: 1rem;
        line-height: 150%;
        color: #030804;
        margin-bottom: 1rem;
      }
    }
  }
}