@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

.off {
  display: none !important;
}

.template {
  display: none;
}

.ui-loader {
  display: none;
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

:root {
  --primary-font-family: "Lato", sans-serif;
  --normal-text-font-size: 14px;
  --medium-text-font-size: 15px;
  --large-text-font-size: 17px;
}

/*  Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
* {
  margin: 0;
}

/* Add accessible line-height and Improve text rendering */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: var(--primary-font-family);
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/*  Create a root stacking context */
#root,
#__next {
  isolation: isolate;
}

main {
  flex: 1;
}

.page {
  padding: 0px 0px 16px 16px;
}

.card-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-right: 16px;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.card-container::-webkit-scrollbar {
  width: 8px;
  display: none;
}

.card-container::-webkit-scrollbar-track {
  background: transparent;
}

.card-container:-webkit-scrollbar-thumb {
  background-color: var(--dropdown-btn-border-color, #888);
  border-radius: 4px;
}

.card {
  font-size: 14px;
  padding: 16px 108px 16px 16px;
  background: linear-gradient(90deg, #003d75 0%, #0067b1 70%);
  display: flex;
  min-width: 328px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  height: 120px;
}

.card-title {
  color: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-title span {
  font-weight: 700;
  margin-top: 32px;
  font-size: 12px;
  font-family: var(--primary-font-family);
}

.card-title span a {
  text-decoration: none !important;
  color: var(--text-reversed);
}

.card2 {
  background: linear-gradient(90deg, #2c6e00 0%, #3c9600 100%) !important;
}

.card h4 {
  font-size: 14px;
  font-family: var(--primary-font-family);
  line-height: 20px;
  display: flex;
  font-weight: 400;
}

#cardFooter p {
  padding-right: 16px;
  color: var(--text-secondary);
  text-align: left;
}

.vector-bottom {
  width: 200px;
  height: 64px;
  position: absolute;
  right: 0px;
  bottom: 0px;
  z-index: 2;
  background: url(./assets/Vector.svg) no-repeat center;
}

/* Card */
.card-ellipse-top {
  position: absolute;
  bottom: 86px;
  right: -6px;
  width: 64px;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  overflow: hidden;
  opacity: 100%;
}

.ellipse-center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  overflow: visible;
  bottom: 49%;
  left: 81%;
  transform: translate(-50%, 50%);
  z-index: 9;
}

.card-unit-value {
  gap: 4px;
}

.card-unit-value::before {
  content: "";
  position: absolute;
  background-size: cover;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: rgb(222, 241, 255, 0.1);
  -webkit-mask-image: linear-gradient(
    to left,
    #000 0%,
    #000 50%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to left,
    #000 0%,
    #000 50%,
    transparent 100%
  );
  mask-image: linear-gradient(to left, #000 0%, #000 50%, transparent 100%);
}

.card-unit-value h4,
p {
  color: white;
}

.card-unit-value h4 {
  font-weight: 700;
  font-size: 24px;
  font-family: var(--primary-font-family);
}

.card-unit-value p {
  display: flex;
  flex-direction: column;
  gap: -8px;
}

.card-unit-value span {
  margin-top: -12px;
}

@media (min-width: 768px) {
  .page-container {
    max-width: 574px;
    margin: 0 auto;
  }

  nav ul {
    justify-content: left;
  }

  .travel-container {
    max-width: 574px;
    margin: 0 auto;
  }

  #donutCustomLegend {
    width: 100% !important;
    justify-content: center !important;
  }

  .bubble-pointer {
    right: 28px !important;
  }
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0 16px;
  gap: 32px;
  overflow: hidden;
  display: flex;
  border-bottom: 1px solid var(--stroke-divider);
}

nav ul li {
  display: inline-block;
  background: none;
  border: none;
  padding: 16px 0 12px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-primary);
  position: relative;
  cursor: pointer;
}

nav ul li.active {
  color: var(--bg-primary-default);
  font-weight: 700;
}

nav ul li.active::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--bg-primary-default);
  transition: transform 0.3s ease;
}

nav ul li:not(.active)::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--bg-primary-default);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav ul li:hover::after {
  transform: scaleX(1);
}

.header {
  position: sticky;
  top: 0;
  z-index: 99999;
  background: #fff;
  overflow: hidden;
}

