form {
  fieldset > div,
  fieldset > .container > div,
  fieldset > turbo-frame > * {
    display: flex;
    align-items: center;
    padding: 0.5rem;
  }

  fieldset > .container > div {
    padding-left: 0;
  }

  .hidden {
    visibility: hidden;
    height: 0;
  }

  label {
    width: 9rem;
  }

  .hint {
    margin-left: 0.5rem;
  }
}

select {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  min-width: 6rem;
}

form.button_to {
  display: inline-block;
}

form > div > div {
  display: grid;
  grid-template-columns: 10em 1fr;
  align-items: center;
  gap: 1rem;
}

#edit-assignee-modal {
  form > div > div {
    display: block;
  }
}

fieldset {
  margin-top: 1rem;
  padding: 1rem 2rem;
  border-radius: 5px;
  background: #f7f5f5d4;

  legend {
    font-weight: bold;
  }
  legend::first-letter {
    text-transform: capitalize;
  }
}

label {
  text-align: right;
  padding: 0 0.8em 0 0;

  abbr {
    color: red;
  }

  & + div {
    text-align: left;
  }
}

input,
button {
  border-radius: 10px;
  padding: 0.8em;
}

button:hover {
  box-shadow: 0 0 20px RGBA(20% 20% 20%/0.5);
}

input[type="text"] {
  width: 20em;
}

input[type="file"] {
  padding-left: 0;
}

.radio_buttons .radio:first-of-type {
  input {
    margin-left: 0;
  }
}

input[type="number"] {
  width: 7em;
  text-align: left;
  text-indent: calc(100% - 40px);
}

input[type="submit"],
button {
  margin: 1rem 0 2rem 8rem;
  padding: 0.5em 1em;
  color: var(--color-white);
  background: var(--color-blue);
  font-size: 1.1rem;
  text-transform: capitalize;

  &:hover {
    background: var(--color-blue-600);
    box-shadow: 0 0 20px RGBA(20% 20% 20%/0.3);
  }
}

bl-project-waiting-description {
  display: block;

  > div {
    display: flex;
  }
}

bl-project-action,
bl-comment-action {
  button {
    color: black;
    background: transparent;

    &:hover {
      background: transparent !important;
      box-shadow: none !important;
    }
  }
}

td.action button {
  margin: 0;
}

textarea {
  width: 80ch;
  height: 5rem;
  border-radius: 10px;
  padding: 1em;
}

form.search {
  margin-right: 1%;
}

/* deactivate submit button if required input field is empty/invalid */
fieldset:has(input:invalid) ~ [type="submit"] {
  background-color: #ccc;
  opacity: 0.3;
  pointer-events: none;
}

input:required:user-invalid {
  outline: 1px solid red;
}

.readonly input,
.readonly input + label {
  color: #ddd;
  pointer-events: none;
}

/* simple_form-generated inputs */
div.disabled,
div.readonly {
  > div label {
    color: gray;
  }

  > label > abbr {
    display: none;
  }
}

input:disabled,
textarea:disabled,
input[type="submit"]:disabled {
  background-color: #f5f3f3;
  cursor: not-allowed;
}

input:disabled {
  pointer-events: auto; /* Prevent clicks */
  cursor: help;
  opacity: 0.5; /* Make the button look disabled */

  &:active {
    pointer-events: none;
    cursor: auto;
  }
}
