/* =========================================
   Custom CSS for EU Factsheet
   ========================================= */
:root {
  --font-title: "Source Sans 3", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --text-color: #000000;
}

body,
p,
li,
.leading-\[2\],
.md\:leading-\[2\],
.leading-\[1\.9\] {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--text-color) !important;
  -webkit-font-smoothing: auto !important;
}

p,
ul,
h1,
h2,
h3,
.max-w-3xl,
.max-w-4xl,
.max-w-5xl {
  max-width: 100% !important;
}

ul {
  padding-left: 1.25rem !important;
}

li {
  margin-bottom: 0.25rem !important;
}

p {
  margin-bottom: 0.35rem !important;
}

b,
strong {
  font-weight: 800 !important;
  color: #000000 !important;
}

.factsheet-notes li {
  color: #666 !important;
}

.factsheet-notes a {
  text-decoration: underline !important;
  text-decoration-color: #ffc107 !important;
  color: inherit !important;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.factsheet-notes a:hover {
  background-color: #ffc107 !important;
  color: #000000 !important;
  text-decoration: none !important;
}

.factsheet-notes {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #666;
  font-family: inherit;
}
.factsheet-notes .notes-divider {
  border: none;
  height: 2px;
  background-color: #f2c94c;
  margin: 0 0 0.75rem 0;
}
.factsheet-notes .notes-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
  margin: 0 0 0.75rem 0;
}
.factsheet-notes .notes-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}
.factsheet-notes .notes-list li {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.factsheet-notes .notes-list li::marker {
  color: #999;
  font-size: 0.8rem;
}
.factsheet-notes .notes-list a {
  color: #777;
  text-decoration: none;
  word-break: break-word;
}
.factsheet-notes .notes-list a:hover {
  text-decoration: underline;
}

/* Standardize vertical spacing */
.md\:mt-11 {
  margin-top: 1.5rem !important;
}

.my-14 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.my-8 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.my-12 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.space-y-12 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1.25rem !important;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem !important;
}

/* Custom classes for AGMS Factsheet */
.bg-yellow-agms {
  background-color: #f5b700 !important;
}
.border-yellow-agms {
  border-color: #f5b700 !important;
}
.text-black-agms {
  color: #000000 !important;
}

/* Outstanding Risk Table Styles */
.risk-table-container {
  border: 1px solid #f5b700;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: white;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.risk-table-header {
  background-color: #f5b700;
  border-bottom: 1px solid #f5b700;
  display: grid;
  grid-template-columns: 1fr;
}

.risk-table-header-cell {
  padding: 0.75rem 1rem;
  font-weight: 800;
  color: #000000;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.risk-table-content {
  display: grid;
  grid-template-columns: 1fr;
}

.risk-column {
  padding: 1rem;
  background-color: #fff;
}

.risk-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #374151;
}

.risk-item:first-child {
  padding-top: 0;
}

.risk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.risk-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #111827;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .risk-table-header {
    grid-template-columns: 1fr 1fr;
  }
  .risk-table-content {
    grid-template-columns: 1fr 1fr;
  }
  .risk-table-header-cell:first-child {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }
  .risk-column:first-child {
    border-right: 1px solid #f5b700;
  }
}

/* Factsheet Ordered List */
.factsheet-list {
  list-style: none;
  padding: 0;
  counter-reset: factsheet-counter;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.factsheet-list > li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem !important;
  line-height: 1.5;
}

.factsheet-list > li::before {
  counter-increment: factsheet-counter;
  content: counter(factsheet-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background-color: #f5b700;
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
