@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");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

html {
  user-select: none;
}

.off {
  display: none !important;
}

.template {
  display: none;
}

.ui-loader {
  display: none;
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}



/*  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); */
  font-family: "Inter", sans-serif;
}

/* 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;
}

.content-page.active {
  display: block;
  /* Show the active page */
  opacity: 1;
}

.content-page {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page {
  padding: 16px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

#cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  padding-bottom: 70px;
}

#cardsContainer {
  border-radius: 8px;
  margin-right: 16px;
  flex: 1;
}

#cardsContainer {
  border-radius: 8px;
  margin-right: 16px;
  flex: 1;
  border-radius: 8px;
  margin-right: 16px;
  flex: 1;
}

.card {
  /* padding-right: 16px; */
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  z-index: 1;
  background: inherit;
  transform: translateX(0);
}

.card:first-of-type {
  margin-top: 16px;
}

.card:last-of-type {
  border-bottom: 0;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
  border-radius: 8px;
  padding: 16px;
}

.card-body:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-body-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  color: var(--text-primary);
}

.card-body-content-details {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.card-body-content-details p {
  font-size: var(--normal-text-font-size);
  color: var(--text-muted);
}

.card-body-content-details span {
  font-size: var(--xlarge-text-font-size);
  color: var(--text-muted);
}

.card-body-content-icon {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 16px;
}

.card-body-content-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body-chart {
  /* width: calc(100% - 120px); */
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}


.progress-container {
  width: 100%;
}

.progress-bar-wrap {
  position: relative;
  width: 100%;
  margin: 0.5rem 0;
}

.progress-bar {
  display: flex;
  width: 100%;
  height: 12px;
  position: relative;
  z-index: 1;
}

.segment {
  position: relative;
  height: 100%;
  background: var(--border-default);
  flex-shrink: 0;
  border-radius: 8px;
  width: 100%;
}

.segment .fill {
  height: 100%;
  background: var(--summary-green);
  transition: width 0.3s;
  border-radius: 8px;
}

.segment .fill-green {
  background: var(--summary-green);
}

.segment .fill-red {
  background: var(--summary-red);
}

.segment .fill-amber {
  background: var(--summary-amber);
}

.progress-labels-top {
  margin-bottom: 8px;
}

.progress-labels-top .label-segment-container,
.progress-labels-bottom .label-segment-container {
  display: flex;
  flex-direction: row;
  padding-right: 1px;
  flex-shrink: 0;
  align-items: center;
  width: 100%;
}

.label-segment-left,
.label-segment-right {
  white-space: nowrap;
  flex-shrink: 0;
}

.label-segment-left {
  text-align: left;
  display: flex;
  align-items: center;
  flex: 1;
  margin-right: 2px;
}

/* .label-segment-left img { */
.label-segment-left span {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.label-segment-right {
  text-align: right;
  width: 45%;
  white-space: normal;
  word-break: break-word;
}

.label-segment-right h4 {
  color: var(--text-primary);
}

.label-segment-left p,
.label-segment-right p {
  font-size: var(--normal-text-font-size);
  font-weight: 400;
}

.label-segment-left p span,
.label-segment-right p span {
  color: var(--text-primary);
  font-size: var(--normal-text-font-size);
  font-weight: 700;
}

.progress-labels-bottom .label-segment-left p,
.progress-labels-bottom .label-segment-left p span {
  color: var(--text-secondary) !important;
}

.progress-labels-bottom .label-segment-right p {
  font-size: var(--normal-text-font-size);
}

.progress-labels-bottom .label-segment-right p span {
  font-size: var(--medium-text-font-size);
}

.progress-labels-bottom .label-segment-left p,
.progress-labels-bottom .label-segment-left p span {
  color: var(--text-secondary) !important;
}

.progress-labels-bottom .label-segment-right p {
  font-size: var(--normal-text-font-size);
}

.progress-labels-bottom .label-segment-right p span {
  font-size: var(--medium-text-font-size);
}

.card.warning .label-segment-right h4,
.card.amber .label-segment-right h4 {
  color: var(--summary-amber) !important;
}

.card.error .label-segment-right h4,
.card.red .label-segment-right h4 {
  color: var(--summary-red) !important;
}

.card.warning .fill,
.card.amber .fill {
  background: var(--summary-amber) !important;
}

.card.error .fill,
.card.red .fill {
  background: var(--summary-red) !important;
}

/* Card Edit Mode Styles */
.card:has(.card-body-content:not([style*="display: none"])) {
  cursor: pointer;
  transition: transform 0.2s;
}

.swipe-wrapper:hover {
  overflow: visible;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.card-edit-mode {
  width: 100%;
}

.edit-mode-title {
  font-size: var(--xlarge-text-font-size);
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: break-word;
  word-break: break-word;
}

.edit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: var(--normal-text-font-size);
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: var(--normal-text-font-size);
  background: var(--bg-reverse);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--chart-data-4);
  box-shadow: 0 0 0 3px rgba(75, 123, 236, 0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: var(--normal-text-font-size);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.btn-save {
  background: var(--btn-bg-gradient);
  color: var(--text-reversed);
}

.btn-save:hover {
  transform: translateY(-2px);
}

.btn-cancel:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-text>.material-symbols-outlined {
  margin-right: 8px;
}

.card-edit-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  cursor: auto;
}

.card-edit-mode-header .edit-title {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 8px;
}

/* Summary chart styles */
#summaryChartCenterLabel {
  position: absolute;
  top: 45px;
  width: 250px;
  gap: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

#summaryChartCenterLabel .text-aggregated {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#summaryChartCenterLabel .text-aggregated .label {
  color: var(--text-secondary);
}

.summary-chart-container {
  place-items: center;
  display: grid;
  padding: 16px;
  border: 1px solid var(--border-default);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  background-color: var(--bg-secondary);
}

#summaryChartContainer {
  width: 250px;
  position: relative;
}