.content-page.active {
  display: block;
  /* Show the active page */
  opacity: 1;
}

.content-page {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Travels Section Start */

.sub-header, .alerts-actions-header .country-icon {
  display: flex;
  width: 100%;
  flex-direction: column;
  border: 1px solid var(--border-default);
  padding-left: 16px;
  border-radius: 8px;
  position: relative;
}

.sub-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.sub-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-direction: row;
  padding: 16px 16px 16px 0px;
}

.sub-header-content p {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: start;
  color: var(--text-primary);
}

.sub-header-content p span {
  color: var(--text-secondary);
}

.sub-header-content h4 {
  color: var(--text-interaction);
}

.feature-card-container {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.feature-card {
  background-color: var(--bg-secondary);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border-radius: 8px;
  gap: 8px;
}

.feature-card p {
  color: var(--text-secondary);
}

.feature-card-content {
  text-align: center;
}

.date-visited,
.travel-note {
  color: var(--text-secondary);
}

.travel-note {
  text-align: left;
  padding: 16px 16px 16px 0px;
  font-size: 12px;
}

li.country-template {
  align-items: center !important;
  display: flex;
}

.sub-header-content .chevron-down {
  width: 24px;
  height: 24px;
}
.chevron-down {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.chevron-down.expanded {
  transform: rotate(180deg);
}
.options {
  position: relative; /* anchor for the absolute dropdown */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.country-list {
  max-height: 288px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  padding-left: 16px;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 9;
}
.country-list li {
  list-style: none;
  cursor: pointer;
}

.country-list li:not(:last-child) .sub-header-content {
  border-bottom: 1px solid var(--stroke-divider);
}

/* Half-donut chart start */
#donutChartTravelsLabel {
  position: absolute;
  top: 37px;
  width: 100%;
  gap: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#donutChartTravelsLabel .text-aggregated {
  text-align: center;
}

#donutChartTravelsLabel .text-aggregated .label {
  color: var(--text-secondary);
}

.travels-donut-chart-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  background: linear-gradient(to bottom, #ffffff, #eff9fd);
  border-radius: 8px;
  padding: 16px;
}

#travelsDonutChartContainer {
  position: relative;
  margin: 0 auto;
  width: 208px;
  height: 125px;
}

#travelsDonutChart {
  position: relative;
  z-index: 1;
}
#travelDonutCustomLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 296px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  #travelDonutCustomLegend {
    display: grid;
    justify-content: space-between;
    grid-template-columns: repeat(3, 93px);
    row-gap: 8px;
    width: 360px;
  }

  .legend-item-travels {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 16px !important;
    gap: 4px;
    width: 93px !important;
  }
  .legend-dot-travels {
    width: 12px !important;
    height: 12px !important;
    border-radius: 8px;
    margin-right: 4px;
  }

  .conversion {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 16px !important;
  }

  .card-container {
    mask-image: linear-gradient(to right, black 97%, transparent 100%);
    /*Safari and older Chrome-based browsers */
    -webkit-mask-image: linear-gradient(to right, black 97%, transparent 100%);
  }
}

/* Half-donut chart end */

.legend-item-travels {
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legend-dot-travels {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 4px !important;
  margin-right: 4px;
}

.card-icon {
  width: 32px;
}

.legend-percentage-travels,
.legend-label,
.conversion {
  color: var(--text-secondary);
}
/* Travels Section End */

/* Savings Section Start */
.bar-chart-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: var(--text-primary);
}

.chart-container {
  width: 100%;
}

#monthlyChart {
  width: 100% !important;
}

.savings-body {
  color: var(--text-primary);
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #eff9fd 100%);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border: 1px solid var(--border-default);
}

.savings-body p {
  color: var(--text-secondary);
  text-align: start;
}

.chart-info {
  display: flex;
  gap: 8px;
  flex-direction: row;
  align-items: flex-start;
}

.month-info {
  flex: 1;
}

.month-info h6 {
  text-align: start;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--text-secondary);
}

.month-info p {
  text-align: start;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-secondary);
}

.month-info .positive-increase,
.value-label.positive-increase {
  color: var(--text-success) !important;
}

.month-info .negative-increase,
.value-label.negative-increase {
  color: var(--text-error) !important;
}

