/* =========================================================
   MAGIAPIŁKI — RANKING ZŁOTEJ PIŁKI
   FRONTEND.CSS
   Styl zgodny z głównymi modułami MagiaPilki.pl
   Typografia dziedziczona z motywu
   ========================================================= */


/* =========================================================
   ROOT
   ========================================================= */

.mp-bdor-ranking {
  --mp-surface: #1e2423;
  --mp-surface-2: #191e1d;
  --mp-surface-3: #242b2a;

  --mp-border: #4f4f4f;

  --mp-text: #ffffff;
  --mp-muted: #d1d1d1;
  --mp-dim: #909090;

  --mp-accent: #56c97b;
  --mp-accent-light: #7cdea0;
  --mp-accent-soft: rgba(86, 201, 123, .08);

  width: 100% !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;

  color: var(--mp-text);

  font-size: 16px;
  line-height: 1.55;
}

.mp-bdor-ranking,
.mp-bdor-ranking *,
.mp-bdor-ranking *::before,
.mp-bdor-ranking *::after {
  box-sizing: border-box;
}


/* =========================================================
   COMPACT — NAGŁÓWEK KOLUMN
   ========================================================= */

.mp-bdor-compact-head {
  display: grid;
  grid-template-columns:
    58px
    minmax(0, 1fr)
    72px
    64px;

  gap: 12px;
  align-items: center;

  width: 100%;

  margin: 0;
  padding: 0 18px 8px;

  color: var(--mp-dim);

  font-size: 11px;
  line-height: 1.2;

  text-transform: uppercase;
  letter-spacing: .04em;
}

.mp-bdor-compact-head span:nth-child(3),
.mp-bdor-compact-head span:nth-child(4) {
  text-align: right;
}


/* =========================================================
   COMPACT RANKING
   ========================================================= */

.mp-bdor-compact {
  width: 100%;

  margin: 0 0 30px;

  overflow: hidden;

  border: .3px solid var(--mp-border);
  border-radius: 10px;

  background: var(--mp-surface);
}

.mp-bdor-compact a {
  display: grid;

  grid-template-columns:
    58px
    minmax(0, 1fr)
    72px
    64px;

  align-items: center;

  gap: 12px;

  width: 100%;
  min-width: 0;
  min-height: 61px;

  padding: 10px 18px;

  border: 0;
  border-bottom: .3px solid var(--mp-border);

  background: var(--mp-surface);
  color: inherit;

  text-decoration: none !important;

  transition: background-color .15s ease;
}

.mp-bdor-compact a:last-child {
  border-bottom: 0;
}

.mp-bdor-compact a:hover {
  background: var(--mp-surface-3);
}

.mp-bdor-compact .rank {
  color: var(--mp-accent-light);

  font-size: 21px;
  line-height: 1;

  white-space: nowrap;
}

