/* Submission feedback lives inside the native dialog's top layer. */
#modal {overflow:hidden;max-height:90vh;max-height:90dvh;}
#modal #modal-form {display:flex;flex-direction:column;min-height:0;max-height:calc(90vh - 2px);max-height:calc(90dvh - 2px);}
#modal .modal-head,#modal .modal-foot {flex:0 0 auto;}
#modal .modal-head h2 {min-width:0;overflow-wrap:anywhere;}
#modal .modal-head .icon-btn {flex-shrink:0;}
#modal .modal-body {flex:1 1 auto;min-height:0;max-height:none;overscroll-behavior:contain;}
.form-feedback {margin:12px 20px 0;padding:12px 16px;background:#edf7f5;color:#21675b;border:1px solid #c6e4dc;border-radius:12px;line-height:1.65;font-size:13px;overflow-wrap:anywhere;}
.form-feedback.is-error {background:#fff1f0;color:#922f36;border-color:#f0c4c4;}
#modal .form-feedback {flex:0 1 auto;max-height:25vh;overflow-y:auto;}
.form-feedback:focus {outline:2px solid #cf6b70;outline-offset:2px;}
.form-feedback[hidden],.form-progress[hidden] {display:none!important;}
.form-progress {display:flex;align-items:center;gap:10px;padding:12px 24px;color:#0b7777;background:#edf8f8;border-bottom:1px solid #dcecec;font-size:12px;line-height:1.6;flex:0 0 auto;}
.form-progress>span {min-width:0;overflow-wrap:anywhere;}
.busy-spinner {display:inline-block;flex:0 0 auto;width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:club-saving-spin .8s linear infinite;}
.btn.is-busy {display:inline-flex;align-items:center;justify-content:center;gap:9px;opacity:.8;}
form[aria-busy="true"] button:disabled,form[aria-busy="true"] input[type="submit"]:disabled,button.is-busy {cursor:wait;}
form[aria-busy="true"] input,form[aria-busy="true"] select,form[aria-busy="true"] textarea {opacity:.72;cursor:wait;}
.modal-foot .btn {min-width:100px;white-space:normal;}
@keyframes club-saving-spin {to {transform:rotate(360deg);}}
@media(max-width:480px) {
  #modal {width:calc(100vw - 20px);max-height:94vh;max-height:94dvh;border-radius:16px;}
  #modal #modal-form {max-height:calc(94vh - 2px);max-height:calc(94dvh - 2px);}
  #modal .modal-head {padding:16px;gap:10px;}
  #modal .modal-body {padding:18px 16px;}
  #modal .form-feedback {margin:10px 12px 0;padding:11px 13px;font-size:12px;}
  #modal .form-progress {padding:10px 16px;font-size:11px;}
  #modal .modal-foot {padding:12px 16px;gap:8px;flex-wrap:wrap;}
  #modal .modal-foot .btn {flex:1 1 140px;min-height:44px;padding:11px;font-size:12px;}
}
@media(prefers-reduced-motion:reduce) {.busy-spinner {animation:none;}}
