/* Subtle, consistent form motion across the web app and the Live view. */
@keyframes hamsafarFieldFocus{from{transform:translateY(1px)}to{transform:translateY(-1px)}}
@keyframes hamsafarFormNotice{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes hamsafarSubmitSpin{to{transform:rotate(360deg)}}

.app-shell .form-control,
.app-shell .form-select,
.app-live-shell .form-control,
.app-live-shell .form-select,
.app-shell .form-check-input,
.app-live-shell .form-check-input{
    transition:border-color .18s ease,box-shadow .2s ease,background-color .18s ease,transform .18s ease,color .18s ease;
}
.app-shell .form-control:focus,
.app-shell .form-select:focus,
.app-live-shell .form-control:focus,
.app-live-shell .form-select:focus{
    transform:translateY(-1px);
    border-color:#5288f1!important;
    box-shadow:0 0 0 3px rgba(63,125,239,.16),0 5px 14px rgba(43,91,167,.08)!important;
    outline:0;
    animation:hamsafarFieldFocus .18s ease-out both;
}
.app-shell .form-floating:focus-within>label,
.app-live-shell .form-floating:focus-within>label,
.app-shell form:focus-within>.form-label,
.app-live-shell form:focus-within>.form-label{
    color:#285fc2;
    transition:color .18s ease;
}
.app-shell .form-check-input:checked,
.app-live-shell .form-check-input:checked{
    background-color:#3475e8;
    border-color:#3475e8;
    box-shadow:0 0 0 3px rgba(52,117,232,.12);
}
.app-shell .form-check-input:active,
.app-live-shell .form-check-input:active{transform:scale(.92)}
.app-shell .is-invalid:focus,
.app-shell .input-validation-error:focus,
.app-live-shell .is-invalid:focus,
.app-live-shell .input-validation-error:focus{
    border-color:#df5265!important;
    box-shadow:0 0 0 3px rgba(223,82,101,.15)!important;
}
.app-shell .is-valid:focus,
.app-live-shell .is-valid:focus{
    border-color:#20a56b!important;
    box-shadow:0 0 0 3px rgba(32,165,107,.14)!important;
}
.app-shell .validation-summary-errors,
.app-shell .field-validation-error,
.app-live-shell .validation-summary-errors,
.app-live-shell .field-validation-error{
    animation:hamsafarFormNotice .22s ease-out both;
}
.app-shell form .btn:not(:disabled),
.app-live-shell form .btn:not(:disabled){transition:transform .17s ease,box-shadow .2s ease,filter .17s ease}
.app-shell form .btn:hover:not(:disabled),
.app-live-shell form .btn:hover:not(:disabled){transform:translateY(-1px);filter:saturate(1.04)}
.app-shell form .btn:active:not(:disabled),
.app-live-shell form .btn:active:not(:disabled){transform:translateY(1px) scale(.985);filter:brightness(.96)}
.app-shell form[aria-busy="true"] button[type="submit"],
.app-live-shell form[aria-busy="true"] button[type="submit"]{cursor:wait;opacity:.88}
.app-shell form[aria-busy="true"] button[type="submit"]::before,
.app-live-shell form[aria-busy="true"] button[type="submit"]::before{
    content:"";display:inline-block;width:15px;height:15px;flex:0 0 15px;border:2px solid currentColor;border-left-color:transparent;border-radius:50%;animation:hamsafarSubmitSpin .7s linear infinite;
}
.app-shell .card:has(form:focus-within),
.app-live-shell .card:has(form:focus-within){border-color:#c9dcfa!important;box-shadow:0 10px 28px rgba(37,90,167,.12),0 0 0 3px rgba(63,125,239,.06)!important;transition:border-color .2s ease,box-shadow .22s ease}
.app-shell :focus-visible,
.app-live-shell :focus-visible{outline:2px solid #4380ed;outline-offset:2px}

@media(prefers-reduced-motion:reduce){
    .app-shell .form-control,.app-shell .form-select,.app-shell .form-check-input,
    .app-live-shell .form-control,.app-live-shell .form-select,.app-live-shell .form-check-input,
    .app-shell form .btn,.app-live-shell form .btn{transition:none!important;animation:none!important;transform:none!important}
    .app-shell form[aria-busy="true"] button[type="submit"]::before,.app-live-shell form[aria-busy="true"] button[type="submit"]::before{animation:none!important}
}

.app-shell form[aria-busy="true"] button[type="submit"],.app-live-shell form[aria-busy="true"] button[type="submit"]{display:inline-flex;align-items:center;justify-content:center;gap:.5rem}
.app-shell form[aria-busy="true"] button[type="submit"]::before,.app-live-shell form[aria-busy="true"] button[type="submit"]::before{content:"";display:inline-block;width:15px;height:15px;flex:0 0 15px;border:2px solid currentColor;border-left-color:transparent;border-radius:50%;animation:hamsafarSubmitSpin .7s linear infinite}
@media(prefers-reduced-motion:reduce){.app-shell form[aria-busy="true"] button[type="submit"]::before,.app-live-shell form[aria-busy="true"] button[type="submit"]::before{animation:none!important}}

@keyframes hamsafarFormEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.app-shell form,.app-live-shell form{animation:hamsafarFormEnter .28s cubic-bezier(.2,.7,.25,1) both}
.app-shell form :is(input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),textarea,select),
.app-live-shell form :is(input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),textarea,select){transition:border-color .18s ease,box-shadow .2s ease,background-color .18s ease,transform .18s ease,color .18s ease}
.app-shell form :is(input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),textarea,select):focus,
.app-live-shell form :is(input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),textarea,select):focus{transform:translateY(-1px);border-color:#5288f1;box-shadow:0 0 0 3px rgba(63,125,239,.16),0 5px 14px rgba(43,91,167,.08);outline:0}
.app-shell form button:not(:disabled),.app-live-shell form button:not(:disabled){transition:transform .17s ease,box-shadow .2s ease,filter .17s ease}
.app-shell form button:hover:not(:disabled),.app-live-shell form button:hover:not(:disabled){transform:translateY(-1px);filter:saturate(1.04)}
.app-shell form button:active:not(:disabled),.app-live-shell form button:active:not(:disabled){transform:translateY(1px) scale(.985);filter:brightness(.96)}
@media(prefers-reduced-motion:reduce){.app-shell form,.app-live-shell form{animation:none!important}.app-shell form :is(input,textarea,select),.app-live-shell form :is(input,textarea,select),.app-shell form button,.app-live-shell form button{transition:none!important;transform:none!important}}
