.emergency-social-choice {flex-basis:100%;min-width:0;}
.emergency-social-choice [hidden] {display:none!important;}
.emergency-social-setup {flex-basis:100%; min-width:0; margin-top:1rem;}
.emergency-social-setup > summary {display:list-item;cursor:pointer;width:fit-content;max-width:100%;}
.emergency-social-setup > .panel {margin-top:1rem;min-width:0;}
.emergency-social-setup form {display:grid;gap:1rem;}
.emergency-social-setup fieldset {min-width:0;}
.emergency-social-platforms {display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.65rem;}
.emergency-social-platform {display:flex;align-items:center;flex-direction:column;gap:.5rem;border:2px solid #63748c;border-radius:12px;padding:.8rem;cursor:pointer;min-width:0;}
.emergency-social-platform:has(input:checked) {border-color:#3999e9;background:rgba(57,153,233,.16);}
.emergency-social-platform:focus-within {outline:3px solid #e0b645;outline-offset:3px;}
.emergency-social-platform input {width:1.2rem;height:1.2rem;}
.emergency-social-platform svg {width:32px;height:32px;color:#75b9ff;}
.emergency-social-platform:has([value="facebook"]) svg {color:#609cff;}
.emergency-social-platform:has([value="instagram"]) svg {color:#ef82cc;}
.emergency-social-platform:has([value="youtube"]) svg {color:#ff7171;}
.emergency-social-platform:has([value="tiktok"]) svg {color:#51d5d5;}
.emergency-social-setup textarea {width:100%;box-sizing:border-box;}
.emergency-social-setup [data-social-preview-text] {white-space:pre-wrap;overflow-wrap:anywhere;}
.emergency-social-setup [data-social-preview][hidden] {display:none;}
/* Authorization is a regular checkbox, never a full-width text input. */
.emergency-social-setup label:has(> input[name="permission"]) {display:flex;align-items:flex-start;gap:.65rem;}
.emergency-social-setup input[type="checkbox"][name="permission"] {appearance:auto;-webkit-appearance:checkbox;box-sizing:border-box;width:22px;height:22px;min-width:22px;min-height:22px;max-width:22px;max-height:22px;flex:0 0 22px;padding:0;margin:.15em 0 0;box-shadow:none;accent-color:#3999e9;cursor:pointer;}
.emergency-social-setup input[type="checkbox"][name="permission"]:focus {box-shadow:none;outline:none;}
.emergency-social-setup input[type="checkbox"][name="permission"]:focus-visible {outline:3px solid #96d1ff;outline-offset:3px;}


.emergency-social-images {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;}
.emergency-social-image-choice {display:flex;flex-direction:column;align-items:center;gap:.6rem;min-width:0;}
.emergency-social-image-choice > label {display:flex;align-items:center;gap:.5rem;cursor:pointer;}
.emergency-social-setup input[type="radio"][name="postImage"] {appearance:none;-webkit-appearance:none;position:relative;box-sizing:border-box;width:22px;height:22px;min-width:22px;min-height:22px;max-width:22px;max-height:22px;border:2px solid #96d1ff;border-radius:3px;padding:0;margin:0;box-shadow:none;background:#062246;flex:0 0 22px;cursor:pointer;}
.emergency-social-setup input[type="radio"][name="postImage"]:focus-visible {outline:3px solid #96d1ff;outline-offset:3px;}
.emergency-social-thumbnail {display:block;width:100%;aspect-ratio:640/660;background-image:url('/assets/emergency-social-options.png');background-size:320% 114.24%;background-repeat:no-repeat;border-radius:6px;}
.social-image-bold {background-position:1.63% 73.4%;}
.social-image-lighthearted {background-position:50% 73.4%;}
.social-image-simple {background-position:98.37% 73.4%;}
.emergency-social-setup [data-social-preview-image] {display:block;max-width:100%;width:400px;height:auto;margin:0 auto 1rem;}
@media(max-width:420px) {.emergency-social-images {gap:.4rem;}.emergency-social-image-choice {font-size:.85rem;}}

.emergency-social-setup input[name="postImage"]:checked {background:#237bd0;}
.emergency-social-setup input[name="postImage"]:checked::after {content:"✓";position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:17px;line-height:1;}
button.emergency-social-thumbnail {padding:0;border:0;cursor:zoom-in;min-height:0;}
button.emergency-social-thumbnail:focus-visible {outline:3px solid #e0b645;outline-offset:3px;}
.emergency-social-choice [data-social-image-dialog] {position:fixed;inset:0;box-sizing:border-box;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;padding:1rem;background:#031328;color:#fff;overflow:auto;}
.emergency-social-choice [data-social-image-dialog][open] {display:flex;flex-direction:column;align-items:center;gap:1rem;}
.emergency-social-choice [data-social-image-dialog]::backdrop {background:rgba(0,0,0,.85);}
.emergency-social-choice [data-social-image-close] {align-self:flex-end;flex-shrink:0;}
.emergency-social-choice [data-social-full-image] {width:min(94vw,76dvh);flex-shrink:0;border-radius:0;}
@media(max-width:420px) {
 .emergency-social-image-choice > label {flex-direction:column;gap:.35rem;width:100%;text-align:center;}
 .emergency-social-image-choice > label > span {max-width:100%;overflow-wrap:anywhere;}
}