.mp-bdor-compact .name {
  min-width: 0;

  overflow: hidden;

  color: #fff;

  font-size: 16px;
  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-bdor-compact .trend {
  color: var(--mp-dim);

  font-size: 11px;

  text-align: right;

  white-space: nowrap;
}

.mp-bdor-compact .trend.up {
  color: #7fd9a8;
}

.mp-bdor-compact .trend.down {
  color: #e98282;
}

.mp-bdor-compact .trend.new {
  color: var(--mp-accent-light);
}

.mp-bdor-compact strong {
  color: #fff;

  font-size: 20px;

  text-align: right;

  white-space: nowrap;
}


/* =========================================================
   CARDS
   ========================================================= */

.mp-bdor-cards {
  display: grid;

  grid-template-columns: minmax(0, 1fr);

  gap: 22px;

  width: 100%;
}

.mp-bdor-card {
  width: 100% !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 24px 28px;

  overflow: hidden;

  border: .3px solid var(--mp-border);
  border-radius: 10px;

  background: var(--mp-surface);

  color: #fff;

  box-shadow: none;
}


/* =========================================================
   PLAYER HEADER
   ========================================================= */

.mp-player-header {
  display: flex !important;

  align-items: center;
  justify-content: space-between;

  gap: 24px;

  width: 100%;

  margin: 0 0 24px;
}

.mp-player-left {
  min-width: 0;
}

.mp-player-info {
  min-width: 0;
}

.mp-player-info h3 {
  display: flex;

  align-items: baseline;

  gap: 6px;

  margin: 0 0 5px !important;
  padding: 0 !important;

  font-size: 23px;
  line-height: 1.2;
}

.mp-player-info h3 .mp-rank,
.mp-player-info h3 .mp-player-name {
  display: inline;

  margin: 0;
  padding: 0;

  color: #fff !important;

  font-size: inherit;
  line-height: inherit;
}

.mp-player-info p {
  margin: 0 !important;
  padding: 0 !important;

  color: var(--mp-muted);

  font-size: 13px;
  line-height: 1.4;
}


/* =========================================================
   SCORE
   ========================================================= */

.mp-score {
  display: flex;

  flex: 0 0 auto;

  align-items: baseline;
  justify-content: flex-end;

  white-space: nowrap;
}

.mp-score strong {
  color: #fff;

  font-size: clamp(44px, 4.2vw, 54px);
  line-height: .92;

  letter-spacing: -.03em;
}

.mp-score span {
  margin-left: 4px;

  color: var(--mp-dim);

  font-size: 12px;
}


/* =========================================================
   BARS
   ========================================================= */

.mp-bars {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px 30px;

  width: 100%;

  margin: 0;
}

.mp-bar-row {
  min-width: 0;
}

.mp-bar-label {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  width: 100%;

  margin-bottom: 7px;

  font-size: 14px;
  line-height: 1.35;
}

.mp-bar-label span {
  min-width: 0;

  color: var(--mp-muted);
}

.mp-bar-label strong {
  flex: 0 0 auto;

  color: #fff;

  font-size: 14px;

  white-space: nowrap;
}

.mp-bar {
  width: 100%;
  height: 9px;

  overflow: hidden;

  border-radius: 999px;

  background: var(--mp-surface-2);
  border: .3px solid var(--mp-border);
}

.mp-bar i {
  display: block;

  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #3aa65f 0%,
      #65d589 100%
    );
}

@media (min-width: 901px) {
  .mp-bars .mp-bar-row:last-child:nth-child(odd) {
    grid-column: 1 / -1;

    width: calc(50% - 15px);
  }
}


/* =========================================================
   WHY
   ========================================================= */

.mp-why {
  width: 100%;

  margin-top: 24px;
  padding: 16px 19px;

  border: .3px solid var(--mp-border);
  border-left: 3px solid var(--mp-accent);

  border-radius: 0 10px 10px 0;

  background: var(--mp-surface-2);

  color: var(--mp-muted);

  font-size: 15px;
  line-height: 1.6;
}

.mp-why strong {
  color: var(--mp-accent-light);
}


/* =========================================================
   ANALYSIS BUTTON
   ========================================================= */

.mp-bdor-toggle {
  display: flex !important;

  align-items: center;
  justify-content: center;

  float: none !important;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  min-height: 47px;

  margin: 16px 0 0 !important;
  padding: 11px 16px !important;

  border: .3px solid var(--mp-border) !important;
  border-radius: 10px !important;

  background: var(--mp-surface-2) !important;

  color: var(--mp-accent-light) !important;

  box-shadow: none !important;

  font-size: 13px !important;
  line-height: 1.25 !important;

  text-align: center !important;

  white-space: normal !important;

  cursor: pointer;

  appearance: none;

  transition:
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.mp-bdor-toggle:hover,
.mp-bdor-toggle:focus {
  border-color: var(--mp-border) !important;

  background: var(--mp-surface-3) !important;

  color: #b4efc6 !important;

  outline: none;
}


/* =========================================================
   DETAILS
   ========================================================= */

.mp-bdor-more {
  width: 100%;

  padding-top: 16px;
}

.mp-detail-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 12px;

  width: 100%;
}

.mp-detail-grid > div {
  min-width: 0;

  padding: 15px 16px;

  border: .3px solid var(--mp-border);
  border-radius: 10px;

  background: var(--mp-surface-2);
}

.mp-detail-grid span {
  display: block;

  margin-bottom: 7px;

  color: var(--mp-dim);

  font-size: 10px;
  line-height: 1.3;

  text-transform: uppercase;
  letter-spacing: .05em;
}

.mp-detail-grid strong {
  display: block;

  color: #fff;

  font-size: 14px;
  line-height: 1.45;
}

