/* currencylist.css */

.currency-list {
  width: 95%;
  margin: 30px auto;
  font-family: Inter, Roboto, Arial, sans-serif;
  position: relative;
  box-sizing: border-box;
}

.currency-list * {
  box-sizing: border-box;
}

/* Titel */
.currency-list__header {
  margin-bottom: 10px;
}

.currency-list__title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: #111;
  margin: 0;
}

/* Sticky meta-linje */
.currency-list__meta-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 0 12px;
  background: #ffffff;
}

/* meta-tekst (matcher converter-stil) */
.currency-list__meta {
  font-size: 12px;
  color: #6b7280;
  text-align: center;

  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(209, 213, 219, 0.85);
}

.currency-list__meta-l2 {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}


/* Liste container */
.currency-list__container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Række: ensartet layout */
.currency-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  text-decoration: none;
  color: #111;

  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(209, 213, 219, 0.85);

  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

/* Hover */
.currency-list__item:hover {
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

/* Fokus-state (tastatur) */
.currency-list__item:focus,
.currency-list__item:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Venstre side: flag + navn */
.currency-list__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.currency-list__flag {
  width: 24px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
  flex: 0 0 auto;
}

.currency-list__flag--empty {
  width: 24px;
  height: 16px;
  border: 1px dashed #d1d5db;
  border-radius: 2px;
  background: #f3f4f6;
  flex: 0 0 auto;
}

.currency-list__label {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.currency-list__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;     /* højrejustér begge linjer */
  justify-content: center;
  gap: 4px;                  /* luft mellem kurs og ændring */
  flex: 0 0 auto;
}

.currency-list__rate {
  font-size: 14px;
  color: #111;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* Loading / empty-state */
.currency-list__empty {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(209, 213, 219, 0.85);
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

/* 7d change line under rate */
.currency-list__change {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 0;            /* vigtig */
  font-size: 12px;          /* mere kompakt og stabilt */
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0.9;
}

.currency-list__change--up {
  color: #0a7a2f !important; /* grøn */
}

.currency-list__change--down {
  color: #b00020 !important; /* rød */
}

.currency-list__change--flat {
  color: rgba(0,0,0,0.6) !important; /* neutral */
}

.currency-list__arrow {
  font-size: 12px;
  line-height: 1;
  transform: translateY(-0.5px);
}


/* ===== Mobile stacked layout for currency list ===== */
@media (max-width: 520px) {

  .currency-list__item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  /* Venstre side: flag + navn → centreret */
  .currency-list__left {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .currency-list__label {
    font-size: 15px;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
  }

  /* Højre side: kurs + change → stacked & centered */
  .currency-list__right {
    align-items: center;
    gap: 4px;
  }

  .currency-list__rate {
    font-size: 14px;
    padding: 7px 12px;
  }

  .currency-list__change {
    justify-content: center;
    font-size: 12px;
  }

  .currency-list__arrow {
    transform: translateY(-0.5px);
  }
}
