/* ============================================
   Currency Switcher — works with both class systems
   ============================================ */

.currency-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 1rem;
  font-family: inherit;
}

.currency-switcher select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 6px 28px 6px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1A1D23;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%234B5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.currency-switcher select:hover {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.16);
}

.currency-switcher select:focus {
  outline: none;
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Mobile: smaller padding, no margin */
@media (max-width: 768px) {
  .currency-switcher {
    margin-left: 0.5rem;
  }
  .currency-switcher select {
    padding: 5px 24px 5px 10px;
    font-size: 0.75rem;
  }
}

/* Tiny visual cue when prices are updating */
.price-updating {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

/* ============================================
   Country selector card (homepage hero)
   ============================================ */

.country-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--white, #FFF);
  border: 1px solid var(--g200, #E5E7EB);
  border-radius: 24px;
  padding: 28px 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  margin: 0 auto;
  min-width: 320px;
  font-family: inherit;
}

.country-switcher select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--g100, #F3F4F6);
  border: 1.5px solid var(--g200, #E5E7EB);
  border-radius: 14px;
  padding: 12px 40px 12px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark, #1A1D23);
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  min-width: 240px;
  text-align-last: left;
}

.country-switcher select:hover {
  border-color: var(--green, #22C55E);
  background-color: var(--white, #FFF);
}

.country-switcher select:focus {
  outline: none;
  border-color: var(--green, #22C55E);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.country-card-flag {
  font-size: 3rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

.country-switcher select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", system-ui, sans-serif !important;
}

.country-card-rate {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-dark, #16A34A);
  line-height: 1;
  letter-spacing: -1px;
}

.country-card-rate-suffix {
  font-size: 1rem;
  font-weight: 500;
  color: var(--g500, #6B7280);
  margin-top: 4px;
}

.country-card-dial {
  font-size: 0.85rem;
  color: var(--g500, #6B7280);
  font-weight: 500;
}

@media (max-width: 480px) {
  .country-card {
    min-width: 280px;
    padding: 24px;
  }
  .country-card-rate {
    font-size: 2rem;
  }
}

/* ============================================
   Twemoji flag sizing (cross-browser flag rendering)
   ============================================ */

img.emoji-flag {
  height: 1em;
  width: auto;
  vertical-align: -0.15em;
  display: inline-block;
}

.country-card-flag img.emoji-flag {
  height: 3rem;
  width: auto;
  vertical-align: middle;
}

.country-switcher select option img {
  /* select <option>s can't render images natively in most browsers; the <option> text shows the emoji char itself */
}

/* ============================================
   Rates table (rates.html)
   ============================================ */

.all-rates-section {
  margin-top: 60px;
  padding: 0 20px;
}

.all-rates-header {
  text-align: center;
  margin-bottom: 32px;
}

.all-rates-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy-900, #0A1628);
}

.all-rates-header p {
  color: var(--gray-600, #4B5563);
  font-size: 1.05rem;
}

.rates-table-wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid var(--gray-200, #E5E7EB);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
}

.rates-table thead th {
  background: var(--navy-900, #0A1628);
  color: white;
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 14px 20px;
}

.rates-table thead th.rate-col {
  text-align: right;
}

.rates-table tbody tr {
  border-bottom: 1px solid var(--gray-100, #F3F4F6);
  transition: background 0.15s ease;
}

.rates-table tbody tr:last-child {
  border-bottom: none;
}

.rates-table tbody tr:hover {
  background: var(--gray-50, #F9FAFB);
}

.rates-table tbody td {
  padding: 16px 20px;
  font-size: 1rem;
  color: var(--navy-900, #0A1628);
}

.rates-table .rt-flag {
  display: inline-block;
  margin-right: 10px;
  font-size: 1.3rem;
  vertical-align: middle;
}

.rates-table .rt-dial {
  color: var(--gray-600, #4B5563);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
}

.rates-table .rate-col {
  text-align: right;
  font-weight: 700;
  color: var(--gold-600, #D4850C);
  font-size: 1.1rem;
}

.more-countries-note {
  text-align: center;
  margin: 28px auto 0;
  padding: 16px 24px;
  color: var(--gray-600, #4B5563);
  background: var(--gray-50, #F9FAFB);
  border-radius: 12px;
  max-width: 720px;
  font-size: 0.96rem;
}

.more-countries-note strong {
  color: var(--gold-600, #D4850C);
}

@media (max-width: 600px) {
  .rates-table thead th,
  .rates-table tbody td {
    padding: 12px 14px;
    font-size: 0.92rem;
  }
  .rates-table .rt-flag {
    font-size: 1.1rem;
    margin-right: 6px;
  }
  .all-rates-header h2 {
    font-size: 1.5rem;
  }
}
