@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap");

*,
img,
a {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

root {
  --color-primary-darker: hsl(11, 73%, 46%);
  --color-primary-darker-h: 11;
  --color-primary-darker-s: 73%;
  --color-primary-darker-l: 46%;
  --color-primary-dark: hsl(11, 73%, 56%);
  --color-primary-dark-h: 11;
  --color-primary-dark-s: 73%;
  --color-primary-dark-l: 56%;
  --color-primary: hsl(11, 73%, 66%);
}

body {
  font-family: "Jost", sans-serif;
  font-size: 16px;
  margin: 0 auto;
}

.result-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem 0.8rem;
  max-width: 800px;
  margin: 0 auto;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.party-info-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #dff0e1;
  padding: 2px 16px;
  border-radius: 10px;

  h1 {
    font-size: 1rem;
    font-weight: 500;
  }
}

.party-icon {
  height: 42px;
  width: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

.party-info-col {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.total-seats {
  display: flex;
  flex-direction: column;
  align-items: end;
  white-space: nowrap;

  .label {
    color: #716a6a;
    font-size: 0.85rem;
  }

  .count {
    font-weight: 500;
    font-size: 1.1rem;
  }
}

.vote-types {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 16px;

  .label {
    font-weight: 400;
    font-size: 0.9rem;
    color: #fff;
    min-width: 95px;
    padding: 8px;
    border-radius: 6px;
  }

  .bar-wrapper {
    width: 100%;
    height: 34px;
    background-color: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    position: relative;

    .fill {
      height: 100%;
    }

    .votes-count {
      position: absolute;
      top: 50%;
      right: 12px;
      transform: translateY(-50%);
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      pointer-events: none;
      font-size: 1.2rem;
      font-weight: 500;
      display: flex;
      gap: 0.6rem;
      align-items: center;

      .votes-label {
        color: #716a6a;
        font-weight: 400;
        font-size: 0.9rem;
      }

      .percentage {
        color: #349eeb;
        font-weight: 400;
        font-size: 0.8rem;
      }
    }
  }

  .seats {
    font-size: 1rem;
    font-weight: 500;
    min-width: 50px;
    display: flex;
    justify-content: end;
  }
}

.pratykshya {
  .label {
    background: #215ab2;
  }

  .bar-wrapper {
    .fill {
      width: 30%;
      background: linear-gradient(
        to right,
        #3a72c9 0%,
        rgba(58, 114, 201, 0.6) 60%,
        transparent 100%
      );
    }
  }
}

.samanupatik {
  .label {
    background: #349eeb;
  }

  .fill {
    width: 70%;
    background: linear-gradient(
      to right,
      #7bc1f5 0%,
      rgba(58, 114, 201, 0.6) 60%,
      transparent 100%
    );
  }
}

@media (min-width: 600px) {
  .party-info-wrapper h1 {
    font-size: 1.2rem;
  }

  .vote-types .seats {
    font-size: 1.2rem;
  }
}
