/* ===== Riesgo País — versión estable sin modificar tamaño del box ===== */

.riesgo-card{
  overflow: hidden !important;
}

.riesgo-card *{
  box-sizing: border-box;
}

.riesgo-card .riesgo-content{
  overflow: hidden !important;
  padding-top: 4px;
}

/* ===== Título + ícono info ===== */

.riesgo-card .riesgo-title{
  display: flex;
  align-items: center;
  gap: 8px;
}

.riesgo-card .riesgo-info{
  margin-left: 0;
  transform: translateY(-1px);
}

/* Tooltip ajustado al box de Riesgo País */
.riesgo-card .riesgo-info::after{
  left: 0;
  top: 130%;
  transform: none;
  min-width: 230px;
  max-width: 280px;
  z-index: 9999;
}

/* Layout interno */
.riesgo-card .rp-wrap{
  display: grid;
  grid-template-columns: 1fr 2px 92px;
  align-items: stretch;
  gap: 8px;
  height: 100%;
}

/* ===== COLUMNA IZQUIERDA: CARD ARGENTINA COMPLETA ===== */

.riesgo-card .rp-left{
  position: relative;
  overflow: hidden;

  min-width: 0;
  height: 144px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 7px 9px 7px 11px;
  border-radius: 10px;

  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);

  box-shadow:
    0 8px 16px rgba(0, 0, 0, .30) inset,
    0 6px 14px rgba(0, 0, 0, .20);
}

/* Línea lateral celeste */
.riesgo-card .rp-left::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: .95;
  background: linear-gradient(
    180deg,
    rgba(110, 205, 255, .95),
    rgba(110, 205, 255, .16)
  );
}

/* Glow celeste */
.riesgo-card .rp-left::after{
  content: "";
  position: absolute;
  inset: -58px -60px auto auto;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(110, 205, 255, .24) 0%,
    rgba(0,0,0,0) 70%
  );
  opacity: .22;
  pointer-events: none;
}

/* Argentina: label interno */
.riesgo-card .rp-arg-label{
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  gap: 6px;

  height: 18px;
  width: fit-content;
  max-width: 100%;

  font-size: 15px;
  line-height: .88;
  font-weight: 950;
  letter-spacing: .15px;
  text-transform: uppercase;
  color: rgba(255,255,255,.96);
  white-space: nowrap;
}

.riesgo-card .rp-arg-name{
  font-weight: 950;
  letter-spacing: .15px;
  font-size: 15px;
  line-height: .88;
  opacity: .96;
  color: #fff;
  white-space: nowrap;
}

.riesgo-card .rp-arg-flag{
  width: 21px;
  height: 14px;
  flex: 0 0 21px;

  border-radius: 3px;
  display: inline-block;
  object-fit: cover;

  box-shadow:
    0 0 0 1px rgba(255,255,255,.10),
    0 4px 12px rgba(0,0,0,.30);
  background: rgba(255,255,255,.06);
}

/* KPI principal */
.riesgo-card .rp-kpi{
  position: relative;
  z-index: 1;

  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
}

.riesgo-card .rp-kpi-num{
  font-size: 48px;
  font-weight: 950;
  line-height: .98;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.riesgo-card .rp-kpi-unit{
  font-size: 14px;
  opacity: .75;
  font-weight: 800;
  color: #fff;
}

/* Chips */
.riesgo-card .rp-chips{
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 0;
}

.riesgo-card .rp-chip{
  min-height: 38px;
  padding: 4px 6px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.riesgo-card .rp-chip-label{
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .35px;
  text-transform: uppercase;
  opacity: .70;
}

.riesgo-card .rp-chip-val{
  margin-top: 5px;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* Divisor — más sutil */
.riesgo-card .rp-divider-v{
  width: 2px;
  height: 144px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  align-self: start;
  margin-left: 1px;
}

/* Columna derecha */
.riesgo-card .rp-right{
  height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  margin-left: 1px;
}

/* Cards de países */
.riesgo-card .rp-country{
  position: relative;
  overflow: hidden;

  width: 92px;
  min-width: 0;
  height: 44px;
  flex: 0 0 44px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 6px 7px 6px 10px;
  border-radius: 10px;

  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);

  box-shadow:
    0 8px 16px rgba(0, 0, 0, .30) inset,
    0 6px 14px rgba(0, 0, 0, .20);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.riesgo-card .rp-country::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: .95;
}

.riesgo-card .rp-country::after{
  content: "";
  position: absolute;
  inset: -58px -60px auto auto;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    var(--rp-glow, rgba(255,255,255,.10)) 0%,
    rgba(0,0,0,0) 70%
  );
  opacity: .22;
  pointer-events: none;
}

.riesgo-card .rp-country:hover{
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .14);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255,255,255,.05) inset;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.06) 0%,
    rgba(255,255,255,.02) 60%,
    rgba(0,0,0,0) 100%
  );
}

