.team-wrapper {
  width: 100%;
}

/* Top Header */
.team-header {
  background: #e7d9dd;
  padding: 18px 220px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flag img {
  width: 50px;
  height: auto;
}

.country-drop-select {
  background: #fff;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #555;
}

.country-drop-select span {
  align-items: center;
  justify-content: center;
  display: flex;
}

/* Table Area */
.squad-table {
  padding: 24px 220px;
}

.table-head {
  display: grid;
  grid-template-columns: 11fr 1fr 1fr 1fr 1fr 1fr 1fr;
  /* grid-template-columns: 1fr 70px 70px 60px 60px 60px 60px; */
  align-items: center;
  color: rgba(0, 0, 0, 0.87);
  font-size: 14px;
  padding: 8px;
}

.section-title {
  background: #f2e8eb;
  border-left: 3px solid #c52945;
  color: #a6243d;
  padding: 4px 16px;
  padding: 4px 16px;
  font-size: 14px;
}

.player-row {
  display: grid;
  grid-template-columns: 11fr 1fr 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 14px 10px;
  border-bottom: 1px solid #ececec;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.img-wrapper {
  width: 42px;
  height: 42px;
  position: relative;
}

.jersey {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: solid 1px #74acdf;
  background-color: #f5eaee;
}

.jersey .jersey-no {
  font-size: 10px;
  color: #000;
}

.player-info img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.player-info h4 {
  font-size: 16px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.87);
}

.player-info span {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.68);
}

.stat {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 14px;
}

.assist-icon {
  height: 14px;
  width: 14px;
}

/* Cards */
.yellow-card,
.red-card {
  width: 9px;
  height: 14px;
  flex-grow: 0;
  border-radius: 2px;
}

.yellow-card {
  border: solid 1px #f00;
  background-color: #f2c14b;
}

.red-card {
  border: solid 1px #f00;
  background-color: #ff6f6f;
}

@media (max-width: 1180px) {
  .team-header {
    padding: 16px;
  }

  .squad-table {
    padding: 16px;
  }

  .table-head {
    display: grid;
    grid-template-columns: 6fr 1fr 1fr 1fr 1fr 1fr 1fr;
    align-items: center;
    color: rgba(0, 0, 0, 0.87);
    font-size: 14px;
    padding-bottom: 8px;
  }

  .section-title {
    background: #f2e8eb;
    border-left: 3px solid #c52945;
    color: #a6243d;
    padding: 4px 16px;
    padding-bottom: 8px;
    font-size: 14px;
  }

  .player-row {
    display: grid;
    grid-template-columns: 6fr 1fr 1fr 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 14px 10px;
    border-bottom: 1px solid #ececec;
  }
}

/* ── Flag image in header ─────────────────────────────────────────────────── */
.flag-md img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
}

/* ── Team-stat selector widget ────────────────────────────────────────────── */
.team-stat-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Prev / Next arrow buttons */
.country-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}

.country-nav-btn:hover:not(:disabled) {
  background: rgba(197, 41, 69, 0.08);
}

.country-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.country-nav-btn img {
  width: 20px;
  height: 20px;
}

/* Trigger button */
.country-drop-select {
  background: #fff;
  border: none;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  min-width: 140px;
}

.country-drop-select:hover,
.country-drop-select[aria-expanded="true"] {
  background: #f2e8eb;
  color: #a6243d;
}

.drop-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.country-drop-select[aria-expanded="true"] .drop-arrow {
  transform: rotate(180deg);
}

.drop-arrow img {
  width: 18px;
  height: 18px;
}

/* Dropdown panel */
.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(320px, calc(100vw - 32px));
  max-height: 340px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: #e0b0ba transparent;
}

.country-dropdown[hidden] {
  display: none;
}

/* Group heading inside dropdown */
.team-dropdown-group + .team-dropdown-group {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 4px;
  padding-top: 4px;
}

.team-dropdown-group-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9c27b0;
}

/* Individual country options */
.team-dropdown-option {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  color: rgba(0, 0, 0, 0.87);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}

.team-dropdown-option:hover,
.team-dropdown-option:focus-visible {
  background: rgba(197, 41, 69, 0.06);
  outline: none;
}

.team-dropdown-option.active,
.team-dropdown-option[aria-selected="true"] {
  color: #a6243d;
  background: rgba(197, 41, 69, 0.1);
}

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .country-drop-select {
    font-size: 14px;
    padding: 6px 10px;
    min-width: 110px;
  }

  .country-dropdown {
    width: calc(100vw - 24px);
  }
}