#summaryChartCustomLegend {
  display: flex;
  flex-direction: row;
  margin: 0 auto;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
  font-size: var(--normal-text-font-size);
  justify-content: center;
  margin-top: 10px;
}

.remaining-days-text {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-interaction);
}

#summaryChartCustomLegend.left {
  justify-content: flex-start;
}

#summaryChartCustomLegend.center {
  justify-content: center;
}

#summaryChartCustomLegend>div {
  display: flex;
  justify-content: space-between;
}

.icon {
  width: 25px;
  display: inline-block;
  padding: 4px;
  background-repeat: no-repeat;
  height: 25px;
  margin: 0px 10px 0px 0px;
}

.btn-text {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Floating Action Button --- */
.fab-container {
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: center;
  z-index: 90;
  padding: 0px 24px 0px 24px;
  width: 100%;
  pointer-events: auto;

}

.btn-add-budget {
  pointer-events: auto;
  background: var(--btn-bg-gradient);
  color: var(--text-reversed) !important;
  border: none;
  padding: 16px 24px;
  border-radius: 24px !important;
  font-size: var(--large-text-font-size);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  width: 100% !important;
  max-width: 500px;
  text-align: center;
  text-shadow: none !important;
}

.btn-add-budget:hover {
  transform: translateY(-2px);
}

.btn-add-budget:active {
  transform: scale(0.98);
  background-color: #004a99;
}

.btn-clear {
  background: none !important;
  border: none;
  color: var(--text-interaction) !important;
  font-size: var(--normal-text-font-size);
  font-weight: 700;
  cursor: pointer;
  width: 50px !important;
  text-align: right;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  text-shadow: none !important;
}

.btn-clear:active {
  opacity: 0.6;
}

/* --- Slide-up drawer Overlay --- */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Aligns drawer to bottom */
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- The Slide-up Card --- */
.slide-up-drawer {
  background-color: var(--bg-tertiary);
  width: 100%;
  /* height: 90vh; */
  /* Covers 90% of screen */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 800px;
  margin: 0px auto;
}

.drawer-overlay.active .slide-up-drawer {
  transform: translateY(0);
}

/* --- drawer Header --- */
.drawer-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-default);
  background-color: var(--bg-tertiary);
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text-secondary);
  flex-grow: 1;
  text-align: center;
}

.close-drawer-btn {
  position: static;
  transform: none;
  background: none !important;
  border: none;
  font-size: 28px;
  color: var(--text-primary) !important;
  cursor: pointer;
  padding: 0;
  width: 40px !important;
  text-align: left;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* --- drawer Content (Grid) --- */
.drawer-content {
  overflow-y: auto;
  max-height: 70vh;
  padding: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  justify-items: center;
}

.category-section {
  margin-bottom: 30px;
}

.section-title {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  border-bottom: none;
  padding-bottom: 5px;
  margin-bottom: 0 !important;
}

/* --- Category Item --- */
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 100%;
  text-align: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  transition: transform 0.2s;
}

