/**
 * Smart Multi Currency - Estilos do seletor de moeda e admin.
 */

/* Frontend: dropdown customizado [smc_currency_switcher] */
.smc-currency-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  position: relative;
}

.smc-currency-switcher__label {
  font-weight: 500;
}

.smc-currency-switcher__dropdown {
  position: relative;
}

.smc-currency-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.25rem;
  min-width: 5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.smc-currency-switcher__trigger:hover {
  border-color: #999;
}

.smc-currency-switcher__trigger:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.smc-currency-switcher__trigger:disabled {
  opacity: 0.7;
  cursor: wait;
}

.smc-currency-switcher__trigger-text {
  flex: 1;
  white-space: nowrap;
  letter-spacing: normal;
  font-size: 14px;
}

.smc-currency-switcher__parts {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.25em;
}

/* Partes do trigger (flag, code, symbol) – permitem controle individual via CSS */
.smc-currency-switcher__part-flag {
  line-height: 1;
  flex-shrink: 0;
  font-size: 18px;
}

.smc-currency-switcher__part-code {
  font-weight: 500;
}

.smc-currency-switcher__part-symbol {
  font-weight: 600;
}

.smc-currency-switcher__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: currentColor;
}

.smc-currency-switcher--open .smc-currency-switcher__chevron {
  transform: rotate(180deg);
}

.smc-currency-switcher__chevron-svg {
  display: block;
}

.smc-currency-switcher__list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 100%;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 16rem;
  overflow-y: auto !important;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  animation: smc-dropdown-in 0.2s ease;
  width: max-content;
}

/* Ensure scrollbar is visible on WebKit (Chrome, Safari, Edge) */
.smc-currency-switcher__list::-webkit-scrollbar {
  width: 8px;
}

.smc-currency-switcher__list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.smc-currency-switcher__list::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.smc-currency-switcher__list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

@keyframes smc-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.smc-currency-switcher__item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
  letter-spacing: normal;
  font-size: 14px;
}

.smc-currency-switcher__item:hover,
.smc-currency-switcher__item:focus {
  background: #f0f0f1;
  outline: none;
}

.smc-currency-switcher__item.smc-currency-switcher__item--selected {
  background: #f0f6fc;
  font-weight: 500;
}

/* Admin: abas da página de configurações */
.smc-settings-wrap .smc-nav-tabs {
  margin-bottom: 0;
}

.smc-tab-panel {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-top: none;
  padding: 1.5rem 2rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.smc-tab-panel.smc-tab-integration {
  max-width: 640px;
}

.smc-tab-integration .smc-tab-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.smc-tab-intro {
  margin: 0 0 1.25rem;
  color: #50575e;
  max-width: 560px;
}

.smc-shortcode-attributes {
  margin-top: 1.25rem;
}

/* Admin: shortcode + botão copiar (Integração) */
.smc-shortcode-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 480px;
}

.smc-shortcode-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  font-family: Consolas, Monaco, monospace;
  background: #f6f7f7;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  color: #1d2327;
}

.smc-shortcode-copy-btn {
  flex-shrink: 0;
}

.smc-shortcode-copied {
  font-size: 13px;
  color: #00a32a;
  font-weight: 500;
}

/* Admin: painéis de moedas (duas colunas) */
.smc-currencies-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .smc-currencies-panels {
    grid-template-columns: 1fr;
  }
}

.smc-currencies-panel {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.smc-currencies-panel .smc-panel-title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-bottom: 1px solid #e2e4e7;
  background: #f6f7f7;
}

.smc-currencies-panel .description {
  margin: 0.5rem 1.25rem 0.75rem;
  font-size: 13px;
}

.smc-table-filter-wrap {
  margin: 0 1.25rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.smc-filter-label {
  font-weight: 600;
  font-size: 13px;
  color: #1d2327;
}

.smc-filter-input {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  padding: 0.4rem 0.75rem;
  font-size: 13px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background: #fff;
}

.smc-filter-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: 0;
}

.smc-filter-desc {
  font-size: 12px;
  color: #646970;
  width: 100%;
}

.smc-currencies-panel .smc-help-inline {
  margin: 0.75rem 1.25rem 1rem;
}

.smc-currencies-table-wrap {
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
}

.smc-currencies-available-wrap {
  max-height: 55vh;
}

.smc-currencies-active-wrap {
  max-height: 50vh;
}

.smc-currencies-panel .smc-currencies-table {
  margin: 0;
  border: none;
}

.smc-currencies-panel .smc-currencies-table thead th {
  position: sticky;
  top: 0;
  background: #f0f0f1;
  z-index: 1;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.06);
  padding: 0.6rem 0.75rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #50575e;
}

.smc-currencies-panel .smc-currencies-table tbody td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  border-top: 1px solid #e2e4e7;
}

.smc-currencies-panel .smc-currencies-table tbody tr:hover {
  background: #f9f9f9;
}

.smc-currencies-panel .smc-currencies-table tbody tr.smc-row-active {
  background: #f0f6fc;
}

.smc-col-flag {
  width: 42px;
  text-align: center;
  font-size: 1.5rem !important;
  line-height: 1;
}

.smc-col-symbol {
  font-weight: 600;
  color: #1d2327;
}

.smc-col-active {
  width: 80px;
  text-align: center;
}

.smc-currency-label {
  display: block;
  font-size: 11px;
  color: #646970;
  font-weight: 400;
  margin-top: 1px;
}

.smc-currency-symbol-inline {
  font-size: 12px;
  color: #646970;
  margin-left: 0.25rem;
}

.smc-input-rate,
.smc-input-markup {
  width: 90px;
}

.smc-empty-state {
  text-align: center;
  padding: 2rem 1rem !important;
  color: #646970;
  font-style: italic;
}

.smc-stripe-currency-notice {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

/* Badge flutuante de teste: país e moeda detectados (GeoIP) - slide-in menu */
.smc-geo-badge {
  position: fixed;
  top: 40px;
  left: 0;
  z-index: 999999;
  display: flex;
  align-items: stretch;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 0;
}

.smc-geo-badge.smc-geo-badge--expanded {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.smc-geo-badge__toggle {
  flex-shrink: 0;
  width: 28px;
  padding: 0;
  border: none;
  background: rgba(0, 255, 43, 1);
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease;
  height: 30px;
  box-shadow:
    0 0 15px #00ff2a26,
    0 0 30px #00ff2a14;
}

.smc-geo-badge__toggle:hover {
  background: rgba(0, 255, 43, 0.95);
}

.smc-geo-badge__toggle:focus {
  outline: none;
}

.smc-geo-badge__symbol {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.smc-geo-badge__content {
  width: 220px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.6rem 0.9rem;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
  /* Move content fully off-screen to the left (past the 28px toggle) */
  transform: translateX(calc(-100% - 28px));
  transition: transform 0.3s ease;
}

.smc-geo-badge.smc-geo-badge--expanded .smc-geo-badge__content {
  transform: translateX(0);
}

.smc-geo-badge__title {
  color: rgba(0, 255, 43, 1);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.smc-geo-badge__row {
  display: block;
}

.smc-geo-badge strong {
  font-weight: 600;
}

.smc-geo-badge__flag {
  font-size: 1.25em;
  line-height: 1;
  display: inline-block;
}
