/* An active ballot stays visible even after the notice is dismissed or voted. */
#territoryWarModalV3 button.tw-vote-active {
  position:relative;
  border-color:#f7ce7a!important;
  box-shadow:inset 0 0 0 1px #f7ce7a66,inset 0 0 22px #dda14e24;
  animation:tw-vote-border 2.4s ease-in-out infinite;
}
#territoryWarModalV3 .tw-vote-badge {
  position:absolute;top:4px;right:7px;display:block;
  padding:2px 6px;border:1px solid #f7ce7a66;border-radius:3px;
  background:#211a0e;color:#ffe4ac;font-family:inherit;
  font-size:10px;font-weight:800;line-height:1.5;letter-spacing:0;white-space:nowrap;
}
#territoryWarModalV3 .tw5-skill-grid>button.tw-vote-active::after {
  content:attr(data-tw-vote-label);position:absolute;top:9px;right:9px;
  padding:5px 8px;border:1px solid #f7ce7a88;border-radius:3px;
  background:#211a0ef2;color:#ffe4ac;font-size:10px;font-weight:800;letter-spacing:0;
}
#territoryWarModalV3 .tw5-skill-grid>button.tw-vote-active>span:first-child { padding-top:24px; }
#territoryWarModalV3 .tw-vote-active:focus-visible { outline:2px solid #fff0c7;outline-offset:-4px; }
.tw-vote-notice {
  position:absolute;z-index:90;top:88px;right:24px;
  display:grid;grid-template-columns:minmax(0,1fr) auto 28px;align-items:center;gap:8px;
  width:min(390px,calc(100% - 24px));padding:5px 8px 5px 12px;
  border:1px solid #e1b65b80;border-left:3px solid #ffd485;border-radius:8px;
  background:linear-gradient(115deg,#302514f7,#111923fa 64%);
  color:#f9f0de;box-shadow:0 16px 44px #0008,inset 0 1px #fff1;
  font-family:inherit;animation:tw-vote-notice-in .25s ease-out;
}
.tw-vote-notice-copy { min-width:0;display:flex;align-items:center;gap:6px;white-space:nowrap; }
.tw-vote-notice-copy b { flex:none;color:#ffd485;font-size:10px; }
.tw-vote-notice-copy strong { min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:13px;line-height:1.4; }
.tw-vote-notice-copy>span { flex:none;color:#bcc8d6;font-size:10px;line-height:1.6; }
.tw-vote-notice button { font:inherit;cursor:pointer; }
.tw-vote-open { min-height:38px;padding:7px 9px;border:1px solid #b9965580;border-radius:5px;background:#eac781;color:#201b12;font-size:11px!important;font-weight:800!important;white-space:nowrap; }
.tw-vote-open:hover { background:#ffe1a6; }
.tw-vote-notice button:focus-visible { outline:2px solid #fff1ca;outline-offset:3px; }
.tw-vote-dismiss { display:grid;place-items:center;width:28px;height:38px;padding:0;border:0;background:transparent;color:#c8bba1;font-size:20px!important; }
.tw-vote-preference { display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;min-height:38px;margin:0 0 10px auto;color:#c5cfdb;font-size:12px;cursor:pointer; }
.tw-vote-preference input { width:17px;height:17px;margin:0;accent-color:#edc779;cursor:pointer; }
.tw-vote-preference b { min-width:22px;color:#8494a8;font-size:10px; }
.tw-vote-preference input:checked~b { color:#edc779; }
.tw-vote-preference input:focus-visible { outline:2px solid #ffe2a0;outline-offset:3px; }
body.territory-war-drawer-open .tw-vote-notice { visibility:hidden;pointer-events:none; }
@keyframes tw-vote-border { 50% { box-shadow:inset 0 0 0 1px #ffe4a9,inset 0 0 28px #dda14e3d,0 0 14px #e9af5033; } }
@keyframes tw-vote-notice-in { from { opacity:0;transform:translateY(-8px); } to { opacity:1;transform:translateY(0); } }
@media(max-width:820px) {
  .tw-vote-notice { top:calc(64px + env(safe-area-inset-top,0px));right:12px; }
  #territoryWarModalV3 .tw4-mobile-nav button.tw-vote-active { padding-top:15px; }
  #territoryWarModalV3 .tw4-mobile-nav .tw-vote-badge { top:2px;right:50%;transform:translateX(50%);font-size:8px;line-height:1.2;padding:1px 5px; }
}
@media(prefers-reduced-motion:reduce) {
  #territoryWarModalV3 button.tw-vote-active,.tw-vote-notice { animation:none; }
}
