/* Page head / title */

.yi-page-head {
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--yi-line);
}

.yi-page-head-inner {
  max-width: var(--yi-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.yi-page-eyebrow {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--yi-text-soft);
}

.yi-page-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}

.yi-page-sub {
  font-size: 1.15rem;
  color: var(--yi-text-soft);
  margin: 0;
}

/* Brief explanation box above table */

.yi-brief {
  padding-top: 1.2rem;
  padding-bottom: 0.6rem;
}

.yi-brief-inner {
  max-width: var(--yi-width);
  margin: 0 auto;
  border-radius: var(--yi-radius);
  background: #020617;
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.yi-brief-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 40rem;
}

.yi-brief-text {
  font-size: 1.1rem;
  color: var(--yi-text-soft);
}

.yi-brief-meta {
  font-size: 1.05rem;
  color: var(--yi-text-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* green status dot + LAST UPDATE label */
.yi-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: #22c55e;
  display: inline-block;
}

.yi-brief-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  color: var(--yi-text-soft);
}

.yi-brief-date {
  font-weight: 500;
}

/* small buttons on right side */

.yi-brief-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* stacked actions: keep buttons same size */
.yi-brief-actions .yi-brief-btn {
  width: 16rem;
  justify-content: center;
}

/* last update button: green dot + text */
.yi-brief-actions .yi-brief-lastupdate {
  gap: 0.5rem;
}


.yi-brief-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--yi-border-soft);
  font-size: 1rem;
  font-weight: 500;
  background-color: var(--yi-accent);
  color: #0b1120;
  text-decoration: none;
  white-space: nowrap;
}

.yi-brief-btn:hover {
  text-decoration: none;
  background-color: #ea580c;
}

.yi-brief-btn-ghost {
  background-color: transparent;
  color: var(--yi-text-soft);
  border-color: var(--yi-border-soft);
}

.yi-brief-btn-ghost:hover {
  color: var(--yi-text-main);
  border-color: var(--yi-border-strong);
  background-color: rgba(15, 23, 42, 0.8);
}

.yi-brief-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yi-brief-btn-icon img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Table section */

.yi-table-section {
  padding-top: 0.8rem;
}

.yi-table-header {
  max-width: var(--yi-width);
  margin: 0 auto 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.yi-table-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.yi-table-sub {
  font-size: 1.05rem;
  color: var(--yi-text-soft);
  margin: 0;
}

.yi-table-toolbar {
  max-width: var(--yi-width);
  margin: 0 auto 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.yi-table-note {
  font-size: 0.95rem;
  color: var(--yi-text-soft);
}

/* Scroll wrapper + table */

.yi-table-scroll {
  max-width: var(--yi-width);
  margin: 0 auto;
  overflow-x: auto;
  border-radius: var(--yi-radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background: #020617;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.yi-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.yi-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: radial-gradient(circle at top left,
              rgba(249, 115, 22, 0.16) 0,
              transparent 50%),
              #020617;
}

/* headers centered */
.yi-table thead th {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--yi-line);
  color: var(--yi-text-soft);
  text-align: center;
  white-space: nowrap;
}

/* rank column header: small width, no label */
.yi-table thead th.col-rank {
  width: 3ch;
}

.yi-table thead th[data-sort-key] {
  cursor: pointer;
}

.yi-table thead th[data-sort-key].is-sorted {
  color: var(--yi-accent);
}

/* Body */

.yi-table tbody tr {
  transition: background-color 0.12s ease;
}

.yi-table tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.6);
}

/* data centered by default */
.yi-table tbody td {
  font-size: 1.05rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
  text-align: center;
}

/* rank cell: small, subtle */
.yi-table tbody td.col-rank {
  width: 3ch;
  font-size: 0.98rem;
  color: var(--yi-text-soft);
}

/* country name left-aligned with flag */
.yi-table tbody td.col-country {
  text-align: left;
  white-space: nowrap;
}

.yi-country-name {
  margin-left: 0.4rem;
}

/* numeric cells */
.yi-table tbody td.col-num {
  font-variant-numeric: tabular-nums;
}

.yi-table-loading,
.yi-table-error {
  text-align: center;
  font-size: 1.05rem;
  color: var(--yi-text-soft);
}

/* Selected row highlight */

.yi-row-selected {
  background: rgba(249, 115, 22, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.5);
}

/* Flag icon before country name */

.yi-flag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.yi-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.8);
}

/* Responsive */

@media (max-width: 720px) {
  .yi-brief-inner {
    align-items: flex-start;
  }
  .yi-brief-meta {
    white-space: normal;
  }
}
/* Honorary marker next to country name */
.yi-honorary-flag {
  color: var(--yi-accent);
  font-size: 0.85em;
  margin-left: 0.16rem;
}

/* Optional: make the Honorary header slightly distinct */
.yi-table thead th.col-honorary {
  color: var(--yi-text-soft);
}


.yi-honorary-flag {
  color: var(--yi-accent);
  font-size: 0.85em;
  margin-left: 0.12em;
  vertical-align: super;
}

/* --- Nav dropdown fix: remove hover "gap" + allow click/focus to hold open --- */
#mainav li ul{
  margin: 0; /* overrides any submenu margin that creates a hover gap */
}

#mainav li:hover > ul,
#mainav li:focus-within > ul{
  display: block;
}