.category-item:selected .icon-circle {
  box-shadow: 0 0 0 3px rgba(var(--bg-success-rgb), 0.3);
}

.category-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
  max-width: 80px;
}

/* --- Selection State --- */
.check-badge {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background-color: var(--bg-selected);
  border-radius: 50%;
  border: 2px solid var(--text-reversed);
}

.check-badge::after {
  content: "✓";
  color: var(--text-reversed);
  font-size: 10px;
  font-weight: bold;
  position: absolute;
  left: 4.5px;
  top: 1px;
}

.category-item.selected .check-badge {
  display: block;
}

.selected>.icon-circle {
  box-shadow: 0 0 0 3px var(--bg-selected);
  transform: scale(1.05);
}

/* --- drawer Footer --- */
.drawer-footer {
  padding: 20px 24px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.btn-done {
  width: 100%;
  max-width: 500px;
  background: var(--btn-bg-gradient);
  color: var(--bg-reverse) !important;
  border: none;
  padding: 16px;
  border-radius: 30px !important;
  font-size: var(--large-text-font-size);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 29, 64, 0.3);
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  text-shadow: none !important;
}

.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle i,
.icon-circle span {
  color: var(--bg-tertiary);
  font-size: 24px;
}

.btn-done:active {
  transform: scale(0.98);
}

.btn-done:hover {
  background-color: var(--bg-active);
}

.swipe-wrapper {
  position: relative;
  touch-action: pan-y;
}