.mp-detail-grid p {
  margin: 6px 0 0;

  color: var(--mp-muted);

  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   FULL ANALYSIS
   ========================================================= */

.mp-full-analysis {
  width: 100%;

  margin-top: 20px;
  padding-top: 20px;

  border-top: .3px solid var(--mp-border);

  color: var(--mp-muted);

  font-size: 16px;
  line-height: 1.75;
}

.mp-full-analysis p {
  margin: 0 0 1em;
}

.mp-full-analysis p:last-child {
  margin-bottom: 0;
}

.mp-full-analysis strong {
  color: #fff;
}

.mp-full-analysis a {
  color: var(--mp-accent-light);
}

.mp-full-analysis a:hover {
  color: #b6efc7;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  .mp-bars {
    grid-template-columns: 1fr;

    gap: 15px;
  }

  .mp-bars .mp-bar-row:last-child:nth-child(odd) {
    width: 100%;
  }

  .mp-detail-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
  .mp-bdor-ranking {
    width: 100% !important;
    max-width: 100% !important;

    overflow: hidden;
  }

  .mp-bdor-compact-head {
    grid-template-columns:
      44px
      minmax(0, 1fr)
      42px
      42px;

    gap: 10px;

    padding: 0 10px 7px;

    font-size: 9px;
  }

  .mp-bdor-compact-head span:nth-child(3) {
    font-size: 0;
  }

  .mp-bdor-compact-head span:nth-child(3)::after {
    content: "↕";

    font-size: 10px;
  }

  .mp-bdor-compact {
    border-radius: 10px;
  }

  .mp-bdor-compact a {
    grid-template-columns:
      44px
      minmax(0, 1fr)
      42px
      42px;

    gap: 10px;

    min-height: 54px;

    padding: 9px 10px;
  }

  .mp-bdor-compact .rank {
    font-size: 16px;
  }

  .mp-bdor-compact .name {
    font-size: 13px;
  }

  .mp-bdor-compact .trend {
    font-size: 9px;
  }

  .mp-bdor-compact strong {
    font-size: 16px;
  }

  .mp-bdor-card {
    padding: 16px;

    border-radius: 10px;
  }

  .mp-player-header {
    align-items: flex-start;

    gap: 12px;

    margin-bottom: 20px;
  }

  .mp-player-info h3 {
    gap: 6px;

    font-size: 18px;
    line-height: 1.2;
  }

  .mp-player-info p {
    font-size: 11px;
  }

  .mp-score strong {
    font-size: 30px;
  }

  .mp-score span {
    margin-left: 2px;

    font-size: 8px;
  }

  .mp-bars {
    grid-template-columns: 1fr;

    gap: 14px;
  }

  .mp-bar-label {
    font-size: 12px;
  }

  .mp-bar-label strong {
    font-size: 12px;
  }

  .mp-bar {
    height: 8px;
  }

  .mp-why {
    margin-top: 20px;

    padding: 14px 15px;

    font-size: 13px;
  }

  .mp-bdor-toggle {
    min-height: 44px;

    padding: 10px 12px !important;

    font-size: 12px !important;
  }

  .mp-detail-grid {
    grid-template-columns: 1fr;
  }

  .mp-detail-grid > div {
    padding: 14px;
  }

  .mp-full-analysis {
    font-size: 14px;
    line-height: 1.7;
  }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .mp-bdor-compact-head,
  .mp-bdor-compact a {
    grid-template-columns:
      40px
      minmax(0, 1fr)
      38px
      38px;

    gap: 8px;
  }

  .mp-bdor-compact-head {
    padding-left: 8px;
    padding-right: 8px;

    font-size: 8px;
  }

  .mp-bdor-compact a {
    padding-left: 8px;
    padding-right: 8px;
  }

  .mp-bdor-compact .rank {
    font-size: 14px;
  }

  .mp-bdor-compact .name {
    font-size: 12px;
  }

  .mp-bdor-compact .trend {
    font-size: 8px;
  }

  .mp-bdor-compact strong {
    font-size: 14px;
  }

  .mp-bdor-card {
    padding: 14px;
  }

  .mp-player-info h3 {
    gap: 5px;

    font-size: 17px;
    line-height: 1.2;
  }

  .mp-player-info p {
    font-size: 10px;
  }

  .mp-score strong {
    font-size: 27px;
  }

  .mp-score span {
    font-size: 7px;
  }
}
