/* MedilinkFilm — tactile press feedback for buttons and button-like controls */

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn,
a.btn,
.btn-primary,
.btn-danger,
.btn-ghost,
.btn-temp,
.btn-clinical-primary,
button.pri,
button.sec,
button.dg,
button.doc-line,
.placeholder-chip {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 100ms ease,
    box-shadow 100ms ease,
    filter 100ms ease,
    background-color 100ms ease,
    border-color 100ms ease;
}

button:not(:disabled):is(:active, .is-pressed),
input[type="submit"]:not(:disabled):is(:active, .is-pressed),
input[type="button"]:not(:disabled):is(:active, .is-pressed),
input[type="reset"]:not(:disabled):is(:active, .is-pressed),
.btn:is(:active, .is-pressed),
a.btn:is(:active, .is-pressed),
.btn-primary:not(:disabled):is(:active, .is-pressed),
.btn-danger:not(:disabled):is(:active, .is-pressed),
.btn-ghost:not(:disabled):is(:active, .is-pressed),
.btn-temp:is(:active, .is-pressed),
.btn-clinical-primary:not(:disabled):is(:active, .is-pressed),
button.pri:is(:active, .is-pressed),
button.sec:is(:active, .is-pressed),
button.dg:is(:active, .is-pressed),
button.doc-line:is(:active, .is-pressed) {
  transform: scale(0.97);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22);
  filter: brightness(0.93);
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible,
.btn:focus-visible,
a.btn:focus-visible,
.btn-primary:focus-visible,
.btn-danger:focus-visible,
.btn-ghost:focus-visible,
.btn-temp:focus-visible,
.btn-clinical-primary:focus-visible,
button.pri:focus-visible,
button.sec:focus-visible,
button.dg:focus-visible,
button.doc-line:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.65);
  outline-offset: 2px;
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled,
.btn-clinical-primary:disabled {
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  .btn,
  a.btn,
  .btn-primary,
  .btn-danger,
  .btn-ghost,
  .btn-temp,
  .btn-clinical-primary,
  button.pri,
  button.sec,
  button.dg,
  button.doc-line {
    transition: filter 80ms ease, box-shadow 80ms ease, background-color 80ms ease;
  }

  button:not(:disabled):is(:active, .is-pressed),
  input[type="submit"]:not(:disabled):is(:active, .is-pressed),
  input[type="button"]:not(:disabled):is(:active, .is-pressed),
  input[type="reset"]:not(:disabled):is(:active, .is-pressed),
  .btn:is(:active, .is-pressed),
  a.btn:is(:active, .is-pressed),
  .btn-primary:not(:disabled):is(:active, .is-pressed),
  .btn-danger:not(:disabled):is(:active, .is-pressed),
  .btn-ghost:not(:disabled):is(:active, .is-pressed),
  .btn-temp:is(:active, .is-pressed),
  .btn-clinical-primary:not(:disabled):is(:active, .is-pressed),
  button.pri:is(:active, .is-pressed),
  button.sec:is(:active, .is-pressed),
  button.dg:is(:active, .is-pressed),
  button.doc-line:is(:active, .is-pressed) {
    transform: none;
  }
}