.swipe-wrapper.is-deleting {
  transition: height 0.3s ease, opacity 0.25s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(-16px);
  transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.swipe-actions {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  border-radius: 9px 0px 0px 9px;
}

.btn-delete-swipe {
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: var(--medium-text-font-size);
  cursor: pointer;
}

.wrapper-delete-swipe + div {
  color: var(--text-primary);
}
.wrapper-delete-swipe {
  padding: 30px;
  border-radius: 50%;
  background-color: var(--chart-data-3);
  color: var(--text-reversed);
  height: 10px;
  width: 10px;
  margin: 5px auto;
}
.wrapper-delete-swipe > .material-symbols-outlined {
  top: -15px;
  position: relative;
  left: -14px;
  font-size: 30px;
}

.swipe-actions {
  pointer-events: auto;
  z-index: 0;
}

.card {
  pointer-events: auto;
}

.card.is-open {
  pointer-events: none;
  /* allow clicks to pass through */
}

.text-red {
  color: var(--chart-data-3) !important;
}

.action-button {
  margin-right: 16px;
  padding: 8px;
  background: var(--bg-alert-alt);
  color: var(--text-reversed);
  border-radius: 6px;
}

/* Input Field +/ - Stepper Styles */
.stepper {
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  gap: 1rem;
}

.stepper button {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  border: none;
  background: var(--bg-accent-light);
  color: var(--text-interaction);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.stepper button:hover {
  background: var(--bg-accent-light-hover);
}

.amount {
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.amount-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.amount-currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.edit-total-amount {
  min-width: 60px;
  width: auto;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  border: none;
  background: transparent;
  outline: none;
  padding: 2px 4px;
}

.edit-total-amount::-webkit-outer-spin-button,
.edit-total-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.edit-total-amount[type="number"] {
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.btn-delete {
  cursor: pointer;
}

.btn-delete:hover {
  color: var(--text-secondary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-right: 10px;
}

.section-checkbox {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease;
}

.section-checkbox:active {
  transform: scale(0.9);
}

.label-segment-left h3 {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.btn,
.card,
.category-item,
.swipe-actions button {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active,
.category-item:active {
  transform: scale(0.9);
}

.card-body-content {
  transition: box-shadow 0.55s ease, background-color 0.5s ease;
}

.saved {
  box-shadow: 0px 0px 10px 7px var(--bg-accent-light);
  background-color: var(--bg-accent-light);
  border-radius: 15%;
}

.label-segment-right p {
  opacity: 0.65;
  font-size: 0.85em;
}

.checkbox-container {
  display: flex;
  gap: 4px;
}

.checkbox-container .select-all {
  color: var(--text-interaction);
}

.drawer-search-container {
  padding: 12px 20px;
  background-color: var(--bg-secondary);
  /* Matches your light background */
  border-bottom: 1px solid var(--border-default);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-reverse);
  border: 1px solid var(--text-muted);
  border-radius: 12px;
  padding: 8px 12px;
  gap: 10px;
}

.search-box span {
  color: var(--text-tertiary);
  font-size: var(--xlarge-text-font-size);
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: var(--medium-text-font-size);
  color: var(--text-primary);
  background: transparent;
}

/* Helper class for filtering */
.hidden-category {
  display: none !important;
}

.no-budgets-content svg {
  width: 60%;
  margin: auto;
  height: 40%;
}

.no-budgets-content {
  animation-name: fadeIn;
  animation-duration: 0.5s;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.arrow-down {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 20px solid var(--bg-active);
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  bottom: 78px;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

.no-budgets-content h2 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.no-budgets-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  text-align: center;
  margin-bottom: 32px;
  padding: 0 20px;
  line-height: 1.4;
}

/* Offline Overlay Styles */
.offline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f4f9;
  /* Match your page background */
  z-index: 10000;
  /* Highest priority */
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offline-overlay.active {
  display: flex;
  opacity: 1;
}

.offline-content {
  text-align: center;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
}

.offline-icon-container {
  margin-bottom: 1.5rem;
  color: #9ca3af;
}

.offline-icon-container svg {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.offline-content h2 {
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.5rem;
}

.offline-content p {
  margin-bottom: 2rem;
  color: #666;
  line-height: 1.5;
}

.btn-retry {
  background-color: #000;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-retry:active {
  transform: scale(0.95);
}

/* Offline Overlay Styles */
.offline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f4f9;
  /* Match your page background */
  z-index: 10000;
  /* Highest priority */
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offline-overlay.active {
  display: flex;
  opacity: 1;
}

.offline-content {
  text-align: center;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
}

.offline-icon-container {
  margin-bottom: 1.5rem;
  color: #9ca3af;
}

.offline-icon-container svg {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.offline-content h2 {
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.5rem;
}

.offline-content p {
  margin-bottom: 2rem;
  color: #666;
  line-height: 1.5;
}

.btn-retry {
  background-color: #000;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-retry:active {
  transform: scale(0.95);
}

/* =========================
   Insight card styles
   ========================= */
.inner-container-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}
.inner-container {
  position: relative;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none; /* Firefox */
  /* scroll-snap-type: x mandatory; */
}
.inner-container:active {
  cursor: grabbing;
}
.inner-container::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}
.inner-container > :only-child {
  margin-inline: auto;
  width:100%;
}
.inner-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(280px, 85%, 520px);
  max-width: 100%;
  margin-right: 10px;
  padding: 10px;
  background: var(--bg-disabled);
  border: 2px solid var(--bg-disabled);
  border-radius: 6px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
  scroll-snap-align: center;
}
.inner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #454545;
  min-width: 0;
}
.inner-content .text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.inner-content .heading {
  font-weight: 700;
  font-size: 15px;
}
.inner-content .para {
  font-size: 13px;
  line-height: 1.5;
}
.inner-content .heading,
.inner-content .para {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.inner-content .img {
  width: 25%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fade-overlay {
  position: absolute;
  top: 0;
  height: 100%;
  width: 60px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}
.fade-overlay-right {
  right: 0;
  background: linear-gradient(
    to left,
    var(--bg-secondary),
    rgba(255, 255, 255, 0)
  );
}
.fade-overlay-left {
  left: 0;
  background: linear-gradient(
    to right,
    var(--bg-secondary),
    rgba(255, 255, 255, 0)
  );
}
.btn-insight {
  pointer-events: auto;
  background: var(--btn-bg-gradient);
  color: var(--text-reversed) !important;
  border: none;
  padding: 4px 10px;;
  border-radius: 24px !important;
  font-size: var(--small-text-font-size);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  width: 100% !important;
  max-width: 500px;
  text-align: center;
  text-shadow: none !important;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 380px) {
  .inner-content {
    flex-direction: column;
    align-items: stretch;
  }

  .inner-content .img {
    /* width: clamp(80px, 85%, 160px); */
    width: 100px;
    margin: 0px auto;
  }

  .btn-insight {
    width: 100%;
  }
  .inner-content .heading {
    font-size: 14px;
  }

  .inner-content .para {
    font-size: 12px;
  }

  .inner-card {
    padding: 12px;
  }
}
/* =========================
   End insight card styles
   ========================= */