.savings-summary-section,
.travels-summary-section {
  padding-right: 16px;
  display: flex;
  flex-direction: column;
}

.travels-summary-section-header {
  margin-bottom: 16px;
}

.travels-summary-section-content {
  display: flex;
  gap: 16px;
  flex-direction: column;
}

.savings-header .empty-account-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 16px;
}

.empty-account-container h2,
p {
  text-align: center;
}

.empty-account-container img {
  width: 120px;
}

.savings-header {
  margin-top: 16px;
  background-color: var(--text-reversed);
}

.empty-currency {
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.savings-header p {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-secondary);
}

.currency-selector {
  display: flex;
  align-items: center;
}

/* Custom colors for currency cards */
.currency-selector .currency-card:nth-child(1) {
  background-color: var(--currency-card-bg-1);
}
.currency-selector .currency-card:nth-child(2) {
  background-color: var(--currency-card-bg-2);
}
.currency-selector .currency-card:nth-child(3) {
  background-color: var(--currency-card-bg-3);
}
.currency-selector .currency-card:nth-child(4) {
  background-color: var(--currency-card-bg-4);
}
.currency-selector .currency-card:nth-child(5) {
  background-color: var(--currency-card-bg-5);
}

.currency-selector .currency-card {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  width: 65.6px;
  height: 48px;
  padding: 8px 13px;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
  cursor: pointer;
}

.currency-card.active {
  position: relative;
  border: 1px solid var(--border-default);
  border-bottom: none;
  background-color: var(--bg-reverse) !important;
  z-index: 2;
}

.currency-card.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0px;
  right: 0px;
  height: 1px;
  background-color: var(--bg-reverse);
}

.currency-selector.five-cards .currency-card {
  flex: 1;
}

.account-tabs {
  display: flex;
  padding: 0 16px 0 16px;
  gap: 32px;
  border: 1px solid var(--border-default);
  border-bottom: none;
}

.tab-btn {
  background: none;
  border: none;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-primary);
  position: relative;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--bg-primary-default);
  font-weight: 700;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--bg-primary-default);
  transition: transform 0.3s ease;
}

.tab-btn:not(.active)::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--bg-primary-default);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-btn:hover::after {
  transform: scaleX(1);
}

.empty-account-content {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-secondary);
}

/* Custom Bar Chart Styles */
.custom-bar-chart {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
}

.custom-bar-chart .bar-row {
  display: flex;
  align-items: center;
  height: 20px;
  gap: 4px;
}

.custom-bar-chart .bar-label {
  color: var(--text-secondary);
  min-width: 27px;
  text-align: left;
}

.custom-bar-chart .bar-container {
  flex: 1;
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.custom-bar-chart .bar {
  height: 20px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s,
    transform 0.5s;
  opacity: 1;
  transform: scaleX(0.95);
  flex: 0 1 auto;
  margin-right: 4px;
  min-width: 0;
}

.custom-bar-chart .bar.animated {
  opacity: 1;
  transform: scaleX(1);
}

/* Custom bar colors */
.custom-bar-chart .bar-row:nth-child(1) .bar {
  background: var(--bar-1);
}
.custom-bar-chart .bar-row:nth-child(2) .bar {
  background: var(--bar-2);
}
.custom-bar-chart .bar-row:nth-child(3) .bar {
  background: var(--bar-3);
}
.custom-bar-chart .bar-row:nth-child(4) .bar {
  background: var(--bar-4);
}
.custom-bar-chart .bar-row:nth-child(5) .bar {
  background: var(--bar-5);
}
.custom-bar-chart .bar-row:nth-child(6) .bar {
  background: var(--bar-6);
}

.custom-bar-chart .bar-flex {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.custom-bar-chart .value-label {
  position: absolute;
  right: -8px;
  top: 50%;
  color: var(--text-secondary);
  transform: translateY(-50%);
  white-space: nowrap;
  margin-left: 8px;
  z-index: 1;
}

@media (min-width: 355px) {
  .custom-bar-chart .value-label {
    padding: 0 4px;
    border-radius: 4px;
  }

  /* Value label background colors for each bar */
  .custom-bar-chart .bar-row:nth-child(1) .value-label {
    backdrop-filter: blur(4px);
  }
  .custom-bar-chart .bar-row:nth-child(2) .value-label {
    backdrop-filter: blur(4px);
  }
  .custom-bar-chart .bar-row:nth-child(3) .value-label {
    backdrop-filter: blur(4px);
  }
  .custom-bar-chart .bar-row:nth-child(4) .value-label {
    backdrop-filter: blur(4px);
  }
  .custom-bar-chart .bar-row:nth-child(5) .value-label {
    backdrop-filter: blur(4px);
  }
  .custom-bar-chart .bar-row:nth-child(6) .value-label {
    backdrop-filter: blur(4px);
  }
}

.custom-bar-chart .bar-divider {
  flex: 20;
  height: 2px;
  background: var(--border-default);
  border-radius: 1px;
  min-width: 16px;
  align-self: center;
  margin: 0;
}

/* Donut Chart Styles */
#donutChartCenterLabel {
  position: absolute;
  top: 32px;
  width: 100%;
  gap: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#donutChartCenterLabel .text-aggregated {
  text-align: center;
}

#donutChartCenterLabel .text-aggregated .label {
  color: var(--text-secondary);
}

