/* financials block widget styles */
.financials-block {
  display: flex;
  width: 100%;
  padding: 64px 40px;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  background: var(--Color-Surface-Empty, #f4f3f3);
  /* margin-bottom: 30px; . */
  position: relative;
  overflow: hidden;
}

.financials-content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex: 1 0 0;
  flex-direction: row;
  width: 100%;
  height: 478px;
}

/* Style for financials-content in no-image layout */
.financials-block:not(.financials-block-with-image) .financials-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  align-self: stretch;
  height: 345px;
}

.financials-block:not(.financials-block-with-image) .financials-items {
  height: auto;
  gap: 40px;
}

.financials-block:not(.financials-block-with-image) .financials-item-revenue {
  height: auto;
}

/* Style for the variant with image */
.financials-block-with-image {
  /* max-height: 696px; */
}

.financials-corner-image img {
  height: auto;
  display: block;
  height: 478px !important;
  width: 893px !important;
  object-fit: contain;
}

.financials-header {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 0;
}

.financials-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.financials-icon .financials-mobile-icon {
  display: none;
}

.financials-icon .financials-desktop-icon {
  display: block;
}

.financials-icon svg {
  width: 80px;
  height: 81px;
}

.financials-title {
  color: var(--Text-primary, #26251a);
  font-size: 38px;
  font-style: normal;
  font-weight: var(--Type-Display-Display-3-Weight, 500);
  line-height: 110%; /* 41.8px */
  letter-spacing: -0.38px;
}

.financials-items {
  display: flex;
  flex-direction: column;
  gap: 88px;
  width: 100%;
  /* width: 478px; */
  height: 478px;
}

/* Make financials-items display in a row for no-image variant */
.financials-block:not(.financials-block-with-image) .financials-items {
  flex-direction: row;
  width: 100%;
  flex-wrap: wrap;
}

.financials-item {
  display: flex;
  flex-direction: column;
  display: flex;
  /* max-width: 400px; */
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

/* Add align-self for no-image format in desktop view */
.financials-block:not(.financials-block-with-image) .financials-item {
  align-self: flex-start;
}

.financials-item-content {
  display: flex;
  width: 400px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.financials-item-separator {
  width: 400px;
  height: 1px;
  background: var(--Separator-primary, #c0c0c0);
  margin: 8px 0;
}

.financials-item-revenue {
  color: var(--Text-secondary, #797979);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%; /* 24px */
  letter-spacing: 1.92px;
}

.financials-item-value {
  color: #000;
  font-size: 32px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%; /* 38.4px */
  letter-spacing: -0.32px;
  display: flex;
  align-items: center;
}

.financials-currency-symbol {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  vertical-align: middle;
}

/* RTL currency symbol styles */
.financials-currency-symbol-rtl {
  margin-right: 0;
  margin-left: 4px;
}

.financials-currency-symbol svg {
  width: 32px;
  height: 32px;
  stroke: #000;
}

.financials-item-percentage {
  color: #1b8e86;
  leading-trim: both;
  text-edge: cap;
  font-family: Involve;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.financials-percentage-text {
  color: inherit;
  font: inherit;
}

.financials-percentage-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.financials-percentage-icon svg {
  width: 19px;
  height: 19px;
}

/* RTL icon flipping */
.financials-rtl-icon svg,
html[dir="rtl"] .financials-percentage-icon svg {
  transform: scaleX(-1); /* Flip horizontally */
}

/* Mobile styles for financials block */
@media (max-width: 990px) {
  .financials-block.financials-block-with-image {
    display: flex;
    width: 100%;
    padding: 32px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24.405px;
    height: auto;
    background: var(--Color-Surface-Empty, #f4f3f3);
  }

  .financials-block {
    width: 100%;
    display: flex;
    padding: 32px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24.405px;
  }

  /* Show mobile icon and hide desktop icon on mobile */
  .financials-icon .financials-mobile-icon {
    display: block;
  }

  .financials-icon .financials-desktop-icon {
    display: none;
  }

  .financials-icon svg {
    width: 50px;
    height: 50px;
  }

  .financials-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    height: auto;
  }

  .financials-block:not(.financials-block-with-image) .financials-items {
    flex-direction: column;
    justify-content: center;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    flex: 1 0 0;
    width: 100%;
    height: auto;
  }

  .financials-block:not(.financials-block-with-image) .financials-item {
    width: 100%;
    align-self: stretch;
  }

  .financials-block:not(.financials-block-with-image) .financials-item-content {
    width: 100%;
    max-width: 100%;
  }

  .financials-block:not(.financials-block-with-image) .financials-item-revenue {
    max-width: 100%;
    width: 100%;
  }

  .financials-items {
    flex-direction: column;
    justify-content: center;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    flex: 1 0 0;
    width: auto;
    height: auto;
  }

  .financials-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6.101px;
    flex-shrink: 0;
    width: auto;
    max-width: 100%;
  }

  .financials-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24.405px;
  }

  .financials-item-separator {
    width: 100%;
  }

  .financials-corner-image {
    height: 100%;
  }

  .financials-corner-image img {
    width: 141px !important;
    height: 100% !important;
    object-fit: cover;
  }

  .financials-item-value {
    font-size: 16.27px !important;
  }

  .financials-title {
    font-size: 28px !important;
  }

  .financials-item-revenue,
  .financials-percentage-text {
    font-size: 12.202px !important;
  }

  .financials-currency-symbol svg {
    width: 16px;
    height: 16px;
  }
}
