.form-display-contents {
  display: contents;

  > form {
    display: contents;
  }
}

.error-message {
  color: red;
  font-weight: 600;
  margin-left: 1em;
}

solid-tamis-select-reactive,
solid-form-dropdown-label {
  input[type="text"] {
    cursor: text;
  }
}

solid-tamis-select-reactive {
  .related-identifiant {
    color: var(--color-neutral);

    span {
      font-size: 16px;
      font-weight: 400;
    }
  }
}

solid-tamis-select-reactive .select,
solid-form-dropdown-label {
  font-weight: normal;
  text-transform: none;
  position: relative;
  display: inline-block;
  width: 100%;

  &::after {
    content: "";
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDE1TDcgMTBIMTdMMTIgMTVaIiBmaWxsPSIjMUQxQjIwIi8+Cjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-position: center;
    width: 16px;
    height: 16px;
    position: absolute;
    right: 16px;
    bottom: 16px;
    transition: transform 0.3s ease;

    @media (max-width: 768px) {
      right: 12px;
    }
  }

  &:has(select:active)::after {
    transform: rotate(180deg);
  }

  select {
    appearance: none;
    color: var(--color-text);
    min-height: 46px;
    padding: 12px 16px;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid var(--color-neutral-lighter);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    user-select: none;
    cursor: pointer;
  }

  &:has(select[disabled]) {
    label {
      color: var(--color-neutral-lighter);
    }

    select {
      border-color: var(--color-neutral-lighter);
      color: var(--color-neutral-lighter);
      pointer-events: none;
    }

    input {
      color: var(--color-neutral-lighter);
    }

    &:after {
      opacity: 0.15;
    }
  }
}

.form {
  label {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    text-transform: none;
    margin-bottom: 16px;
  }

  input[type="date"],
  input[type="text"],
  input[type="number"],
  input[type="email"] {
    background-color: #fff;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--color-neutral-lighter);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    padding: 12px 16px;
    margin: 0;

    &::placeholder {
      font-style: italic;
      text-align: left;
      color: var(--color-neutral);
    }
  }

  input[type="date"] {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCAyMSAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjUgMVY1TTYuNSAxVjVNMS41IDlIMTkuNU0zLjUgM0gxNy41QzE4LjYwNDYgMyAxOS41IDMuODk1NDMgMTkuNSA1VjE5QzE5LjUgMjAuMTA0NiAxOC42MDQ2IDIxIDE3LjUgMjFIMy41QzIuMzk1NDMgMjEgMS41IDIwLjEwNDYgMS41IDE5VjVDMS41IDMuODk1NDMgMi4zOTU0MyAzIDMuNSAzWiIgc3Ryb2tlPSIjNUE2MjY4IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K");
  }

  @-moz-document url-prefix() {
    input[type="date"] {
      background-image: none;
    }
  }

  solid-form-dropdown-autocompletion-label {
    .ss-single-selected {
      align-items: center;
      background-color: #fff !important;
      height: 48px;
      border-radius: 8px !important;
      border: 1px solid var(--color-neutral-lighter) !important;

      .placeholder {
        font-family: inherit;
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
      }

      .ss-arrow {
        background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDE1TDcgMTBIMTdMMTIgMTVaIiBmaWxsPSIjMUQxQjIwIi8+Cjwvc3ZnPg==");
        background-repeat: no-repeat;
        background-position: center;
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;

        > span {
          display: none;
        }
      }

      &.ss-open-below {
        .ss-arrow {
          transform: rotate(180deg);
        }
      }
    }
  }
}
