.country-flag-field {margin:20px 0}
.country-flag-current {display:flex;align-items:center;gap:10px;font-size:13px;min-height:28px;overflow-wrap:anywhere}
.country-flag-current img,.country-flag-option img,.country-flag-draft img {object-fit:contain;flex:none;border:1px solid #81939e55;background:#ffffff;box-sizing:content-box}
.country-flag-actions {display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.flag-size-field {margin-top:14px;margin-bottom:8px}
.entity-size-field {margin:18px 0;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.entity-size-heading {display:flex;align-items:center;justify-content:space-between;gap:10px}
.entity-size-heading small {color:var(--muted);font-size:11px}
.entity-size-field .region-size {margin-top:10px}
.entity-size-field .region-size .field {min-width:0;margin-bottom:8px}
.entity-size-field input {min-width:0;width:100%}
.entity-size-field .panel-callout {margin-top:0}
.entity-resize-handle {outline:none;touch-action:none}
.entity-resize-handle.resize-w {cursor:ew-resize}
.entity-resize-handle.resize-h {cursor:ns-resize}
.entity-resize-handle.resize-both {cursor:nwse-resize}
.entity-resize-handle:focus .resize-grip,.entity-resize-handle:hover .resize-grip {fill:#c5f4e8;stroke:#07594f;stroke-width:3}
.country-flag-empty {display:inline-flex;align-items:center;justify-content:center;width:30px;height:23px;flex:none;border:1px dashed #81939e88;border-radius:3px;color:var(--muted)}
dialog:has(.country-flag-picker) {width:640px;max-height:calc(100vh - 24px)}
dialog:has(.country-flag-picker) #modal-form {display:flex;flex-direction:column;max-height:calc(100vh - 26px)}
dialog:has(.country-flag-picker) .dialog-heading,dialog:has(.country-flag-picker) .dialog-actions {flex-shrink:0}
dialog:has(.country-flag-picker) .dialog-body {min-height:0;overflow:auto}
.country-flag-picker>p {font-size:13px;line-height:1.5}
.country-flag-draft {display:flex;align-items:center;gap:10px;margin:12px 0;min-height:25px}
.country-flag-count {color:var(--muted);margin:8px 0}
.country-flag-results {border:0;padding:0;margin:0;min-width:0}
#country-flag-options {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;max-height:330px;overflow:auto;padding:4px}
.country-flag-option {display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:6px;padding:9px;min-width:0;font-size:13px;cursor:pointer}
.country-flag-option span:last-child {overflow-wrap:anywhere;line-height:1.3}
.country-flag-option:has(input:checked) {border-color:#16867a;background:#16867a15}
.country-flag-option:focus-within {outline:2px solid var(--focus);outline-offset:1px}
.country-flag-option input[type=radio] {width:16px;height:16px;min-height:0;padding:0;flex:none;accent-color:#16867a}
.country-flag-no-results {font-size:13px;grid-column:1/-1;margin:12px}
.flag-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html[data-theme="dark"] .country-flag-option {border-color:var(--ui-border)}
html[data-theme="dark"] .country-flag-option:has(input:checked) {border-color:#6cd7c7;background:#6cd7c712}
html[data-theme="dark"] .country-flag-count {color:var(--ui-secondary)}
@media(max-width:540px){#country-flag-options{grid-template-columns:minmax(0,1fr);max-height:280px}}
@media print{.entity-size-handles{display:none}}
