/* عناصر الحاوية الرئيسية */
.apl-match-events {
}

.apl-match-events .event {
  display: flex;
  position: relative;
  padding: 1rem 0;
  align-items: center;
  gap: 0.5rem;
}

/* الأعمدة */
.apl-match-events .event .column-1,
.apl-match-events .event .column-3 {
  flex: 1 1 0%;
}

.apl-match-events .event .column-3 {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* العمود 1 */
.apl-match-events .event.home .column-1 {
  order: 2;
}
.apl-match-events .event.away .column-1 {
  order: 0;
}

/* العمود 3 */
.apl-match-events .event.home .column-3 {
  order: 0;
  flex-direction: row-reverse;
}
.apl-match-events .event.away .column-3 {
  order: 2;
}

/* العمود 2 */
.apl-match-events .event .column-2 {
  display: flex;
  position: relative;
  z-index: 10;
  padding: 0.25rem;
  order: 1;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50px;
  width: 30px;
  height: 30px;
}

/* الأيقونات */
.apl-match-events .event .icon img {
  width: 1rem;
  height: 1rem;
}

/* تبديلات اللاعبين */
.ev-col .subs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ev-col .subs .player_on_name,
.ev-col .subs .player_off_name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.home .ev-col .subs .player_on_name,
.home .ev-col .subs .player_off_name {
  flex-direction: row-reverse;
}

/* aplive_lineup */
.aplive-lineup {
  display: flex;
  gap: 1rem;
}
.aplive-lineup .apl-lineup-title {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  border-radius: var(--apl-radius);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.aplive-lineup .apl-lineup-title img {
  width: 30px;
  height: 30px;
}
.aplive-lineup .apl-lineup {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.aplive-lineup .apl-players {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.aplive-lineup .apl-players .apl-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.aplive-lineup .apl-players .apl-player.hovered {
  color: var(--apl-primary);
}
.aplive-lineup .apl-players .apl-player .apl-number {
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--apl-radius);
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
}
.aplive-lineup .apl-players .apl-player .apl-name {
  font-size: 0.85rem;
  font-weight: 400;
}
.aplive-lineup .apl-players .apl-player .apl-pos {
  font-size: 0.75rem;
  font-weight: 100;
}
.apl-lineup-home {
  order: 1;
}
.apl-lineup-away {
  order: 3;
}
.apl-lineup-home.apl-lineup .apl-lineup-title {
  flex-direction: row-reverse;
}
.apl-lineup-home.apl-lineup {
  text-align: end;
}
.apl-lineup-home.apl-lineup .apl-players .apl-player {
  flex-direction: row-reverse;
}
/* aplive-stats */
.aplive-stats .aplive-head-stats {
  text-align: center;
  padding: 0.5rem;
}
.aplive-stats .stat-ev {
  display: flex;
  text-align: center !important;
}
.aplive-stats .stat-ev > div {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}
.aplive-stats .apl-percentage {
  color: #fff;
  border-radius: 50px;
  margin-bottom: 1rem;
  overflow: hidden;
  display: flex;
  gap: 5px;
}
.aplive-stats .apl-percentage > div {
  padding: 0.5rem;
  text-align: center;
}
.aplive-stats .apl-percentage > div:nth-child(1) {
  background: #398aeb;
}
.aplive-stats .apl-percentage > div:nth-child(2) {
  background: #c3001c;
}

/* aplive-match-details */
#aplive-match-details {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
#aplive-match-details .nav-el {
  cursor: pointer;
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--apl-radius);
  background: rgba(0, 0, 0, 0.05);
}
#aplive-match-details .nav-el:hover,
#aplive-match-details .nav-el.active {
  background: var(--apl-primary);
  color: #fff;
}
#aplive-match-details-body {
  margin-bottom: 1rem;
}

/* soccer field*/
.apl-soccer-field {
  position: relative;
  flex: 2;
  width: 100%;
  max-width: 400px;
  height: 600px;
  background-color: #32a852;
  margin: 0 auto;
  border: 2px solid #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 1rem;
  order: 2;
  position: relative;
}
.apl-soccer-field:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00935c url("../img/field.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
}

.apl-soccer-field .apl-soccer-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1.5rem 0;
}

.apl-soccer-field .apl-soccer-lineup {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin: auto;
  height: 100%;
}

.apl-soccer-field .apl-player-position {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  font-size: 14px;
}

.apl-soccer-field .apl-player {
  cursor: pointer;
  max-width: 45px;
}

.apl-soccer-field .apl-number {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.apl-soccer-field .apl-number svg {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  z-index: 0;
  color: #222;
}
.apl-soccer-field .apl-player.hovered .apl-number svg {
  color: var(--apl-primary) !important;
}
.apl-soccer-field .apl-number span {
  position: absolute;
  top: 50%;
  right: 50%;
  width: 40px;
  height: 40px;
  z-index: 1;
  transform: translate(50%, -30%);
  font-size: 0.8rem;
}

.apl-soccer-field .apl-name {
  font-size: 8px;
  margin: auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.apl-soccer-field .apl-soccer-label {
  text-align: center;
  font-size: 0.7rem;
  background: #fff;
  color: #00935c;
  padding: 2px 10px;
  border-radius: 40px;
  margin-bottom: 10px;
  position: absolute;
  top: 0;
  inset-inline-start: 0.5rem;
}

.apl-soccer-field .apl-soccer-lineup:nth-child(2) {
  transform: rotate(180deg);
}
.apl-soccer-field .apl-soccer-lineup:nth-child(2) .apl-soccer-label {
  transform: rotate(180deg);
}
.apl-soccer-field .apl-soccer-lineup:nth-child(2) .apl-player-position {
  transform: translate(-50%, -50%) rotate(180deg);
}
.apl-soccer-field .apl-soccer-lineup:nth-child(2) .apl-number svg {
  color: #353535;
}
@media (max-width: 768px) {
  .aplive-lineup {
    flex-wrap: wrap;
  }
  .apl-soccer-field {
    width: 100%;
    order: 1;
    flex: auto;
  }
}
