
/* Tylko panel ŚWIAT. Nie stylujemy map kontynentów. */
.eww-world-root{width:100%;max-width:100%;}
.eww-world-view{width:100%;max-width:100%;}
.eww-world-main-filters,.eww-world-election-filters{display:flex;flex-wrap:wrap;gap:5px;}
.eww-world-main,.eww-world-election{text-transform:uppercase!important;}
.eww-world-root .ewm-main-filters,
.eww-world-root .ewm-election-filters,
.eww-world-root .eww-world-main-filters,
.eww-world-root .eww-world-election-filters,
.eww-world-root .eww-world-zoom{gap:5px!important;}
.eww-world-map-wrap{position:relative;width:100%;max-width:100%;overflow:hidden;margin-bottom:10px;box-sizing:border-box;}
.eww-world-view.ewm-shortcode .ewm-selector-wrap{top:0!important;}
.eww-world-svg{width:100%;max-width:100%;overflow:hidden;box-sizing:border-box;}
.eww-world-svg svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;margin:0!important;transform:none!important;transition:width .18s ease;shape-rendering:geometricPrecision!important;text-rendering:geometricPrecision!important;}

.eww-world-svg,.eww-world-svg svg{cursor:grab;}
.eww-world-svg{touch-action:pan-y;}
.eww-world-svg.is-pannable{touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:contain;}
.eww-world-svg,.eww-world-svg *, .eww-world-zoom,.eww-world-zoom *{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-webkit-user-drag:none!important;-webkit-touch-callout:none!important;}
body.eww-world-no-select,body.eww-world-no-select *{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-webkit-user-drag:none!important;-webkit-touch-callout:none!important;}
.eww-world-svg.is-dragging,.eww-world-svg.is-dragging svg,.eww-world-svg.is-dragging path[data-eww-country]{cursor:move!important;}
.eww-world-svg.is-dragging svg{transition:none!important;will-change:auto!important;backface-visibility:visible!important;-webkit-backface-visibility:visible!important;}
.eww-world-svg.is-zoom-anchoring svg{transition:none!important;}

