/* v0.54 — Modal limpia para seleccionar íconos de inversión */

.investment-svg-badge,
.investment-icon-current-visual,
.investment-icon-modal-choice-visual {
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
  transform: none !important;
}

.investment-svg-badge svg,
.investment-icon-current-visual svg,
.investment-icon-modal-choice-visual svg {
  width: 1.18rem;
  height: 1.18rem;
  display: block;
}

.investment-svg-badge svg path,
.investment-icon-current-visual svg path,
.investment-icon-modal-choice-visual svg path {
  fill: currentColor;
}

.investment-svg-badge svg .tone-bg,
.investment-icon-current-visual svg .tone-bg,
.investment-icon-modal-choice-visual svg .tone-bg {
  fill: currentColor;
  opacity: .16;
}

.page-investment .investment-svg-badge {
  color: #55439d;
  background: radial-gradient(circle at 24% 22%, rgba(255,255,255,.84), transparent 32%), linear-gradient(135deg, #f4efff, #eaf8ff);
  box-shadow: 0 12px 26px rgba(56, 49, 112, .1);
}

.page-investment .investment-route-card:hover .investment-svg-badge,
.page-investment .investment-route-card:focus-within .investment-svg-badge {
  color: #fff;
  background: linear-gradient(135deg, #514498, #1f7ea8);
  box-shadow: 0 18px 34px rgba(56, 49, 112, .18);
}

.page-investment .investment-route-card:hover .investment-svg-badge svg .tone-bg,
.page-investment .investment-route-card:focus-within .investment-svg-badge svg .tone-bg {
  opacity: .24;
}

.admin-investment-item .investment-admin-controls {
  grid-template-columns: minmax(120px, .4fr) minmax(220px, .6fr);
  align-items: end;
  margin-bottom: .85rem;
}

.investment-icon-picker-compact {
  margin: .75rem 0 1rem;
  padding: 1rem;
  border: 1px solid #dfe6f3;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #f8f6ff);
}

.investment-icon-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .9rem;
}

.investment-icon-picker-label {
  display: block;
  margin-bottom: .15rem;
  color: var(--navy);
  font-size: .95rem;
  font-weight: 900;
}

.investment-icon-picker-help {
  margin: 0;
  color: #60708c;
  font-size: .88rem;
  line-height: 1.45;
  max-width: 760px;
}

.investment-icon-current {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .95rem 1rem;
  border: 1px solid #dfe6f3;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.investment-icon-current:hover,
.investment-icon-current:focus-visible {
  border-color: rgba(82, 68, 151, .38);
  box-shadow: 0 12px 24px rgba(45, 55, 112, .1);
  background: #fff;
  outline: none;
}

.investment-icon-current-visual {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 18px;
  color: #55439d;
  background: linear-gradient(135deg, #f1edff, #eaf8ff);
  box-shadow: 0 12px 24px rgba(56, 49, 112, .09);
}

.investment-icon-current-visual svg {
  width: 1.55rem;
  height: 1.55rem;
}

.investment-icon-current-copy {
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

.investment-icon-current-copy small {
  color: #60708c;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.investment-icon-current-copy strong {
  color: #1d2d55;
  font-size: 1rem;
  font-weight: 900;
}

.investment-icon-current-copy span {
  color: #60708c;
  font-size: .85rem;
}

.investment-icon-modal {
  width: min(1020px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: none;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  overflow: visible;
}

.investment-icon-modal::backdrop {
  background: rgba(16, 24, 40, .48);
  backdrop-filter: blur(2px);
}

.investment-icon-modal-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  background: #fff;
  border: 1px solid #dfe6f3;
  border-radius: 22px;
  box-shadow: 0 34px 80px rgba(20, 28, 62, .22);
  overflow: hidden;
}

.investment-icon-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid #edf1f8;
}

.investment-icon-modal-header h3 {
  margin: .15rem 0 .2rem;
  color: var(--navy);
}

.investment-icon-modal-header p:last-child {
  margin: 0;
  color: #60708c;
  font-size: .9rem;
}

.investment-icon-modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid #dfe6f3;
  border-radius: 999px;
  background: #fff;
  color: #514498;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.investment-icon-modal-close:hover,
.investment-icon-modal-close:focus-visible {
  background: #f5f2ff;
  border-color: rgba(82, 68, 151, .35);
  outline: none;
}

.investment-icon-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: .75rem;
  padding: 1rem 1.15rem;
  overflow: auto;
}

.investment-icon-modal-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  min-height: 118px;
  padding: .85rem .55rem .75rem;
  border: 1px solid #dfe6f3;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  text-align: center;
}

.investment-icon-modal-choice:hover,
.investment-icon-modal-choice:focus-visible,
.investment-icon-modal-choice.is-selected {
  border-color: rgba(82, 68, 151, .42);
  background: linear-gradient(135deg, #fff, #f7f3ff);
  box-shadow: 0 14px 28px rgba(45, 55, 112, .11);
  outline: none;
}

.investment-icon-modal-choice-visual {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  color: #55439d;
  background: linear-gradient(135deg, #f1edff, #eaf8ff);
  box-shadow: 0 12px 24px rgba(56, 49, 112, .09);
}

.investment-icon-modal-choice-visual svg {
  width: 1.65rem;
  height: 1.65rem;
}

.investment-icon-modal-choice:hover .investment-icon-modal-choice-visual,
.investment-icon-modal-choice:focus-visible .investment-icon-modal-choice-visual,
.investment-icon-modal-choice.is-selected .investment-icon-modal-choice-visual {
  color: #fff;
  background: linear-gradient(135deg, #514498, #1f7ea8);
  box-shadow: 0 16px 30px rgba(56, 49, 112, .17);
}

.investment-icon-modal-choice-label {
  color: #1d2d55;
  font-size: .7rem;
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
}

.investment-icon-modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: .9rem 1.2rem 1.15rem;
  border-top: 1px solid #edf1f8;
  background: linear-gradient(180deg, rgba(255,255,255,.75), #fff);
}

@media (max-width: 980px) {
  .admin-investment-item .investment-admin-controls,
  .investment-icon-picker-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .investment-icon-modal {
    width: min(100vw - 1rem, 920px);
  }

  .investment-icon-modal-gallery {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }
}

@media (max-width: 640px) {
  .investment-icon-current {
    align-items: flex-start;
  }

  .investment-icon-modal-header {
    padding: 1rem;
  }

  .investment-icon-modal-gallery {
    padding: .9rem;
    gap: .65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .investment-icon-modal-choice {
    min-height: 108px;
  }
}
