
/* ==========================================================
   NUBO_CATEGORY_DESIGN_SYSTEM_V1_START
   ========================================================== */

.nubo-category-native-select {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  margin: -1px !important;
  padding: 0 !important;

  overflow: hidden !important;

  border: 0 !important;

  clip: rect(0 0 0 0) !important;
  clip-path: inset(100%) !important;

  white-space: nowrap !important;
}


/* Selector */

.nubo-category-field {
  position: relative;
}

.nubo-category-picker {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 10px;

  width: 100%;

  margin-top: 4px;
}

.nubo-category-picker__item {
  position: relative;

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

  gap: 8px;

  min-width: 0;
  min-height: 105px;

  padding:
    11px
    8px
    10px;

  border:
    1px solid
    #e4e9ef;

  border-radius:
    17px;

  color:
    #2c3e59;

  background:
    #ffffff;

  box-shadow:
    0 1px 0
    rgba(255, 255, 255, 0.9)
    inset;

  font: inherit;

  cursor: pointer;

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.nubo-category-picker__item:hover {
  transform:
    translateY(-2px);

  border-color:
    color-mix(
      in srgb,
      var(--category-color) 40%,
      #dfe5eb
    );

  background:
    color-mix(
      in srgb,
      var(--category-color) 4%,
      #ffffff
    );

  box-shadow:
    0 9px 22px
    color-mix(
      in srgb,
      var(--category-color) 10%,
      transparent
    );
}

.nubo-category-picker__item.is-selected {
  border-color:
    color-mix(
      in srgb,
      var(--category-color) 70%,
      #ffffff
    );

  background:
    color-mix(
      in srgb,
      var(--category-color) 8%,
      #ffffff
    );

  box-shadow:
    0 0 0 2px
    color-mix(
      in srgb,
      var(--category-color) 12%,
      transparent
    ),
    0 10px 22px
    color-mix(
      in srgb,
      var(--category-color) 12%,
      transparent
    );

  transform:
    translateY(-1px);
}

.nubo-category-picker__item.is-selected::after {
  content: "";

  position: absolute;

  top: 9px;
  right: 9px;

  width: 7px;
  height: 7px;

  border:
    2px solid
    #ffffff;

  border-radius:
    50%;

  background:
    var(--category-color);
}

.nubo-category-picker__icon,
.nubo-category-visual-icon {
  display: grid;
  place-items: center;

  color:
    var(--category-color);

  background:
    color-mix(
      in srgb,
      var(--category-color) 13%,
      #ffffff
    );
}

.nubo-category-picker__icon {
  width: 47px;
  height: 47px;

  border-radius:
    15px;
}

.nubo-category-picker__svg {
  width: 23px;
  height: 23px;
}

.nubo-category-picker__label {
  color:
    #34445e;

  font-size:
    10.5px;

  font-weight:
    690;

  line-height:
    1.25;

  text-align:
    center;

  text-wrap:
    balance;
}

.nubo-category-field__help {
  display: block;

  margin-top: 8px;

  color:
    #7a8798;

  font-size:
    10.5px;

  line-height:
    1.42;
}


/* Movimientos */

.nubo-category-chip.is-designed {
  display: inline-flex !important;
  align-items: center !important;

  gap: 6px !important;

  min-height: 30px !important;

  padding:
    4px
    9px
    4px
    5px !important;

  border:
    1px solid
    color-mix(
      in srgb,
      var(--category-color) 22%,
      transparent
    ) !important;

  border-radius:
    999px !important;

  color:
    color-mix(
      in srgb,
      var(--category-color) 78%,
      #17233b
    ) !important;

  background:
    color-mix(
      in srgb,
      var(--category-color) 9%,
      #ffffff
    ) !important;

  font-size:
    10.5px !important;

  font-weight:
    720 !important;
}

.nubo-category-chip__icon {
  flex:
    0
    0
    23px;

  width: 23px;
  height: 23px;

  border-radius:
    8px;
}

.nubo-category-chip__icon
.nubo-category-visual-svg {
  width: 13px;
  height: 13px;
}


/* Dashboard */

.finvia-v9-category-item__visual-icon {
  flex:
    0
    0
    32px;

  width: 32px;
  height: 32px;

  border-radius:
    11px;
}

.finvia-v9-category-item__visual-icon
.nubo-category-visual-svg {
  width: 16px;
  height: 16px;
}


/* Análisis */

.nubo-analysis-legend__visual-icon {
  flex:
    0
    0
    29px;

  width: 29px;
  height: 29px;

  border-radius:
    10px;
}

.nubo-analysis-legend__visual-icon
.nubo-category-visual-svg {
  width: 15px;
  height: 15px;
}

.nubo-analysis-row__head
> div:first-child {
  display: flex !important;
  align-items: center !important;

  gap: 9px !important;
}

.nubo-analysis-row__visual-icon {
  flex:
    0
    0
    30px;

  width: 30px;
  height: 30px;

  border-radius:
    10px;
}

.nubo-analysis-row__visual-icon
.nubo-category-visual-svg {
  width: 16px;
  height: 16px;
}


/* Oscuro */

html[data-theme="dark"]
.nubo-category-picker__item {
  border-color:
    rgba(109, 127, 139, 0.27);

  color:
    #e3ecf3;

  background:
    #172022;
}

html[data-theme="dark"]
.nubo-category-picker__item:hover,
html[data-theme="dark"]
.nubo-category-picker__item.is-selected {
  border-color:
    color-mix(
      in srgb,
      var(--category-color) 55%,
      #39484b
    );

  background:
    color-mix(
      in srgb,
      var(--category-color) 10%,
      #172022
    );
}

html[data-theme="dark"]
.nubo-category-picker__icon,
html[data-theme="dark"]
.nubo-category-visual-icon {
  background:
    color-mix(
      in srgb,
      var(--category-color) 17%,
      #172022
    );
}

html[data-theme="dark"]
.nubo-category-picker__label {
  color:
    #dce5ed;
}

html[data-theme="dark"]
.nubo-category-chip.is-designed {
  color:
    color-mix(
      in srgb,
      var(--category-color) 72%,
      #ffffff
    ) !important;

  background:
    color-mix(
      in srgb,
      var(--category-color) 13%,
      #172022
    ) !important;
}


/* Responsive */

@media (max-width: 760px) {
  .nubo-category-picker {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );

    gap: 8px;
  }

  .nubo-category-picker__item {
    min-height: 99px;

    padding:
      10px
      6px
      9px;

    border-radius:
      15px;
  }

  .nubo-category-picker__icon {
    width: 43px;
    height: 43px;

    border-radius:
      14px;
  }

  .nubo-category-picker__label {
    font-size:
      9.8px;
  }
}