.eww-world-zoom{display:flex;justify-content:center;align-items:center;gap:5px;margin:8px 0 14px;}
.eww-world-zoom button{min-width:34px;height:34px;padding:0 10px;line-height:32px;font-size:20px;font-weight:400;cursor:pointer;}
.eww-world-zoom button:disabled{opacity:.4;cursor:default;}
@media (max-width:1000px){.eww-world-svg svg{--eww-pan-x:clamp(0px,8vw,100px);}}
@media (max-width:700px){.eww-world-svg svg{--eww-pan-x:clamp(0px,5vw,40px);}}
@media (max-width:480px){.eww-world-svg svg{--eww-pan-x:0px;}}
.eww-world-selector[hidden]{display:none!important;}
.eww-world-svg path[data-eww-country]{cursor:pointer!important;transition:fill .08s linear;}
.eww-world-svg path[data-eww-state="active"]{cursor:pointer!important;}
.eww-world-tooltip{position:fixed;left:0;top:0;z-index:99999;padding:8px 10px;border-radius:8px;background:rgba(10,10,10,.92);color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans","Helvetica Neue",Arial,sans-serif;font-size:14px;font-weight:600;line-height:1.15;-webkit-font-smoothing:antialiased;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-9999px,-9999px);box-shadow:0 8px 24px rgba(0,0,0,.25);transition:opacity .08s linear;}
.eww-world-tooltip.is-visible{opacity:1;}
.eww-world-tooltip.is-inactive{background:rgba(90,98,105,.92);font-weight:400;}
.eww-world-tooltip.is-archived{background:rgba(112,102,90,.92);font-weight:500;}
.eww-world-tooltip.is-no-elections{background:rgba(111,55,44,.94);font-weight:600;}
.eww-continent-view[hidden],.eww-world-view[hidden]{display:none!important;}

.eww-world-zoom .eww-full-view{font-size:12px;line-height:1.2;min-width:110px;padding:0 12px;}
.eww-world-elections-list{width:100%;max-width:100%;margin-top:10px;}
.eww-continent-row-hidden{display:none!important;}

/* WORLD only: mobile layout below 560px. Continent views are untouched. */
@media (max-width:560px){
  .eww-world-view .eww-world-svg,
  .eww-world-view .eww-world-tooltip,
  .eww-world-view .eww-world-zoom{display:none!important;}
  .eww-world-view .eww-world-map-wrap{margin:0!important;min-height:0!important;overflow:visible!important;}
  .eww-world-view .eww-world-elections-list{margin-top:0!important;}
  .eww-world-view .eww-world-elections-list .ewybory-elections-scroll{margin-top:28px!important;overflow:visible!important;}
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar{
    display:flex!important;justify-content:space-between!important;align-items:center!important;
    gap:10px!important;width:100%!important;margin:0 0 8px!important;position:relative!important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .eww-world-selector{
    position:relative!important;z-index:220!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    flex:1 1 auto!important;width:100%!important;min-width:0!important;max-width:300px!important;
    margin:0!important;padding:0!important;transform:none!important;order:0!important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .eww-world-selector[hidden]{display:none!important;}
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-select,
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-selected{
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-options{
    left:0!important;right:auto!important;width:100%!important;min-width:220px!important;max-width:min(320px,calc(100vw - 24px))!important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-year-select{
    position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    flex:0 0 auto!important;order:1!important;margin:0!important;transform:none!important;
  }
}

@media (max-width:560px){
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .eww-world-selector{
    flex:1 1 100%!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-select,
  .eww-world-view .eww-world-map-wrap > .eww-world-selector .ewm-country-select{
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
}

/* v0.21: stałe odstępy 5px również pomiędzy zawiniętymi wierszami przycisków. */
.eww-world-root .ewm-main-filters,
.eww-world-root .ewm-election-filters,
.eww-world-root .eww-world-main-filters,
.eww-world-root .eww-world-election-filters{
  column-gap:5px!important;
  row-gap:5px!important;
}
.eww-world-root .ewm-main-filters > .filter-btn,
.eww-world-root .ewm-election-filters > .filter-btn,
.eww-world-root .eww-world-main-filters > .filter-btn,
.eww-world-root .eww-world-election-filters > .filter-btn{
  margin:0!important;
}

/* v0.22: stałe 5px pomiędzy grupą głównych przycisków i grupą typów wyborów. */
.eww-world-root .ewm-election-filters,
.eww-world-root .eww-world-election-filters{
  margin-top:5px!important;
}


.eww-world-view .ewm-flag-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  margin-right: 7px;
  font-size: 21px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* Keep the world selector in its own full-width bar above the map. */
.eww-world-view.ewm-shortcode .eww-world-map-wrap{
  overflow:visible!important;
  margin-bottom:10px!important;
}
.eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector{
  display:flex!important;
  position:relative!important;
  justify-content:flex-end;
  align-items:center;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0 0 10px!important;padding:10px!important;
  background:#dddddd;border-radius:3px;box-sizing:border-box;
  transform:none!important;z-index:220;
}
.eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector[hidden]{display:none!important;}
.eww-world-view .eww-world-elections-list{margin-bottom:10px!important;}

.eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector{
  justify-content:flex-start!important;
}
.eww-world-svg svg{
  background:#eee!important;
  border-radius:4px!important;
  box-sizing:border-box;
}

.eww-world-svg svg :is(path,polygon,polyline,line):not(defs *){
  stroke:#444!important;stroke-width:0.5px!important;vector-effect:non-scaling-stroke;
}


/* responsive world selector alignment <= 1020px */
@media (max-width: 1020px) {
  .eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector {
    justify-content: flex-end !important;
  }
}



/* Keep the year selector at the right edge in the world calendar too. */
.eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .ewybory-year-select {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* World-map zoom controls: overlay in top-left corner. */
.eww-world-map-wrap{position:relative!important;}
.eww-world-map-wrap .eww-world-zoom{
  position:absolute!important;top:10px!important;left:10px!important;z-index:260!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;
  margin:0!important;padding:0!important;
}
.eww-world-map-wrap .eww-world-zoom button{
  width:34px!important;height:34px!important;min-width:34px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  margin:0!important;padding:0!important;border:1px solid #000!important;border-radius:4px!important;
  background:#fff!important;color:#000!important;font:400 20px/1 Arial,sans-serif!important;
  box-shadow:none!important;cursor:pointer!important;box-sizing:border-box!important;
}
.eww-world-map-wrap .eww-world-zoom button:hover,.eww-world-map-wrap .eww-world-zoom button:focus{background:#f3f3f3!important;color:#000!important;}
.eww-world-map-wrap .eww-world-zoom button:disabled{opacity:.4!important;cursor:default!important;}
.eww-world-map-wrap .eww-world-zoom .eww-full-view{font-size:20px!important;line-height:1!important;min-width:34px!important;padding:0!important;}



/* vNext: world-map zoom controls live inside the SVG map surface, vertically. */
.eww-world-svg{position:relative!important;}
.eww-world-svg .eww-world-zoom{
  position:absolute!important;
  top:10px!important;
  left:10px!important;
  z-index:260!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:4px!important;
  margin:0!important;
  padding:0!important;
}


/* World zoom button opacity states. */
.eww-world-svg .eww-world-zoom button:not(:disabled){opacity:.8!important;}
.eww-world-svg .eww-world-zoom button:not(:disabled):hover,
.eww-world-svg .eww-world-zoom button:not(:disabled):focus{opacity:.9!important;}
.eww-world-svg .eww-world-zoom button:disabled,
.eww-world-svg .eww-world-zoom button:disabled:hover,
.eww-world-svg .eww-world-zoom button:disabled:focus{opacity:.4!important;background:#fff!important;color:#000!important;}

/* Keep the expanded world-country selector above zoom controls. */
.eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector,
.eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .eww-world-selector {
  z-index: 1000 !important;
}
.eww-world-view .eww-world-country-select.is-open {
  z-index: 1001 !important;
}



/* 3.15: full-width world country dropdown on phones <= 480px. */
@media (max-width: 480px) {
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar {
    flex-wrap: wrap !important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar > .eww-world-selector {
    order: -1 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-select,
  .eww-world-view .eww-world-elections-list .ewybory-elections-toolbar .ewm-country-selected,
  .eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector .ewm-country-select,
  .eww-world-view.ewm-shortcode .eww-world-map-wrap > .eww-world-selector .ewm-country-selected {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* 3.60: world SVG position and size are controlled by the viewBox camera in world.js. */

/* 5.4: SVG is server-rendered with its final initial viewBox; show immediately. */

/* 3.66: actual inter-country border-gap polygons (derived from shared SVG geometry).
   Filled only where two neighboring country polygons have a narrow interstitial
   space. Coastlines, micro-island points, and original path outlines are untouched.
   The polygons participate in existing country status/hover fill rules, but
   never receive pointer events or black outlines. */
.eww-world-svg svg .eww-world-border-repair,
.eww-world-svg svg .eww-world-border-repair * {
  pointer-events: none !important;
}
.eww-world-svg svg .eww-world-border-repair path {
  stroke: none !important;
  stroke-width: 0 !important;
  fill-rule: evenodd !important;
  vector-effect: none !important;
  transition: none !important;
}


/* 3.99: shared international borders are dashed, not doubled over solid strokes. */
svg path.eww-disputed-fill.eww-disputed-fill,
.eww-world-svg svg path.eww-disputed-fill,
.ewybory-africa-map svg path.eww-disputed-fill,
.ewm-shortcode #map-desktop svg path.eww-disputed-fill {
    stroke: none !important;
    stroke-width: 0 !important;
}
svg path.eww-disputed-outline.eww-disputed-outline,
.eww-world-svg svg path.eww-disputed-outline,
.ewybory-africa-map svg path.eww-disputed-outline,
.ewm-shortcode #map-desktop svg path.eww-disputed-outline {
    fill: none !important;
    stroke: #444 !important;
    stroke-width: 0.5px !important;
    stroke-dasharray: none !important;
    vector-effect: non-scaling-stroke !important;
    pointer-events: none !important;
}
svg #eww-disputed-border-overlays path,
.eww-world-svg svg #eww-disputed-border-overlays path,
.ewybory-africa-map svg #eww-disputed-border-overlays path,
.ewm-shortcode #map-desktop svg #eww-disputed-border-overlays path {
    fill: none !important;
    stroke: #444 !important;
    stroke-width: 0.9px !important;
    stroke-dasharray: 3.2 2.6 !important;
    stroke-linecap: butt !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
    pointer-events: none !important;
}
