/* ==========================================================================
   Avangard Gold - Curs valutar (tabel) + Harta locatiilor
   Sursa: portare a sections/component-exchange-rate.liquid (tema Shopify)
   ========================================================================== */

.avg-rt {
  /* ---- Personalizeaza culorile aici ---- */
  --avg-gold: #dfb869;
  --avg-gold-light: #f9f6bb;
  --avg-page: #fbfbfb;
  --avg-card: #ffffff;
  --avg-border: #f0f0f0;
  --avg-text: #000000;
  --avg-muted: #666666;
  --avg-error: #dc3545;
  --avg-radius: 10px;

  box-sizing: border-box;
  width: 100%;
  padding: 50px 0;
  background: var(--avg-page);
  color: var(--avg-text);
  font-family: inherit;
}

.avg-rt *,
.avg-rt *::before,
.avg-rt *::after { box-sizing: border-box; }

.avg-rt__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Doua coloane ---------- */
.avg-rt__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.avg-rt__title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.54px;
  color: var(--avg-text);
}

/* ---------- Cardul cu cursuri ---------- */
.avg-rt__box {
  padding: 24px;
  border: 1px solid #f7f7f7;
  border-radius: var(--avg-radius);
  background: var(--avg-card);
  box-shadow: 0 0 20px 2px rgba(73, 42, 0, 0.02);
}

.avg-rt__select {
  width: 100%;
  margin-bottom: 20px;
  padding: 13px 40px 13px 16px;
  border: 1px solid var(--avg-border);
  border-radius: 8px;
  background-color: var(--avg-card);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23dfb869' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: var(--avg-text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.avg-rt__search {
  position: relative;
  margin-bottom: 20px;
}

.avg-rt__search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.avg-rt__search-input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1px solid var(--avg-border);
  border-radius: 8px;
  background: var(--avg-card);
  color: var(--avg-text);
  font-size: 15px;
  font-family: inherit;
}

.avg-rt__search-input::placeholder { color: #a0a0a0; }

.avg-rt__select:focus-visible,
.avg-rt__search-input:focus-visible,
.avg-rt__map-input:focus-visible,
.avg-rt__icon-btn:focus-visible,
.avg-rt__retry:focus-visible { outline: 2px solid var(--avg-gold); outline-offset: 2px; }

/* ---------- Tabelul ---------- */
.avg-rt__table-wrap { overflow-x: auto; }

.avg-rt__table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
}

.avg-rt__table th {
  padding: 12px 16px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--avg-text);
  letter-spacing: -0.14px;
  border-bottom: 1px solid #f7f7f7;
  white-space: nowrap;
}

.avg-rt__table th:first-child { text-align: left; }

.avg-rt__table tbody tr { border-bottom: 1px solid #f7f7f7; }
.avg-rt__table tbody tr:last-child { border-bottom: none; }

.avg-rt__table td {
  padding: 16px;
  font-size: 14px;
  color: var(--avg-text);
}

.avg-rt__cur-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.avg-rt__cur-flag {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.avg-rt__cur-name {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.14px;
}

.avg-rt__buy,
.avg-rt__sell { text-align: right; font-weight: 500; }

.avg-rt__msg-row td {
  padding: 32px 16px;
  text-align: center;
  color: var(--avg-muted);
  font-style: italic;
}

.avg-rt__updated {
  margin: 16px 0 0;
  font-size: 12px;
  text-align: right;
  color: var(--avg-muted);
}

.avg-rt__retry {
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid var(--avg-gold);
  border-radius: 999px;
  background: transparent;
  color: #8a6a26;
  font-size: 13px;
  font-family: inherit;
  font-style: normal;
  cursor: pointer;
}

.avg-rt__retry[hidden] { display: none; }

/* ---------- Harta ---------- */
.avg-rt__map-wrap { position: relative; }

.avg-rt__map-search { margin-bottom: 16px; }

.avg-rt__map-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avg-rt__map-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.avg-rt__map-input {
  width: 100%;
  padding: 13px 46px 13px 16px;
  border: 1px solid var(--avg-border);
  border-radius: 8px;
  background: var(--avg-card);
  color: var(--avg-text);
  font-size: 15px;
  font-family: inherit;
}

.avg-rt__map-input::placeholder { color: #a0a0a0; }

.avg-rt__map-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--avg-muted);
  cursor: pointer;
}

.avg-rt__icon-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--avg-border);
  border-radius: 8px;
  background: var(--avg-card) center / 20px 20px no-repeat;
  color: var(--avg-muted);
  cursor: pointer;
}

.avg-rt__icon-btn:hover { border-color: var(--avg-gold); }
.avg-rt__icon-btn[hidden] { display: none; }

.avg-rt__map {
  width: 100%;
  min-height: 520px;
  border-radius: var(--avg-radius);
  overflow: hidden;
  background: #f5f5f5;
}

.avg-rt__map-msg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--avg-muted);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--avg-radius);
}

.avg-rt__map-msg[hidden] { display: none; }
.avg-rt__map-msg.is-error { color: var(--avg-error); }

/* Google InfoWindow */
.avg-rt__iw { font-family: inherit; max-width: 240px; line-height: 1.5; }
.avg-rt__iw strong { display: block; margin-bottom: 4px; font-size: 14px; }
.avg-rt__iw span { display: block; font-size: 13px; color: var(--avg-muted); }
.avg-rt__iw a { color: #8a6a26; font-size: 13px; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  .avg-rt { padding: 32px 0; }
  .avg-rt__inner { padding: 0 16px; }
  .avg-rt__grid { grid-template-columns: 1fr; gap: 24px; }
  .avg-rt__title { font-size: 16px; margin-bottom: 16px; letter-spacing: -0.48px; }
  .avg-rt__box { padding: 16px; }
  .avg-rt__select, .avg-rt__search { margin-bottom: 16px; }
  .avg-rt__table td, .avg-rt__table th { padding: 12px 10px; }
  .avg-rt__map { min-height: 420px; }
}
