/**
 * GLOSS & GROWTH — COMPONENTE CENTRALIZADO DE SELECCIÓN MULTIMONEDA
 * Sistema visual corporativo: Borgoña #8C2536, Carbón #352925, Crema #FCFAF5
 */

.gloss-currency-field {
  margin-bottom: 16px;
  position: relative;
}

.gloss-currency-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.gloss-currency-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--calc-charcoal, #352925);
  font-family: inherit;
}

.gloss-currency-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(140, 37, 54, 0.08);
  color: var(--burgundy, #8C2536);
  font-family: monospace;
}

.gloss-currency-picker {
  position: relative;
  width: 100%;
}

.gloss-curr-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--calc-border, #E8E2DA);
  border-radius: 8px;
  font-size: 14px;
  color: var(--calc-charcoal, #352925);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  min-height: 44px;
  text-align: left;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gloss-curr-btn:hover {
  border-color: var(--burgundy, #8C2536);
  background: #fdfcfb;
}

.gloss-curr-btn:focus-visible {
  outline: none;
  border-color: var(--burgundy, #8C2536);
  box-shadow: 0 0 0 3px rgba(140, 37, 54, 0.15);
}

.gloss-curr-btn[aria-expanded="true"] {
  border-color: var(--burgundy, #8C2536);
  box-shadow: 0 0 0 3px rgba(140, 37, 54, 0.12);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.gloss-curr-btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.gloss-curr-btn-name {
  font-weight: 500;
  color: var(--calc-charcoal, #352925);
  overflow: hidden;
  text-overflow: ellipsis;
}

.gloss-curr-btn-code {
  font-weight: 700;
  color: var(--burgundy, #8C2536);
  font-family: inherit;
  flex-shrink: 0;
}

.gloss-curr-btn-arrow {
  margin-left: 8px;
  color: #786E69;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.gloss-curr-btn[aria-expanded="true"] .gloss-curr-btn-arrow {
  transform: rotate(180deg);
}

/* DROPDOWN MENU */
.gloss-curr-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid var(--calc-border, #E8E2DA);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(53, 41, 37, 0.12), 0 2px 6px rgba(53, 41, 37, 0.04);
  overflow: hidden;
  animation: glossCurrFadeIn 0.15s ease-out;
}

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

.gloss-curr-search-box {
  padding: 8px 10px;
  border-bottom: 1px solid var(--calc-border, #E8E2DA);
  background: var(--calc-cream, #FCFAF5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gloss-curr-search-box svg {
  color: #786E69;
  flex-shrink: 0;
}

.gloss-curr-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--calc-charcoal, #352925);
  outline: none;
  font-family: inherit;
  padding: 4px 0;
}

.gloss-curr-search-input::placeholder {
  color: #9D948E;
}

.gloss-curr-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 250px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gloss-curr-list:focus {
  outline: none;
}

.gloss-curr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--calc-charcoal, #352925);
  cursor: pointer;
  transition: background-color 0.1s ease;
  min-height: 40px;
  user-select: none;
}

.gloss-curr-item:hover,
.gloss-curr-item.is-highlighted {
  background: rgba(140, 37, 54, 0.06);
}

.gloss-curr-item.is-selected {
  background: rgba(140, 37, 54, 0.09);
  font-weight: 600;
}

.gloss-curr-item.is-selected .gloss-curr-item-name {
  color: var(--burgundy, #8C2536);
}

.gloss-curr-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.gloss-curr-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gloss-curr-item-symbol {
  font-size: 12px;
  color: #786E69;
}

.gloss-curr-item-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy, #8C2536);
  font-family: monospace;
  background: rgba(140, 37, 54, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

.gloss-curr-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: #786E69;
  text-align: center;
  font-style: italic;
}

/* AVISO CONFIRMACIÓN AL CAMBIAR DE MONEDA CON VALORES */
.gloss-curr-notice {
  margin-top: 8px;
  padding: 9px 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #92400E;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: glossCurrFadeIn 0.2s ease-out;
}

.gloss-curr-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #B45309;
}

.gloss-curr-notice-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #92400E;
  cursor: pointer;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
}

/* Responsividad para móviles */
@media (max-width: 640px) {
  .gloss-curr-btn {
    min-height: 48px;
    font-size: 14px;
    padding: 12px 14px;
  }
  .gloss-curr-list {
    max-height: 220px;
  }
  .gloss-curr-item {
    min-height: 44px;
    padding: 11px 14px;
  }
}
