.dgabc-election {
  --dgabc-blue: #0055a2;
  --dgabc-deep-blue: #031e6e;
  --dgabc-bright-blue: #1055d5;
  --dgabc-sky: #00bbf8;
  --dgabc-green: #0e684c;
  color: #282828;
  font-family: Inter, Arial, sans-serif;
  margin: 40px auto;
  max-width: 1184px;
}

.dgabc-election *, .dgabc-election *::before, .dgabc-election *::after { box-sizing: border-box; }
.dgabc-election__banner { align-items: center; background: linear-gradient(90deg, var(--dgabc-deep-blue), #0a40c0 30%, var(--dgabc-bright-blue) 50%, #0a40c0 70%, var(--dgabc-deep-blue)); border-radius: 8px 8px 0 0; color: #fff; display: flex; flex-direction: column; gap: 10px; overflow: hidden; padding: 20px; text-align: center; }
.dgabc-election__banner h2 { font-size: clamp(28px, 4vw, 36px);font-weight: 900;letter-spacing: 1px; line-height: 1; margin: 0; font-family: Inter-Bold;}
.dgabc-election__banner h2 span { color: var(--dgabc-sky); }
.dgabc-election__live { background: #fff; border-radius: 20px; color: #1040c0; font-size: 11px; font-weight: 700; padding: 5px 16px; text-transform: uppercase; }
.dgabc-election__live.is-simulation { color: #a04200; }
.dgabc-election__widget { background: #fff; border-radius: 0 0 18px 18px; box-shadow: -2px 5px 20px rgba(0, 0, 0, .12); padding: 24px; }
.dgabc-election__status { align-items: flex-end; background: #f5f5f5; border-radius: 15px; display: flex; justify-content: space-between; margin-bottom: 30px; padding: 16px 24px; }
.dgabc-election__progress-info { flex: 1; max-width: 600px; }
.dgabc-election__progress-text { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.dgabc-election__progress { background: #d7d7d7; border-radius: 3px; height: 6px; margin-bottom: 8px; overflow: hidden; }
.dgabc-election__progress-fill { background: #1152ca; height: 100%; transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.dgabc-election__updated { color: #1484ea; font-size: 12px; }
.dgabc-election__update { align-items: center; background: #e7e6df; border: 0; border-radius: 20px; color: #282828; cursor: pointer; display: flex; font: 700 14px/1 Inter, Arial, sans-serif; gap: 8px; padding: 9px 16px; }
.dgabc-election__update svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 15px; }
.dgabc-election__update.is-loading svg { animation: dgabc-election-spin .8s linear infinite; }
.dgabc-election__update:disabled { cursor: wait; opacity: .65; }
@keyframes dgabc-election-spin { to { transform: rotate(360deg); } }
.dgabc-election__message { background: #fff3cd; border: 1px solid #ffe69c; border-radius: 8px; color: #664d03; font-size: 13px; margin: -14px 0 24px; padding: 10px 14px; }
.dgabc-election__grid { display: flex; justify-content: space-between; margin-bottom: 30px; }
.dgabc-election__role { align-items: center; display: flex; flex: 1; flex-direction: column; min-width: 0; }
.dgabc-election__role h3 { background: var(--dgabc-blue); border-radius: 20px; color: #fff; font-size: 12px; font-weight: 700; margin: 0 0 20px; padding: 5px 16px; text-align: center; }
.dgabc-election__candidates { display: flex; gap: 20px; justify-content: center; min-height: 147px; }
.dgabc-election__candidate { align-items: center; display: flex; flex-direction: column; text-align: center; width: 88px; }
.dgabc-election__avatar-wrap { --candidate-progress: 0; height: 67px; isolation: isolate; margin-bottom: 12px; position: relative; width: 67px; }
.dgabc-election__avatar-wrap::before { background: conic-gradient(from 0deg, var(--dgabc-blue) calc(var(--candidate-progress) * 1%), #d9dee4 0); border-radius: 50%; box-shadow: 0 4px 15px rgba(0, 0, 0, .11); content: ""; inset: -5px; position: absolute; z-index: 0; }
.dgabc-election__avatar, .dgabc-election__avatar-fallback { border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 15px rgba(0, 0, 0, .11); height: 100%; object-fit: cover; width: 100%; }
.dgabc-election__avatar { display: block; position: relative; z-index: 1; }
.dgabc-election__avatar[hidden] { display: none; }
.dgabc-election__avatar-fallback { align-items: center; background: #e7eef6; color: var(--dgabc-blue); display: flex; font-size: 19px; font-weight: 900; justify-content: center; left: 0; position: absolute; top: 0; z-index: 1; }
.dgabc-election__rank { align-items: center; background: var(--dgabc-green); border: 2px solid #fff; border-radius: 50%; bottom: 0; color: #fff; display: flex; font-size: 10px; font-weight: 700; height: 21px; justify-content: center; left: -5px; position: absolute; width: 21px; z-index: 2; }
.dgabc-election__party { color: #838383; font-size: 9px; margin-bottom: 4px; min-height: 11px; }
.dgabc-election__name { color: #5f5f5f; font-size: 11px; font-weight: 700; line-height: 1.2; margin-bottom: 4px; overflow-wrap: anywhere; }
.dgabc-election__percentage { color: #000; font-size: 14px; font-weight: 700; }
.dgabc-election__votes { color: #838383; font-size: 9px; margin-top: 2px; }
.dgabc-election__divider { background: #c5c5c5; margin: 0 10px; width: 1px; }
.dgabc-election__footer { display: flex; gap: 12px; justify-content: center; }
.dgabc-election__full-results { align-items: center; background: var(--dgabc-blue); border-radius: 8px; color: #fff; display: flex; font-size: 16px; font-weight: 700; gap: 12px; padding: 12px 24px; text-decoration: none; }
.dgabc-election__full-results--secondary { background: var(--dgabc-green); }
.dgabc-election__chart { align-items: flex-end; display: flex; gap: 2px; height: 16px; }
.dgabc-election__chart i { background: #fff; border-radius: 2px; display: block; height: 10px; width: 4px; }
.dgabc-election__chart i:nth-child(2) { height: 16px; }
.dgabc-election__chart i:nth-child(3) { height: 6px; }

@media (max-width: 960px) {
  .dgabc-election__grid { flex-wrap: wrap; gap: 32px 16px; }
  .dgabc-election__divider { display: none; }
  .dgabc-election__role { flex: 0 0 calc(50% - 8px); }
}

@media (max-width: 560px) {
  .dgabc-election { margin: 20px auto; }
  .dgabc-election__banner { padding: 17px 12px; }
  .dgabc-election__widget { padding: 16px; }
  .dgabc-election__status { align-items: flex-start; flex-direction: column; gap: 15px; padding: 16px; }
  .dgabc-election__update { align-self: flex-end; }
  .dgabc-election__role { flex-basis: 100%; }
  .dgabc-election__role h3 { font-size: 13px; }
  .dgabc-election__candidates { gap: clamp(18px, 10vw, 36px); }
  .dgabc-election__candidate { width: 104px; }
  .dgabc-election__name { font-size: 12px; }
  .dgabc-election__percentage { font-size: 16px; }
  .dgabc-election__footer { flex-direction: column; }
  .dgabc-election__full-results { font-size: 14px; justify-content: center; width: 100%; }
}

@media (max-width: 340px) {
  .dgabc-election__widget { padding-left: 10px; padding-right: 10px; }
  .dgabc-election__candidates { gap: 8px; }
  .dgabc-election__candidate { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .dgabc-election__progress-fill { transition: none; }
  .dgabc-election__update.is-loading svg { animation: none; }
}
