/* ============================================
   CARS – Extends atradius-group.css
   Same design system, scroll-based layout
   ============================================ */

/* ----- Hero banner ----- */
.carsHero {
  position: relative;
  height: min(420px, 50vh);
  min-height: 280px;
  overflow: hidden;
  background: #000;
}

.carsHero__bg {
  position: absolute;
  inset: 0;
}

.carsHero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carsHero__filter {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
}

.carsHero__text {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 44px));
  margin: 0 auto;
  padding: calc(var(--headerH) + 60px) 0 60px 0;
  color: #fff;
}

.carsHero__subtitle {
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-size: 14px;
  opacity: .92;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, .92);
}

.carsHero__title {
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

@media (max-width: 860px) {
  .carsHero__title { font-size: 32px; }
  .carsHero { height: min(320px, 45vh); min-height: 220px; }
}

/* ----- Warning banner (calendar) ----- */
.carsWarning {
  background: rgba(220, 0, 40, .06);
  border-left: 4px solid var(--red);
  padding: 14px 20px;
  margin: 0 0 24px 0;
  color: var(--red);
  max-width: none;
}

/* ----- Prose max-width ----- */
.section .prose {
  max-width: 860px;
}

/* ----- Rules list ----- */
.rulesList {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
}

.rulesList li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.rulesList li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 8px;
  height: 8px;
  background: var(--red);
}

.rulesList li:last-child {
  border-bottom: 0;
}

/* ----- Rules Legend ----- */
.rulesLegend {
  background: var(--alt);
  padding: 28px 32px;
  margin: 28px 0;
  border-left: 4px solid var(--red);
}

.rulesLegend__title {
  margin: 0 0 16px 0;
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--ink);
}

.rulesLegend__dl { margin: 0; }

.rulesLegend__dl dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 16px;
  font-size: 15px;
}

.rulesLegend__dl dt:first-child { margin-top: 0; }

.rulesLegend__dl dd {
  margin: 4px 0 0 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ----- Acceptance notice ----- */
.rulesAcceptance {
  text-align: center;
  padding: 24px 0;
  color: var(--ink);
  font-size: 15px;
}

/* ----- FAQ list ----- */
.faqList { margin: 0; }

.faqList dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.faqList dt:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.faqList dd {
  margin: 6px 0 0 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ----- Map ----- */
.contactCard__details--map {
  grid-template-columns: 1fr 1.6fr;
}

.carsMap {
  border-radius: 8px;
  overflow: hidden;
}

.carsMap__iframe {
  display: block;
  width: 100%;
  min-height: 380px;
}

@media (max-width: 720px) {
  .contactCard__details--map { grid-template-columns: 1fr; }
  .carsMap__iframe { min-height: 280px; }
}

/* ----- Loaded content ----- */
.carsLoad__placeholder {
  color: var(--muted2);
  font-style: italic;
}

.carsLoad table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
}

.carsLoad td,
.carsLoad th {
  padding: 10px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.carsLoad th {
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.carsLoad tr:hover td {
  background: rgba(17, 24, 39, .02);
}

.carsLoad img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   XLSX TABLE VIEWER
   ============================================ */

.xlsSection {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.xlsSection__title {
  margin: 0 0 18px 0;
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
}

/* ----- Toolbar ----- */
.xlsToolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.xlsToolbar__search {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
}

.xlsToolbar__searchIcon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted2);
  pointer-events: none;
}

.xlsToolbar__input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .18s ease;
}

.xlsToolbar__input:focus {
  border-color: var(--red);
}

.xlsToolbar__input::placeholder {
  color: var(--muted2);
}

.xlsToolbar__count {
  font-size: 13px;
  color: var(--muted2);
  white-space: nowrap;
}

/* Small pill button variant */
.pillBtn--sm {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
}

.pillBtn--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pillBtn__dlIcon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* ----- Table wrapper (horizontal scroll on mobile) ----- */
.xlsTableWrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* ----- The generated table ----- */
.xlsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}

.xlsTable thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.xlsTable th {
  background: var(--ink);
  color: #fff;
  font-family: CO-Regular, COS-Regular, Arial, sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.xlsTable th:hover {
  background: #1f2937;
}

/* Sort indicators */
.xlsTable th::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,.3);
  transition: transform .15s ease;
}

.xlsTable th.sort-asc::after {
  border-top: 5px solid #fff;
  transform: rotate(180deg);
}

.xlsTable th.sort-desc::after {
  border-top: 5px solid #fff;
  transform: rotate(0deg);
}

.xlsTable td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}

.xlsTable tbody tr:hover td {
  background: rgba(220, 0, 40, .03);
}

.xlsTable tbody tr:last-child td {
  border-bottom: none;
}

/* Alternating row colors */
.xlsTable tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, .015);
}

.xlsTable tbody tr:nth-child(even):hover td {
  background: rgba(220, 0, 40, .03);
}

/* Category badge (FNA, FA21%, LB21%, LL0%) */
.xlsBadge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  border-radius: 4px;
  white-space: nowrap;
}

.xlsBadge--fna    { background: #e0f2fe; color: #0369a1; }
.xlsBadge--fa21   { background: #dcfce7; color: #166534; }
.xlsBadge--lb21   { background: #fef3c7; color: #92400e; }
.xlsBadge--ll0    { background: #f3e8ff; color: #6b21a8; }
.xlsBadge--other  { background: var(--alt); color: var(--muted); }

/* No results */
.xlsNoResults {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted2);
  font-style: italic;
}

/* Loading spinner */
.xlsLoading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--muted2);
}

.xlsSpinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: xlsSpin .7s linear infinite;
}

@keyframes xlsSpin {
  to { transform: rotate(360deg); }
}

/* Error state */
.xlsError {
  padding: 30px 20px;
  text-align: center;
  color: var(--red);
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .xlsToolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .xlsToolbar__search {
    max-width: none;
  }
  .xlsToolbar__count {
    text-align: center;
  }
  .xlsTable th,
  .xlsTable td {
    padding: 8px 10px;
    font-size: 12px;
  }
}