.epe-groups-map {
  --epe-border: #d2d2d2;
  --epe-text: #222;
  position: relative;
  width: 100%;
  color: var(--epe-text);
  box-sizing: border-box;
}

.epe-groups-map *,
.epe-groups-map *::before,
.epe-groups-map *::after {
  box-sizing: border-box;
}

.epe-groups-map .epe-content-grid,
.epe-groups-map .epe-map-column,
.epe-groups-map .epe-table-column,
.epe-groups-map .epe-results-column,
.epe-groups-map .epe-parties-column {
  width: 100%;
  min-width: 0;
}

.epe-groups-map .epe-content-grid {
  display: block;
}

.epe-groups-map .epe-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  margin: 0 0 12px;
}

.epe-groups-map .epe-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid rgba(0, 0, 0, .24);
  border-color: color-mix(in srgb, var(--epe-button-color) 82%, #000);
  border-radius: 4px;
  background: var(--epe-button-color);
  color: var(--epe-button-text);
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}

.epe-groups-map .epe-filter-button:hover,
.epe-groups-map .epe-filter-button:focus-visible {
  color: var(--epe-button-text);
  filter: brightness(.91);
  outline: none;
}

.epe-groups-map .epe-filter-button.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--epe-button-color);
  transform: translateY(-1px);
}

.epe-groups-map .epe-map-shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px;
  border-radius: 5px;
  background: #eee;
}

.epe-groups-map .epe-map-canvas,
.epe-groups-map .epe-map-svg {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
}