.donut-chart-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

#savingsDonutChartContainer {
  position: relative;
  margin: 0 auto;
  width: 208px;
}

#savingsDonutChart {
  position: relative;
  z-index: 1;
}

.globe-icon {
  width: 24px;
}

#donutCustomLegend {
  display: flex;
  flex-direction: row;
  margin: 0 auto;
  gap: 16px;
  width: 272px;
  flex-wrap: wrap;
}

#donutCustomLegend.left {
  justify-content: flex-start;
}

#donutCustomLegend.center {
  justify-content: center;
}

#donutCustomLegend > div {
  display: flex;
  justify-content: space-between;
}

.legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 77px;
  position: relative;
}

.legend-percentage,
.legend-percentage-travels {
  display: flex;
  align-items: center;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

#donutCurrencyBubble {
  padding: 8px 4px;
  border-radius: 8px;
  background-color: var(--bg-disabled);
  color: var(--text-secondary);
  max-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}

.bubble-pointer {
  position: absolute;
  bottom: -16px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid var(--bg-disabled);
  z-index: 2;
}
/* Savings Section End */

/* Alerts section start */
.alerts-section-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-flow: wrap;
  padding-right: 16px;
}

.alerts-actions-header {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px;
}

.alerts-edit-button,
.alerts-create-button {
  color: var(--bg-primary-default);
  font-weight: 700;
  font-size: 14px;
}

.alerts-remove-button {
  position: absolute;
  top: -5px;
  right: -5px;
  border-radius: 100%;
  width: 24px;
  height: 24px;
  background: var(--text-error);
  text-align: center;
  padding: 4px;
}

.alerts-remove-button .minus {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alerts-remove-button .minus span {
  width: 10px;
  height: 0px;
  border: var(--text-reversed) solid 1px;
}

.alerts-card {
  font-size: 14px;
  padding: 16px;
  background: linear-gradient(
    180deg,
    var(--bg-success-light) 0%,
    var(--bg-tertiary) 100%
  );
  display: flex;
  width: 160px;
  border-radius: 8px;
  position: relative;
  height: 112px;
  justify-content: space-between;
  border: 1px solid var(--colour-stroke-border-default, var(--border-default));
  flex-direction: column;
  gap: 8px;
}

.alerts-card.create {
  background: linear-gradient(
    180deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
}

.alerts-card img.arrow {
  transform: rotate(180deg);
  width: 16px;
  height: 16px;
}

.alerts-currency-conversions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.alerts-rate {
  display: flex;
  flex-direction: column;
}

.alerts-card .country-icon {
  background-size: 200%;
  background-repeat: no-repeat;
  background-position: 40%;
  width: 32px;
  height: 32px;
  border-radius: 100%;
}

.alerts-actions-footer {
  position: absolute;
  bottom: 0;
  width: 360px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px;
  padding-bottom: 32px;
  border: solid 1px #80808082; /* TODO REMOVE LATER */
}

.alerts-actions-footer button {
  width: 328px;
  min-width: 96px;
  border: 0;
  border-radius: 100px;
  padding: 12px 24px;
  background-color: var(--bg-primary-default);
  color: var(--text-reversed);
}
/* Alerts section end */
