/*
 * Hand-written styling for WizLabo Library (WLL) generated list markup,
 * sized to match this site's own typography/spacing scale (not the legacy
 * WordPress theme's px values) — see docs/specs/ir-nextjs-migration-plan.md.
 *
 * WLL writes its own <li>/<a>/<div>/<span> children into the containers
 * below at runtime; we do not control that markup, only these class rules.
 * The classnames themselves (.xj-newslist, .post_title, .link_icon, etc.)
 * are the vendor's DOM contract and must not be renamed — see WllBase.js /
 * WllNews.js / WllResults.js / etc. templates in this directory.
 *
 * Everything here is scoped under .wll-scope, a wrapper class this repo
 * controls (not vendor-generated), so it can never leak outside pages that
 * opt in.
 */

.wll-scope .xj-list-title {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #383838;
}

.wll-scope .xj-sel-year.sl_box {
  margin-top: 12px;
  margin-bottom: 24px;
  display: inline-block;
}

.wll-scope .xj-sel-year.sl_box select,
.wll-scope .xj-sel-year.sl_box .selModalButton {
  min-width: 140px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 8px 36px 8px 14px;
  font-size: 14px;
  color: #383838;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%23383838" stroke-width="1.5"/></svg>')
    right 14px center / 10px 6px no-repeat;
  appearance: none;
  cursor: pointer;
}

/* .selModalButton is the swapped-in trigger Jquery.selmodal.js inserts
   right after the (then hidden) <select> on mobile iOS Safari only — see
   WllBase.js's setSelBox() gate and selmodal.css for the modal it opens. A
   plain <button> needs its own text-align/font reset to actually match the
   <select> it stands in for. */
.wll-scope .xj-sel-year.sl_box .selModalButton {
  display: block;
  width: 100%;
  overflow: hidden;
  font-family: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category tabs (only #xj-news pages: /ir, /ir/news) */
.wll-scope .xj-sel-category.tabArea,
.wll-scope .xj-sel-category .tabArea {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.wll-scope .xj-sel-category li,
.wll-scope .tabArea li {
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  color: #383838;
  background: #f7f7f7;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wll-scope .xj-sel-category li.active,
.wll-scope .tabArea li.active {
  background: #005ea5;
  color: #fff;
}

.wll-scope ul.xj-newslist,
.wll-scope ul.xj-download {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #eeeff0;
}

.wll-scope ul.xj-newslist li,
.wll-scope ul.xj-download li {
  border-bottom: 1px solid #eeeff0;
}

.wll-scope ul.xj-newslist li a,
.wll-scope ul.xj-download li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.wll-scope ul.xj-newslist li a:hover,
.wll-scope ul.xj-download li a:hover {
  opacity: 0.7;
}

.wll-scope .post_info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.wll-scope .date {
  flex-shrink: 0;
  min-width: 5.5em;
  font-size: 13px;
  color: #919191;
}

.wll-scope .post_category {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #005ea5;
}

.wll-scope .post_title {
  min-width: 0;
  font-size: 15px;
  line-height: 24px;
  color: #383838;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wll-scope .link_icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #919191;
}

@media (max-width: 640px) {
  .wll-scope ul.xj-newslist li a,
  .wll-scope ul.xj-download li a {
    flex-wrap: wrap;
  }

  .wll-scope .post_title {
    white-space: normal;
  }
}
