/* currencyconverter.css */

.currencyconverter {
  width: 95%;
  padding: 24px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin: 30px auto;
  font-family: Inter, Roboto, Arial, sans-serif;
  position: relative;
  box-sizing: border-box;
}

.update-info {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 8px;
}

.update-info__checked {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.converter-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #111;
}

.input-label {
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
  color: #333;
}

.input-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.input-container input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.input-container input:focus {
  border-color: #4f46e5;
}

.input-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.flag-img {
  width: 24px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
  cursor: pointer;
}

.dropdown-div {
  flex: 1;
  background: #fdfdfd;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: #111;
  height: 30px;
  position: relative;
}

.dropdown-div::after {
  content: "▾";
  font-size: 16px;
  color: #4b5563;
}

.dropdown-div:hover {
  background: #f3f4f6;
}

/* Swap button (icon) */
.swap-container {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.swap-btn:hover {
  background: rgba(0,0,0,0.06);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.16);
}

.swap-btn:active {
  transform: translateY(1px);
}

.swap-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.swap-svg {
  width: 22px;
  height: 22px;
  fill: rgba(0,0,0,0.78);
  transition: transform 0.35s ease;
}

/* lille “flip” på hover for at signalere swap */
.swap-btn:hover .swap-svg {
  transform: rotate(180deg);
}

/* Resultat – flerliniers layout */
#result {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin: 16px 0 6px;
  padding: 12px;
  border-radius: 8px;
  background-color: #f3f4f6;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.converter-result__from,
.converter-result__to {
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.converter-result__equals {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

#infoBox {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 16px;
}

.copy-button,
.clear-button {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.copy-button {
  background-color: #0b119c;
  color: white;
}

.copy-button:hover {
  background-color: black;
}

.clear-button {
  background-color: #ffa500;
  color: white;
}

.clear-button:hover {
  background-color: #b27300;
}

.copy-success {
  background: #10b981 !important;
}

/* Fælles menu */
.currency-menu {
  position: absolute;
  top: 130px;
  left: 24px;
  right: 24px;
  background: #fdfdfd;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  z-index: 100;
  max-height: 340px;
  overflow-y: auto;
  color: #111;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  opacity: 0;
}

.currency-menu.show {
  transform: scaleY(1);
  opacity: 1;
}

.currency-menu input.search-input {
  margin: 4px 8px;
  padding: 4px 6px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  outline: none;
}

.currency-menu input.search-input:focus {
  border-color: #4f46e5;
}

.currency-menu .option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 16px;
  height: 28px;
}

.currency-menu .option:hover {
  background: #e5e7eb;
}

.currency-menu .option img {
  width: 24px;
  height: 16px;
}

/* Dropdown sektion-headers */
.currency-menu .option-header{
  padding: 8px 8px 4px;
  font-weight: 700;
  font-size: 12px;
  color: #111;
  position: sticky;
  top: 0;
  background: #fdfdfd;
  z-index: 1;
}

/* Luft mellem sektioner */
.currency-menu .option-separator{
  height: 8px;
}

/* Populære options (fed tekst) */
.currency-menu .option.option--popular{
  font-weight: 700;
}

/* Kalender popup med animation + mobile placeholder */
.calendar-popup {
  position: absolute;
  top: 36px;
  left: 24px;
  width: 33%;
  background: #fdfdfd;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  padding: 27px;
  z-index: 200;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  opacity: 0;
}

.calendar-popup.show {
  transform: scaleY(1);
  opacity: 1;
}

.calendar-popup input {
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  outline: none;
  width: 100%;
  background: transparent;
}

.calendar-popup .mobile-placeholder {
  position: absolute;
  top: 8px;
  left: 10px;
  color: #6b7280;
  font-size: 14px;
  pointer-events: none;
  user-select: none;
}


/* ==========================================================
   Converter polish / visual tweaks
   (titel fjernes + bedre spacing + pæn “Skift dato”-chip)
   ========================================================== */

/* Fjern titel (du kan altid slå den til igen senere) */
.currencyconverter .converter-title {
  display: none;
}

/* Plads til chip i toppen */
.currencyconverter {
  padding-top: 54px;
}

/* Skift dato-knap som chip (overstyrer inline-ting visuelt) */
.currencyconverter #changeDateBtn {
  position: absolute;
  left: 24px;
  top: 12px;
  font-size: 12px;
  cursor: pointer;
  color: #111;
  font-weight: 600;

  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  padding: 6px 10px;
  line-height: 1;

  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.currencyconverter #changeDateBtn:hover {
  background: rgba(0,0,0,0.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.currencyconverter #changeDateBtn:active {
  transform: translateY(1px);
}

.currencyconverter #changeDateBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

/* Mere luft mellem “Skift dato” og info-linjen */
.currencyconverter #infoBox {
  margin-top: 18px;
  margin-bottom: 18px;
}

/* Lidt bedre fokus-states (match med resten) */
.currencyconverter .input-container input:focus,
.currencyconverter .dropdown-div:focus-visible {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* Dropdown mere “premium” */
.currencyconverter .dropdown-div {
  height: 38px;
  border-radius: 10px;
}

/* Resultat & update spacing */
.currencyconverter #result {
  margin: 18px 0 10px;
}

.currencyconverter .update-info {
  margin-bottom: 12px;
}

/* Mobil: mere luft + kalender bredere */
@media (max-width: 520px) {
  .currencyconverter {
    padding: 18px;
    padding-top: 60px;
  }

  .currencyconverter #changeDateBtn {
    left: 18px;
    top: 12px;
    padding: 7px 10px;
  }

  .currencyconverter .calendar-popup {
    left: 18px;
    right: 18px;
    width: auto;
  }
}
