/* آخر 5 مباريات — بطاقة شكل الفريق (form strip) */

.team-last-five-block .team-form-hint {
  margin: -6px 0 12px;
  font-size: 10px;
  font-weight: normal;
  color: #707488;
  line-height: 1.4;
}

.team-form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-form-card {
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: #151825;
  border: 1px solid #191d2d;
}

.team-form-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #191d2d;
}

.team-form-card__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.team-form-card__identity:hover .team-form-card__name {
  color: #39dbbf;
}

.team-form-card__logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-form-card__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.team-form-card__name {
  font-size: 13px;
  font-weight: bold;
  color: #bfc3d4;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.team-form-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.team-form-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: normal;
  color: #707488;
  line-height: 1;
}

.team-form-summary__item b {
  font-size: 13px;
  font-weight: 900;
}

.team-form-summary__item--win b {
  color: #5bd286;
}

.team-form-summary__item--draw b {
  color: #9aa0b5;
}

.team-form-summary__item--lose b {
  color: #fc4d4d;
}

.team-form-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  padding: 4px 2px 0;
  list-style: none;
  margin: 0;
}

.team-form-strip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 2px;
  margin-top: -1px;
  background: #252a3d;
  border-radius: 2px;
  z-index: 0;
}

.team-form-pill {
  position: relative;
  z-index: 1;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  color: #fff !important;
  border: 2px solid #151825;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-form-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  color: #fff !important;
}

.team-form-pill--win {
  background: #5bd286;
}

.team-form-pill--equal {
  background: #707488;
}

.team-form-pill--lose {
  background: #fc4d4d;
}

.team-form-pill__letter {
  line-height: 1;
}

/* الأحدث يميناً في RTL، يميناً في LTR */
[dir="rtl"] .team-form-strip {
  flex-direction: row;
}

[dir="ltr"] .team-form-strip {
  flex-direction: row-reverse;
}

[dir="ltr"] .team-form-card__identity {
  flex-direction: row;
}

[dir="ltr"] .team-form-card__logo {
  margin-left: 0;
  margin-right: 0;
}

html.light:not(.dark) .team-last-five-block .team-form-hint {
  color: #707488;
}

html.light:not(.dark) .team-form-card {
  background: #ffffff;
  border-color: #f1f1f1;
}

html.light:not(.dark) .team-form-card__head {
  border-bottom-color: #f1f1f1;
}

html.light:not(.dark) .team-form-card__name {
  color: #0e1019;
}

html.light:not(.dark) .team-form-card__identity:hover .team-form-card__name {
  color: #16ae94;
}

html.light:not(.dark) .team-form-summary__item {
  color: #707488;
}

html.light:not(.dark) .team-form-summary__item--win b {
  color: #2a9d5c;
}

html.light:not(.dark) .team-form-summary__item--draw b {
  color: #6b7289;
}

html.light:not(.dark) .team-form-summary__item--lose b {
  color: #d63b3b;
}

html.light:not(.dark) .team-form-strip::before {
  background: #e3e5f0;
}

html.light:not(.dark) .team-form-pill {
  border-color: #ffffff;
  box-shadow: 0 1px 4px rgba(14, 16, 25, 0.12);
}

html.light:not(.dark) .team-form-pill--win {
  background: #2a9d5c;
}

html.light:not(.dark) .team-form-pill--equal {
  background: #8b92a8;
}

html.light:not(.dark) .team-form-pill--lose {
  background: #d63b3b;
}

@media (max-width: 575px) {
  .team-form-card {
    padding: 12px 14px 14px;
  }

  .team-form-pill {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 11px;
    border-radius: 8px;
  }

  .team-form-strip {
    gap: 4px;
  }

  .team-form-strip::before {
    left: 10px;
    right: 10px;
  }

  .team-form-card__logo {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }

  .team-form-card__name {
    font-size: 12px;
  }
}
