/* Koora Standings Widget — koora-sw.css v1.1 */

/* ─── Loading ─── */
.ksw-loading {
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 15px;
}
.ksw-pulse {
  display: inline-block;
  width: 10px; height: 10px;
  background: #e8c031;
  border-radius: 50%;
  animation: ksw-pulse 1s infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes ksw-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(1.4); }
}
.ksw-empty { text-align:center; padding:20px; color:#aaa; font-size:15px; }

/* ─── Tabs ─── */
#ksw-schedule-root { margin-bottom: 20px; }
.ksw-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ksw-tab {
  padding: 8px 20px;
  border: 2px solid #e8c031;
  background: transparent;
  color: #e8c031;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.ksw-tab:hover,
.ksw-tab.active {
  background: #e8c031;
  color: #111;
}

/* ─── Match Row ─── */
.ksw-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.08);
  transition: background .2s;
}
.ksw-match-row:hover { background: rgba(255,255,255,.08); }
.ksw-match-row.live  { border-color: rgba(255,60,60,.4); background: rgba(255,60,60,.06); }
.ksw-match-row.final { opacity: .75; }

.ksw-team {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.ksw-team img { width: 32px; height: 32px; object-fit: contain; }
.ksw-team.away { flex-direction: row-reverse; text-align: right; }
.ksw-team.home { text-align: left; }

.ksw-mid {
  text-align: center;
  min-width: 120px;
  flex-shrink: 0;
}
.ksw-live  { color: #ff4444; font-weight: 700; font-size: 13px; }
.ksw-final { color: #aaa; font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.ksw-time  { color: #e8c031; font-size: 13px; font-weight: 600; }

.ksw-score {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 4px 0;
}
.ksw-vs {
  font-size: 16px;
  font-weight: 700;
  color: #555;
  margin: 4px 0;
}
.ksw-date { font-size: 11px; color: #777; margin-top: 3px; }

/* ─── Standings ─── */
.ksw-standings-header {
  margin-bottom: 20px;
}
.ksw-standings-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ksw-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.ksw-group-block {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
}

.ksw-group-title {
  background: #e8c031;
  color: #111;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ksw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ksw-table thead tr {
  background: rgba(255,255,255,.06);
}
.ksw-table th {
  padding: 8px 10px;
  text-align: center;
  color: #aaa;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
}
.ksw-table th:first-child { text-align: left; }
.ksw-table td {
  padding: 9px 10px;
  text-align: center;
  color: #ddd;
  border-top: 1px solid rgba(255,255,255,.05);
}
.ksw-table td:first-child { text-align: left; }
.ksw-table tr.qualify td { background: rgba(46,213,115,.06); }
.ksw-table tr:hover td  { background: rgba(255,255,255,.04); }

.ksw-team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ksw-team-cell img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.ksw-team-cell span { font-weight: 600; font-size: 13px; }

.ksw-pts {
  font-weight: 800;
  color: #e8c031 !important;
  font-size: 14px;
}

.ksw-qualify-note {
  padding: 8px 16px;
  font-size: 11px;
  color: #2ed573;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .ksw-groups-grid { grid-template-columns: 1fr; }
  .ksw-team span { font-size: 12px; }
  .ksw-score { font-size: 18px; }
  .ksw-mid { min-width: 90px; }
  .ksw-table { font-size: 12px; }
}

/* ─── News ─── */
#ksw-news-root { margin-bottom: 32px; }

.ksw-news-header {
  margin-bottom: 16px;
}
.ksw-news-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ksw-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.ksw-news-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background .2s, transform .2s;
}
.ksw-news-card:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.ksw-news-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
}
.ksw-news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ksw-news-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.ksw-news-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ksw-news-badge {
  display: inline-block;
  background: #e8c031;
  color: #111;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 6px;
  vertical-align: middle;
}

.ksw-news-headline {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.ksw-news-desc {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ksw-news-meta {
  font-size: 11px;
  color: #e8c031;
  margin-top: auto;
  padding-top: 6px;
}

@media (max-width: 600px) {
  .ksw-news-grid { grid-template-columns: 1fr; }
  .ksw-news-img  { height: 130px; }
}