@media (max-width: 390px) {
  .nubo-category-picker {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .nubo-category-picker__item {
    transition:
      none !important;
  }
}

/* NUBO_CATEGORY_DESIGN_SYSTEM_V1_END */


/* ==========================================================
   NUBO_ANALYSIS_LEGEND_ICON_ALIGNMENT_V1_START

   El diseño anterior reservaba una columna pequeña
   para un punto de color. Ahora la primera columna
   debe alojar un icono completo sin invadir el texto.
   ========================================================== */

.nubo-analysis-legend__item {
  display: grid !important;

  grid-template-columns:
    26px
    minmax(0, 1fr)
    auto !important;

  align-items: center !important;

  column-gap: 9px !important;
  row-gap: 0 !important;

  min-width: 0 !important;
}


/* Contenedor del icono */

.nubo-analysis-legend__item
> .nubo-analysis-legend__visual-icon {
  grid-column: 1 !important;

  display: grid !important;
  place-items: center !important;

  justify-self: start !important;

  width: 26px !important;
  height: 26px !important;

  min-width: 26px !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 9px !important;

  overflow: hidden !important;

  line-height: 1 !important;
}


/* SVG interno */

.nubo-analysis-legend__visual-icon
.nubo-category-visual-svg {
  display: block !important;

  width: 14px !important;
  height: 14px !important;

  min-width: 14px !important;

  margin: 0 !important;

  stroke-width: 1.9 !important;
}


/* Nombre de la categoría */

.nubo-analysis-legend__item
> span:not(.nubo-analysis-legend__visual-icon) {
  grid-column: 2 !important;

  display: block !important;

  min-width: 0 !important;

  margin: 0 !important;

  overflow: hidden !important;

  color: inherit;

  line-height: 1.25 !important;

  text-overflow: ellipsis !important;

  white-space: nowrap !important;
}


/* Porcentaje */

.nubo-analysis-legend__item
> strong {
  grid-column: 3 !important;

  justify-self: end !important;

  min-width: 42px !important;

  margin: 0 !important;

  padding-left: 4px !important;

  line-height: 1.2 !important;

  text-align: right !important;

  white-space: nowrap !important;
}


/* Separación entre filas */

.nubo-analysis-legend {
  gap: 8px !important;
}


/* Pantallas pequeñas */

@media (max-width: 560px) {
  .nubo-analysis-legend__item {
    grid-template-columns:
      24px
      minmax(0, 1fr)
      auto !important;

    column-gap: 8px !important;
  }

  .nubo-analysis-legend__item
  > .nubo-analysis-legend__visual-icon {
    width: 24px !important;
    height: 24px !important;

    min-width: 24px !important;

    border-radius: 8px !important;
  }

  .nubo-analysis-legend__visual-icon
  .nubo-category-visual-svg {
    width: 13px !important;
    height: 13px !important;
  }

  .nubo-analysis-legend__item
  > strong {
    min-width: 39px !important;
  }
}

/* NUBO_ANALYSIS_LEGEND_ICON_ALIGNMENT_V1_END */