.epe-groups-map .epe-map-svg .europe,
.epe-groups-map .epe-map-svg .epe-country-shape {
  stroke: #000 !important;
  stroke-width: .75px !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.epe-groups-map .epe-map-svg .epe-country-shape {
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  fill-opacity: var(--epe-fill-opacity, 1) !important;
  transition: filter .14s ease, fill-opacity .14s ease;
}

.epe-groups-map .epe-map-svg .epe-country-shape:hover,
.epe-groups-map .epe-map-svg .epe-country-shape:focus,
.epe-groups-map .epe-map-svg .epe-country-shape.is-hovered {
  filter: brightness(.9);
  outline: none !important;
  box-shadow: none !important;
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-selected {
  filter: brightness(.94);
  outline: none !important;
  box-shadow: none !important;
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-selected:hover,
.epe-groups-map .epe-map-svg .epe-country-shape.is-selected:focus,
.epe-groups-map .epe-map-svg .epe-country-shape.is-selected.is-hovered {
  filter: brightness(.87);
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view:hover,
.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view:focus,
.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view.is-hovered {
  fill-opacity: var(--epe-hover-opacity, 1) !important;
  filter: none;
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view.is-selected {
  filter: brightness(.94);
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view.is-selected:hover,
.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view.is-selected:focus,
.epe-groups-map .epe-map-svg .epe-country-shape.is-share-view.is-selected.is-hovered {
  fill-opacity: var(--epe-hover-opacity, 1) !important;
  filter: brightness(.94);
}

.epe-groups-map .epe-map-svg .epe-country-shape.is-zero-share:hover,
.epe-groups-map .epe-map-svg .epe-country-shape.is-zero-share:focus,
.epe-groups-map .epe-map-svg .epe-country-shape.is-zero-share.is-hovered {
  filter: brightness(.96);
}

.epe-groups-map .epe-tooltip {
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  max-width: calc(100vw - 8px);
  pointer-events: none;
  text-align: center;
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity .08s linear;
}

.epe-groups-map .epe-tooltip[hidden] {
  display: none !important;
}

.epe-groups-map .epe-tooltip-country,
.epe-groups-map .epe-tooltip-group {
  display: block;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  margin-right: auto;
  margin-left: auto;
}

.epe-groups-map .epe-tooltip.is-visible {
  opacity: 1;
}

.epe-groups-map .epe-tooltip-country {
  background: rgba(10, 10, 10, .92);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.epe-groups-map .epe-tooltip-group {
  border: 1px solid #000;
  box-shadow: 1px 1px #333;
}

.epe-groups-map .epe-tooltip-groups {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 8px);
  gap: 3px;
  margin: 3px auto 0;
  white-space: nowrap;
}

.epe-groups-map .epe-tooltip-groups .epe-tooltip-group {
  flex: 0 0 auto;
  margin-right: 0;
  margin-left: 0;
}

.epe-groups-map .epe-country-select {
  position: relative;
  z-index: 15;
  display: block;
  width: 192px;
  min-width: 192px;
  max-width: 192px;
  margin: 0 0 10px -5px;
  padding: 0;
  font-size: .9rem !important;
}

.epe-groups-map .epe-country-options {
  font-size: .9rem !important;
}

.epe-groups-map .epe-country-selected {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid var(--epe-border);
  border-radius: 4px;
  background: #fff;
  color: #222;
  box-shadow: none;
  font: inherit;
  line-height: 28px;
  text-align: left;
  cursor: pointer;
}

.epe-groups-map .epe-country-selected:hover,
.epe-groups-map .epe-country-selected:focus-visible {
  border-color: #999;
  background: #fff;
  color: #222;
  outline: none;
}

.epe-groups-map .epe-country-selected-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.epe-groups-map .epe-country-selected .country-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epe-groups-map .epe-country-arrow {
  flex: 0 0 auto;
  width: 10px;
  height: 6px;
  margin-left: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23545b66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px 6px no-repeat;
  transition: transform .15s ease;
}

.epe-groups-map .epe-country-select.is-open .epe-country-arrow {
  transform: rotate(180deg);
}

.epe-groups-map .epe-country-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  max-height: 297px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--epe-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.epe-groups-map .epe-country-options[hidden] {
  display: none !important;
}

.epe-groups-map .epe-country-option {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #222;
  box-shadow: none;
  font: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.epe-groups-map .epe-country-option:hover,
.epe-groups-map .epe-country-option:focus-visible {
  background: #f2f2f2;
  color: #222;
  outline: none;
}

.epe-groups-map .epe-country-option.is-active {
  background: #e9f4e9;
  font-weight: 600;
}

.epe-groups-map img.flagselect {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 1px 1px #ccc;
}

.epe-groups-map .epe-table-column {
  margin-top: 24px;
}

.epe-groups-map .epe-results-column {
  display: flow-root;
}

.epe-groups-map .epe-table-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  overflow: visible;
  clear: both;
}

.epe-groups-map .epe-hemicycle {
  position: relative;
  width: 100%;
  margin: 0 0 32px;
  overflow: visible;
  font-family: "Sofia Sans Semi Condensed", "Sofia Sans", sans-serif;
}

.epe-groups-map .epe-hemicycle-chart {
  position: relative;
  width: 100%;
}

.epe-groups-map .epe-hemicycle[hidden] {
  display: none !important;
}

.epe-groups-map .epe-hemicycle-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.epe-groups-map .epe-hemicycle-segment {
  stroke: #fff;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease;
}

.epe-groups-map .epe-hemicycle-segment:hover,
.epe-groups-map .epe-hemicycle-segment:focus {
  filter: brightness(.9);
  outline: none;
}

.epe-groups-map .epe-hemicycle-label {
  display: none;
  font-family: "Sofia Sans Semi Condensed", "Sofia Sans", sans-serif;
  pointer-events: none;
}

.epe-groups-map .epe-hemicycle-label-name {
  font-weight: 800;
}

.epe-groups-map .epe-hemicycle-label-value {
  font-weight: 900;
}

.epe-groups-map .epe-hemicycle-number-only {
  display: inline;
  font-family: "Sofia Sans Semi Condensed", "Sofia Sans", sans-serif;
  font-weight: 900;
  pointer-events: none;
}

.epe-groups-map .epe-hemicycle-logos {
  display: inline;
  pointer-events: none;
}

.epe-groups-map .epe-hemicycle-logo-circle {
  vector-effect: non-scaling-stroke;
}

.epe-groups-map .epe-hemicycle-logo-image {
  clip-path: circle(50% at 50% 50%);
}

.epe-groups-map .epe-hemicycle-logo-fallback {
  fill: #222;
  font-family: "Sofia Sans Semi Condensed", "Sofia Sans", sans-serif;
  font-size: 8px;
  font-weight: 900;
}

.epe-groups-map .epe-hemicycle-summary {
  position: absolute;
  z-index: 2;
  top: 61.5%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58%;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
}

.epe-groups-map .epe-hemicycle-total {
  display: block;
  color: #222;
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 900;
  line-height: 1;
}

.epe-groups-map .epe-hemicycle-caption {
  display: block;
  margin-top: 3px;
  color: #555;
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.epe-groups-map .epe-hemicycle-country {
  display: inline-block;
  max-width: 100%;
  margin-top: 9px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.epe-groups-map .epe-hemicycle-tooltip .epe-tooltip-groups {
  margin-top: 0;
}

.epe-groups-map .epe-party-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
  margin-top: 0;
}

.epe-groups-map .epe-parties-column {
  margin-top: 30px;
}

.epe-groups-map .epe-party-cards .party-card {
  margin: 0 !important;
}

.epe-groups-map .epe-seats-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  background: transparent;
  table-layout: auto;
}

.epe-groups-map .epe-seats-table td {
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid #d5d5d5;
  font-size: inherit;
  line-height: 1.3;
  vertical-align: middle;
}

.epe-groups-map .epe-seats-table tbody tr {
  background: #f5f5f5 !important;
}

.epe-groups-map .epe-seats-table thead th:first-child,
.epe-groups-map .epe-seats-table td:first-child {
  width: 80% !important;
}

.epe-groups-map .epe-seats-table thead th:last-child,
.epe-groups-map .epe-seats-table td:last-child {
  width: 20% !important;
}

.epe-groups-map .epe-seats-table td:last-child {
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .epe-groups-map [data-epe-hemicycle] {
    margin: 15px 0 15px 0;
  }

  .epe-groups-map .epe-map-column,
  .epe-groups-map .epe-map-shell {
    width: 100%;
    max-width: none;
  }

  .epe-groups-map .epe-table-column {
    display: block;
  }
}

@media (min-width: 1021px) {
  .epe-groups-map .epe-party-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1021px) and (max-width: 1280px) {
  .epe-groups-map .epe-map-column,
  .epe-groups-map .epe-map-shell {
    width: 100%;
    max-width: none;
  }

  .epe-groups-map .epe-table-column {
    margin-top: 24px;
  }

  .epe-groups-map .epe-results-column {
    display: grid;
    grid-template-columns: minmax(0, 28fr) minmax(0, 72fr);
    align-items: start;
    column-gap: 35px;
    row-gap: 0;
  }

  .epe-groups-map .epe-hemicycle {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .epe-groups-map .epe-table-wrap {
    grid-column: 1;
    grid-row: 1;
    clear: none;
  }
}

@media (min-width: 1281px) {
  .epe-groups-map .epe-hemicycle {
    margin: 0 0 29px;
  }

  .epe-groups-map .epe-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 680px) minmax(360px, 1fr);
    align-items: start;
    gap: 28px;
  }

  .epe-groups-map .epe-map-column {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    justify-self: start;
  }

  .epe-groups-map .epe-table-column {
    margin-top: 0;
  }

  .epe-groups-map .epe-map-shell {
    max-width: 680px;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .epe-groups-map .epe-filter-buttons {
    justify-content: flex-start;
    gap: 6px;
  }

  .epe-groups-map .epe-filter-button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .epe-groups-map .epe-country-select {
    width: 192px;
    min-width: 192px;
    max-width: 192px;
  }

  .epe-groups-map .epe-seats-table td {
    padding: 7px 6px;
    font-size: .9rem;
  }

  .epe-groups-map .epe-seats-table td:last-child {
    width: 20% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .epe-groups-map .epe-filter-button,
  .epe-groups-map .epe-map-svg .eu,
  .epe-groups-map .epe-country-arrow {
    transition: none;
  }
}