/* Brasil — amarillo */
.riesgo-card .rp-country:nth-child(1){
  --rp-glow: rgba(255, 220, 70, .24);
}

.riesgo-card .rp-country:nth-child(1)::before{
  background: linear-gradient(
    180deg,
    rgba(255, 220, 70, .90),
    rgba(255, 220, 70, .14)
  );
}

/* Chile — rojo */
.riesgo-card .rp-country:nth-child(2){
  --rp-glow: rgba(255, 70, 70, .24);
}

.riesgo-card .rp-country:nth-child(2)::before{
  background: linear-gradient(
    180deg,
    rgba(255, 70, 70, .92),
    rgba(255, 70, 70, .16)
  );
}

/* México — verde */
.riesgo-card .rp-country:nth-child(3){
  --rp-glow: rgba(55, 210, 120, .26);
}

.riesgo-card .rp-country:nth-child(3)::before{
  background: linear-gradient(
    180deg,
    rgba(55, 210, 120, .92),
    rgba(55, 210, 120, .16)
  );
}

/* Contenido interno países */
.riesgo-card .rp-country-top,
.riesgo-card .rp-row-left{
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: 100%;
  min-width: 0;
  max-width: 100%;
  line-height: 1;
}

.riesgo-card .rp-flag{
  width: 20px;
  height: 13px;
  flex: 0 0 20px;

  border-radius: 3px;
  display: inline-block;
  object-fit: cover;

  box-shadow:
    0 0 0 1px rgba(255,255,255,.10),
    0 4px 12px rgba(0,0,0,.30);
  background: rgba(255,255,255,.06);
}

.riesgo-card .rp-cc{
  font-weight: 950;
  letter-spacing: .1px;
  font-size: 14px;
  line-height: .88;
  opacity: .96;
  color: #fff;
  white-space: nowrap;
}

.riesgo-card .rp-row-val{
  position: relative;
  z-index: 1;

  width: 100%;
  margin-top: 3px;
  padding-left: 0;

  text-align: center;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  opacity: .95;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
}

/* Compatibilidad */
.riesgo-card .rp-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.riesgo-card .rp-pill{
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 1250px){
  .riesgo-card .rp-wrap{
    grid-template-columns: 1fr;
  }

  .riesgo-card .rp-left,
  .riesgo-card .rp-right,
  .riesgo-card .rp-divider-v{
    height: auto;
  }

  .riesgo-card .rp-divider-v{
    display: none;
  }

  .riesgo-card .rp-right{
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.10);
    margin-left: 0;
  }

  .riesgo-card .rp-chips{
    grid-template-columns: 1fr;
  }

  .riesgo-card .rp-kpi-num{
    font-size: 52px;
  }
}
/* ===== Ajuste tooltip Riesgo País: igualar estilo visual al de Indicadores ===== */

.riesgo-card .riesgo-info{
  width: 14px;
  height: 14px;
  min-width: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;

  color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.04);

  cursor: help;
  transform: translateY(-1px);
}

/* Tooltip: tipografía y caja igual a Indicadores */
.riesgo-card .riesgo-info::after{
  font-family: Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;

  color: rgba(255,255,255,.96) !important;
  background: rgba(18,18,18,.96) !important;

  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 10px !important;

  padding: 10px 12px !important;

  left: 0 !important;
  top: 130% !important;
  transform: none !important;

  min-width: 230px !important;
  max-width: 280px !important;

  box-shadow: 0 10px 24px rgba(0,0,0,.38) !important;
  z-index: 9999 !important;
}
/* ===== Tooltip Riesgo País — desplegar hacia el centro y no recortar ===== */

.riesgo-card{
  overflow: visible !important;
  z-index: 20;
}

.riesgo-card .riesgo-content{
  overflow: hidden !important;
}

/* El tooltip ya no sale hacia la derecha: se abre hacia el centro del box */
.riesgo-card .riesgo-info::after{
  left: auto !important;
  right: -72px !important;
  top: 130% !important;
  transform: none !important;

  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;

  white-space: normal !important;
  text-align: left !important;

  z-index: 99999 !important;
}
/* ===== Riesgo País — igualar ícono info al de Indicadores ===== */

.riesgo-card .riesgo-info{
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin-left: 0 !important;
  padding: 0 !important;

  font-family: Arial, system-ui, sans-serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;

  color: rgba(255,255,255,.58) !important;
  background: rgba(255,255,255,.02) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 999px !important;

  cursor: help !important;
  transform: translateY(-1px) !important;
}
/* ===== Hover Argentina — mismo efecto que países/dólares ===== */

.riesgo-card .rp-left{
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.riesgo-card .rp-left:hover{
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .14);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255,255,255,.05) inset;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.06) 0%,
    rgba(255,255,255,.02) 60%,
    rgba(0,0,0,0) 100%
  );
}