/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
@layer properties {
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
    *, :before, :after, ::backdrop {
      --tw-translate-x: 0;
      --tw-translate-y: 0;
      --tw-translate-z: 0;
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-space-y-reverse: 0;
      --tw-border-style: solid;
      --tw-gradient-position: initial;
      --tw-gradient-from: #0000;
      --tw-gradient-via: #0000;
      --tw-gradient-to: #0000;
      --tw-gradient-stops: initial;
      --tw-gradient-via-stops: initial;
      --tw-gradient-from-position: 0%;
      --tw-gradient-via-position: 50%;
      --tw-gradient-to-position: 100%;
      --tw-leading: initial;
      --tw-font-weight: initial;
      --tw-shadow: 0 0 #0000;
      --tw-shadow-color: initial;
      --tw-shadow-alpha: 100%;
      --tw-inset-shadow: 0 0 #0000;
      --tw-inset-shadow-color: initial;
      --tw-inset-shadow-alpha: 100%;
      --tw-ring-color: initial;
      --tw-ring-shadow: 0 0 #0000;
      --tw-inset-ring-color: initial;
      --tw-inset-ring-shadow: 0 0 #0000;
      --tw-ring-inset: initial;
      --tw-ring-offset-width: 0px;
      --tw-ring-offset-color: #fff;
      --tw-ring-offset-shadow: 0 0 #0000;
      --tw-outline-style: solid;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
      --tw-backdrop-blur: initial;
      --tw-backdrop-brightness: initial;
      --tw-backdrop-contrast: initial;
      --tw-backdrop-grayscale: initial;
      --tw-backdrop-hue-rotate: initial;
      --tw-backdrop-invert: initial;
      --tw-backdrop-opacity: initial;
      --tw-backdrop-saturate: initial;
      --tw-backdrop-sepia: initial;
      --tw-duration: initial;
    }
  }
}

@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --color-red-50: oklch(97.1% .013 17.38);
    --color-red-100: oklch(93.6% .032 17.717);
    --color-red-200: oklch(88.5% .062 18.334);
    --color-red-300: oklch(80.8% .114 19.571);
    --color-red-400: oklch(70.4% .191 22.216);
    --color-red-500: oklch(63.7% .237 25.331);
    --color-red-600: oklch(57.7% .245 27.325);
    --color-red-700: oklch(50.5% .213 27.518);
    --color-red-800: oklch(44.4% .177 26.899);
    --color-red-900: oklch(39.6% .141 25.723);
    --color-yellow-100: oklch(97.3% .071 103.193);
    --color-yellow-600: oklch(68.1% .162 75.834);
    --color-green-50: oklch(98.2% .018 155.826);
    --color-green-100: oklch(96.2% .044 156.743);
    --color-green-200: oklch(92.5% .084 155.995);
    --color-green-300: oklch(87.1% .15 154.449);
    --color-green-400: oklch(79.2% .209 151.711);
    --color-green-500: oklch(72.3% .219 149.579);
    --color-green-600: oklch(62.7% .194 149.214);
    --color-green-700: oklch(52.7% .154 150.069);
    --color-green-800: oklch(44.8% .119 151.328);
    --color-green-900: oklch(39.3% .095 152.535);
    --color-blue-50: oklch(97% .014 254.604);
    --color-blue-100: oklch(93.2% .032 255.585);
    --color-blue-300: oklch(80.9% .105 251.813);
    --color-blue-400: oklch(70.7% .165 254.624);
    --color-blue-500: oklch(62.3% .214 259.815);
    --color-blue-600: oklch(54.6% .245 262.881);
    --color-blue-700: oklch(48.8% .243 264.376);
    --color-blue-900: oklch(37.9% .146 265.522);
    --color-purple-500: oklch(62.7% .265 303.9);
    --color-purple-600: oklch(55.8% .288 302.321);
    --color-purple-700: oklch(49.6% .265 301.924);
    --color-gray-50: oklch(98.5% .002 247.839);
    --color-gray-100: oklch(96.7% .003 264.542);
    --color-gray-200: oklch(92.8% .006 264.531);
    --color-gray-300: oklch(87.2% .01 258.338);
    --color-gray-400: oklch(70.7% .022 261.325);
    --color-gray-500: oklch(55.1% .027 264.364);
    --color-gray-600: oklch(44.6% .03 256.802);
    --color-gray-700: oklch(37.3% .034 259.733);
    --color-gray-800: oklch(27.8% .033 256.848);
    --color-gray-900: oklch(21% .034 264.665);
    --color-black: #000;
    --color-white: #fff;
    --spacing: .25rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --text-xs: .75rem;
    --text-xs--line-height: calc(1 / .75);
    --text-sm: .875rem;
    --text-sm--line-height: calc(1.25 / .875);
    --text-base: 1rem;
    --text-base--line-height: calc(1.5 / 1);
    --text-lg: 1.125rem;
    --text-lg--line-height: calc(1.75 / 1.125);
    --text-xl: 1.25rem;
    --text-xl--line-height: calc(1.75 / 1.25);
    --text-2xl: 1.5rem;
    --text-2xl--line-height: calc(2 / 1.5);
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --leading-relaxed: 1.625;
    --radius-md: .375rem;
    --radius-lg: .5rem;
    --radius-xl: .75rem;
    --radius-2xl: 1rem;
    --animate-spin: spin 1s linear infinite;
    --blur-sm: 8px;
    --default-transition-duration: .15s;
    --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}

@layer base {
  *, :after, :before, ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  html, :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    line-height: 1.5;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }

  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    -webkit-text-decoration: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    vertical-align: middle;
    display: block;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  ::placeholder {
    opacity: 1;
  }

  @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentColor;
    }

    @supports (color: color-mix(in lab, red, red)) {
      ::placeholder {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-year-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-month-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-day-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-hour-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-minute-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-second-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-millisecond-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button, input:where([type="button"], [type="reset"], [type="submit"]) {
    appearance: button;
  }

  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  ::-webkit-outer-spin-button {
    height: auto;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer components;

@layer utilities {
  .collapse {
    visibility: collapse;
  }

  .invisible {
    visibility: hidden;
  }

  .visible {
    visibility: visible;
  }

  .absolute {
    position: absolute;
  }

  .fixed {
    position: fixed;
  }

  .relative {
    position: relative;
  }

  .static {
    position: static;
  }

  .sticky {
    position: sticky;
  }

  .inset-0 {
    inset: calc(var(--spacing) * 0);
  }

  .top-1\/2 {
    top: 50%;
  }

  .top-2\.5 {
    top: calc(var(--spacing) * 2.5);
  }

  .top-3 {
    top: calc(var(--spacing) * 3);
  }

  .top-full {
    top: 100%;
  }

  .right-0 {
    right: calc(var(--spacing) * 0);
  }

  .right-3 {
    right: calc(var(--spacing) * 3);
  }

  .left-0 {
    left: calc(var(--spacing) * 0);
  }

  .left-2 {
    left: calc(var(--spacing) * 2);
  }

  .isolate {
    isolation: isolate;
  }

  .z-10 {
    z-index: 10;
  }

  .z-50 {
    z-index: 50;
  }

  .container {
    width: 100%;
  }

  @media (min-width: 40rem) {
    .container {
      max-width: 40rem;
    }
  }

  @media (min-width: 48rem) {
    .container {
      max-width: 48rem;
    }
  }

  @media (min-width: 64rem) {
    .container {
      max-width: 64rem;
    }
  }

  @media (min-width: 80rem) {
    .container {
      max-width: 80rem;
    }
  }

  @media (min-width: 96rem) {
    .container {
      max-width: 96rem;
    }
  }

  .mx-4 {
    margin-inline: calc(var(--spacing) * 4);
  }

  .mx-auto {
    margin-inline: auto;
  }

  .mt-1 {
    margin-top: calc(var(--spacing) * 1);
  }

  .mt-2 {
    margin-top: calc(var(--spacing) * 2);
  }

  .mt-4 {
    margin-top: calc(var(--spacing) * 4);
  }

  .mt-6 {
    margin-top: calc(var(--spacing) * 6);
  }

  .mr-2 {
    margin-right: calc(var(--spacing) * 2);
  }

  .mb-1 {
    margin-bottom: calc(var(--spacing) * 1);
  }

  .mb-2 {
    margin-bottom: calc(var(--spacing) * 2);
  }

  .mb-3 {
    margin-bottom: calc(var(--spacing) * 3);
  }

  .mb-4 {
    margin-bottom: calc(var(--spacing) * 4);
  }

  .mb-6 {
    margin-bottom: calc(var(--spacing) * 6);
  }

  .ml-3 {
    margin-left: calc(var(--spacing) * 3);
  }

  .block {
    display: block;
  }

  .contents {
    display: contents;
  }

  .flex {
    display: flex;
  }

  .grid {
    display: grid;
  }

  .hidden {
    display: none;
  }

  .inline {
    display: inline;
  }

  .inline-block {
    display: inline-block;
  }

  .inline-flex {
    display: inline-flex;
  }

  .list-item {
    display: list-item;
  }

  .table {
    display: table;
  }

  .h-3\.5 {
    height: calc(var(--spacing) * 3.5);
  }

  .h-4 {
    height: calc(var(--spacing) * 4);
  }

  .h-5 {
    height: calc(var(--spacing) * 5);
  }

  .h-6 {
    height: calc(var(--spacing) * 6);
  }

  .h-8 {
    height: calc(var(--spacing) * 8);
  }

  .h-12 {
    height: calc(var(--spacing) * 12);
  }

  .h-16 {
    height: calc(var(--spacing) * 16);
  }

  .max-h-64 {
    max-height: calc(var(--spacing) * 64);
  }

  .max-h-96 {
    max-height: calc(var(--spacing) * 96);
  }

  .min-h-screen {
    min-height: 100vh;
  }

  .w-3\.5 {
    width: calc(var(--spacing) * 3.5);
  }

  .w-4 {
    width: calc(var(--spacing) * 4);
  }

  .w-5 {
    width: calc(var(--spacing) * 5);
  }

  .w-6 {
    width: calc(var(--spacing) * 6);
  }

  .w-8 {
    width: calc(var(--spacing) * 8);
  }

  .w-12 {
    width: calc(var(--spacing) * 12);
  }

  .w-16 {
    width: calc(var(--spacing) * 16);
  }

  .w-full {
    width: 100%;
  }

  .max-w-md {
    max-width: var(--container-md);
  }

  .max-w-sm {
    max-width: var(--container-sm);
  }

  .min-w-0 {
    min-width: calc(var(--spacing) * 0);
  }

  .flex-1 {
    flex: 1;
  }

  .grow {
    flex-grow: 1;
  }

  .border-collapse {
    border-collapse: collapse;
  }

  .-translate-y-1\/2 {
    --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }

  .rotate-180 {
    rotate: 180deg;
  }

  .transform {
    transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
  }

  .animate-spin {
    animation: var(--animate-spin);
  }

  .cursor-not-allowed {
    cursor: not-allowed;
  }

  .cursor-pointer {
    cursor: pointer;
  }

  .resize {
    resize: both;
  }

  .flex-col {
    flex-direction: column;
  }

  .items-center {
    align-items: center;
  }

  .items-end {
    align-items: flex-end;
  }

  .justify-between {
    justify-content: space-between;
  }

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

  .justify-end {
    justify-content: flex-end;
  }

  .gap-1 {
    gap: calc(var(--spacing) * 1);
  }

  .gap-1\.5 {
    gap: calc(var(--spacing) * 1.5);
  }

  .gap-2 {
    gap: calc(var(--spacing) * 2);
  }

  .gap-3 {
    gap: calc(var(--spacing) * 3);
  }

  :where(.space-y-1 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
  }

  :where(.space-y-2 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
  }

  :where(.space-y-3 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
  }

  :where(.space-y-4 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
  }

  .truncate {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .overflow-hidden {
    overflow: hidden;
  }

  .overflow-y-auto {
    overflow-y: auto;
  }

  .rounded {
    border-radius: .25rem;
  }

  .rounded-2xl {
    border-radius: var(--radius-2xl);
  }

  .rounded-full {
    border-radius: 3.40282e38px;
  }

  .rounded-lg {
    border-radius: var(--radius-lg);
  }

  .rounded-md {
    border-radius: var(--radius-md);
  }

  .rounded-xl {
    border-radius: var(--radius-xl);
  }

  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }

  .border-2 {
    border-style: var(--tw-border-style);
    border-width: 2px;
  }

  .border-t {
    border-top-style: var(--tw-border-style);
    border-top-width: 1px;
  }

  .border-b {
    border-bottom-style: var(--tw-border-style);
    border-bottom-width: 1px;
  }

  .border-blue-300 {
    border-color: var(--color-blue-300);
  }

  .border-gray-200 {
    border-color: var(--color-gray-200);
  }

  .border-gray-300 {
    border-color: var(--color-gray-300);
  }

  .border-green-400 {
    border-color: var(--color-green-400);
  }

  .border-red-200 {
    border-color: var(--color-red-200);
  }

  .border-red-500 {
    border-color: var(--color-red-500);
  }

  .border-t-blue-600 {
    border-top-color: var(--color-blue-600);
  }

  .border-t-gray-600 {
    border-top-color: var(--color-gray-600);
  }

  .bg-black {
    background-color: var(--color-black);
  }

  .bg-blue-50 {
    background-color: var(--color-blue-50);
  }

  .bg-blue-600 {
    background-color: var(--color-blue-600);
  }

  .bg-gray-50 {
    background-color: var(--color-gray-50);
  }

  .bg-gray-50\/30 {
    background-color: #f9fafb4d;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .bg-gray-50\/30 {
      background-color: color-mix(in oklab, var(--color-gray-50) 30%, transparent);
    }
  }

  .bg-gray-100 {
    background-color: var(--color-gray-100);
  }

  .bg-gray-100\/80 {
    background-color: #f3f4f6cc;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .bg-gray-100\/80 {
      background-color: color-mix(in oklab, var(--color-gray-100) 80%, transparent);
    }
  }

  .bg-gray-300 {
    background-color: var(--color-gray-300);
  }

  .bg-green-50 {
    background-color: var(--color-green-50);
  }

  .bg-green-100 {
    background-color: var(--color-green-100);
  }

  .bg-purple-600 {
    background-color: var(--color-purple-600);
  }

  .bg-red-50 {
    background-color: var(--color-red-50);
  }

  .bg-red-100 {
    background-color: var(--color-red-100);
  }

  .bg-red-500\/90 {
    background-color: #fb2c36e6;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .bg-red-500\/90 {
      background-color: color-mix(in oklab, var(--color-red-500) 90%, transparent);
    }
  }

  .bg-white {
    background-color: var(--color-white);
  }

  .bg-yellow-100 {
    background-color: var(--color-yellow-100);
  }

  .bg-gradient-to-r {
    --tw-gradient-position: to right in oklab;
    background-image: linear-gradient(var(--tw-gradient-stops));
  }

  .from-purple-500 {
    --tw-gradient-from: var(--color-purple-500);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }

  .to-blue-600 {
    --tw-gradient-to: var(--color-blue-600);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }

  .to-purple-600 {
    --tw-gradient-to: var(--color-purple-600);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }

  .p-1 {
    padding: calc(var(--spacing) * 1);
  }

  .p-2 {
    padding: calc(var(--spacing) * 2);
  }

  .p-3 {
    padding: calc(var(--spacing) * 3);
  }

  .p-4 {
    padding: calc(var(--spacing) * 4);
  }

  .p-6 {
    padding: calc(var(--spacing) * 6);
  }

  .p-8 {
    padding: calc(var(--spacing) * 8);
  }

  .px-0\.5 {
    padding-inline: calc(var(--spacing) * .5);
  }

  .px-2 {
    padding-inline: calc(var(--spacing) * 2);
  }

  .px-3 {
    padding-inline: calc(var(--spacing) * 3);
  }

  .px-4 {
    padding-inline: calc(var(--spacing) * 4);
  }

  .px-6 {
    padding-inline: calc(var(--spacing) * 6);
  }

  .py-1 {
    padding-block: calc(var(--spacing) * 1);
  }

  .py-1\.5 {
    padding-block: calc(var(--spacing) * 1.5);
  }

  .py-2 {
    padding-block: calc(var(--spacing) * 2);
  }

  .py-3 {
    padding-block: calc(var(--spacing) * 3);
  }

  .pt-4 {
    padding-top: calc(var(--spacing) * 4);
  }

  .pr-3 {
    padding-right: calc(var(--spacing) * 3);
  }

  .pb-6 {
    padding-bottom: calc(var(--spacing) * 6);
  }

  .pl-8 {
    padding-left: calc(var(--spacing) * 8);
  }

  .text-center {
    text-align: center;
  }

  .text-left {
    text-align: left;
  }

  .text-right {
    text-align: right;
  }

  .font-mono {
    font-family: var(--font-mono);
  }

  .text-2xl {
    font-size: var(--text-2xl);
    line-height: var(--tw-leading, var(--text-2xl--line-height));
  }

  .text-base {
    font-size: var(--text-base);
    line-height: var(--tw-leading, var(--text-base--line-height));
  }

  .text-lg {
    font-size: var(--text-lg);
    line-height: var(--tw-leading, var(--text-lg--line-height));
  }

  .text-sm {
    font-size: var(--text-sm);
    line-height: var(--tw-leading, var(--text-sm--line-height));
  }

  .text-xl {
    font-size: var(--text-xl);
    line-height: var(--tw-leading, var(--text-xl--line-height));
  }

  .text-xs {
    font-size: var(--text-xs);
    line-height: var(--tw-leading, var(--text-xs--line-height));
  }

  .leading-relaxed {
    --tw-leading: var(--leading-relaxed);
    line-height: var(--leading-relaxed);
  }

  .font-bold {
    --tw-font-weight: var(--font-weight-bold);
    font-weight: var(--font-weight-bold);
  }

  .font-medium {
    --tw-font-weight: var(--font-weight-medium);
    font-weight: var(--font-weight-medium);
  }

  .font-semibold {
    --tw-font-weight: var(--font-weight-semibold);
    font-weight: var(--font-weight-semibold);
  }

  .text-blue-600 {
    color: var(--color-blue-600);
  }

  .text-blue-700 {
    color: var(--color-blue-700);
  }

  .text-gray-400 {
    color: var(--color-gray-400);
  }

  .text-gray-500 {
    color: var(--color-gray-500);
  }

  .text-gray-600 {
    color: var(--color-gray-600);
  }

  .text-gray-700 {
    color: var(--color-gray-700);
  }

  .text-gray-800 {
    color: var(--color-gray-800);
  }

  .text-gray-900 {
    color: var(--color-gray-900);
  }

  .text-green-600 {
    color: var(--color-green-600);
  }

  .text-green-700 {
    color: var(--color-green-700);
  }

  .text-green-800 {
    color: var(--color-green-800);
  }

  .text-red-600 {
    color: var(--color-red-600);
  }

  .text-red-700 {
    color: var(--color-red-700);
  }

  .text-red-800 {
    color: var(--color-red-800);
  }

  .text-white {
    color: var(--color-white);
  }

  .text-yellow-600 {
    color: var(--color-yellow-600);
  }

  .lowercase {
    text-transform: lowercase;
  }

  .uppercase {
    text-transform: uppercase;
  }

  .italic {
    font-style: italic;
  }

  .line-through {
    text-decoration-line: line-through;
  }

  .underline {
    text-decoration-line: underline;
  }

  .decoration-green-500 {
    -webkit-text-decoration-color: var(--color-green-500);
    -webkit-text-decoration-color: var(--color-green-500);
    text-decoration-color: var(--color-green-500);
  }

  .decoration-2 {
    text-decoration-thickness: 2px;
  }

  .underline-offset-2 {
    text-underline-offset: 2px;
  }

  .opacity-25 {
    opacity: .25;
  }

  .opacity-50 {
    opacity: .5;
  }

  .opacity-75 {
    opacity: .75;
  }

  .shadow {
    --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .shadow-lg {
    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), 0 4px 6px -4px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .shadow-md {
    --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .shadow-xl {
    --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), 0 8px 10px -6px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .ring-2 {
    --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .ring-blue-500 {
    --tw-ring-color: var(--color-blue-500);
  }

  .outline {
    outline-style: var(--tw-outline-style);
    outline-width: 1px;
  }

  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .filter {
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .backdrop-blur-sm {
    --tw-backdrop-blur: blur(var(--blur-sm));
    -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
    backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
  }

  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-all {
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-colors {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-transform {
    transition-property: transform, translate, scale, rotate;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .duration-200 {
    --tw-duration: .2s;
    transition-duration: .2s;
  }

  .\[api\:vars\] {
    api: vars;
  }

  @media (hover: hover) {
    .hover\:bg-blue-100:hover {
      background-color: var(--color-blue-100);
    }

    .hover\:bg-blue-700:hover {
      background-color: var(--color-blue-700);
    }

    .hover\:bg-gray-50:hover {
      background-color: var(--color-gray-50);
    }

    .hover\:bg-gray-100:hover {
      background-color: var(--color-gray-100);
    }

    .hover\:bg-gray-400:hover {
      background-color: var(--color-gray-400);
    }

    .hover\:bg-green-100:hover {
      background-color: var(--color-green-100);
    }

    .hover\:bg-purple-700:hover {
      background-color: var(--color-purple-700);
    }

    .hover\:from-purple-600:hover {
      --tw-gradient-from: var(--color-purple-600);
      --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
    }

    .hover\:to-blue-700:hover {
      --tw-gradient-to: var(--color-blue-700);
      --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
    }

    .hover\:text-blue-700:hover {
      color: var(--color-blue-700);
    }

    .hover\:text-gray-600:hover {
      color: var(--color-gray-600);
    }

    .hover\:text-gray-700:hover {
      color: var(--color-gray-700);
    }

    .hover\:text-red-800:hover {
      color: var(--color-red-800);
    }
  }

  .focus\:border-blue-500:focus {
    border-color: var(--color-blue-500);
  }

  .focus\:border-transparent:focus {
    border-color: #0000;
  }

  .focus\:ring-2:focus {
    --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .focus\:ring-blue-500:focus {
    --tw-ring-color: var(--color-blue-500);
  }

  .focus\:ring-purple-500:focus {
    --tw-ring-color: var(--color-purple-500);
  }

  .focus\:ring-offset-1:focus {
    --tw-ring-offset-width: 1px;
    --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  }

  .focus\:outline-none:focus {
    --tw-outline-style: none;
    outline-style: none;
  }

  .disabled\:bg-blue-300:disabled {
    background-color: var(--color-blue-300);
  }

  .disabled\:opacity-50:disabled {
    opacity: .5;
  }

  .dark\:border-blue-600:where([data-theme="dark"], [data-theme="dark"] *) {
    border-color: var(--color-blue-600);
  }

  .dark\:border-gray-600:where([data-theme="dark"], [data-theme="dark"] *) {
    border-color: var(--color-gray-600);
  }

  .dark\:border-gray-700:where([data-theme="dark"], [data-theme="dark"] *) {
    border-color: var(--color-gray-700);
  }

  .dark\:border-red-400:where([data-theme="dark"], [data-theme="dark"] *) {
    border-color: var(--color-red-400);
  }

  .dark\:border-red-800:where([data-theme="dark"], [data-theme="dark"] *) {
    border-color: var(--color-red-800);
  }

  .dark\:border-t-gray-300:where([data-theme="dark"], [data-theme="dark"] *) {
    border-top-color: var(--color-gray-300);
  }

  .dark\:bg-blue-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #1c398e33;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-blue-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-blue-900) 20%, transparent);
    }
  }

  .dark\:bg-gray-700:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: var(--color-gray-700);
  }

  .dark\:bg-gray-700\/50:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #36415380;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-gray-700\/50:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-gray-700) 50%, transparent);
    }
  }

  .dark\:bg-gray-800:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: var(--color-gray-800);
  }

  .dark\:bg-gray-800\/80:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #1e2939cc;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-gray-800\/80:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-gray-800) 80%, transparent);
    }
  }

  .dark\:bg-green-500\/20:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #00c75833;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-green-500\/20:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-green-500) 20%, transparent);
    }
  }

  .dark\:bg-green-500\/25:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #00c75840;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-green-500\/25:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-green-500) 25%, transparent);
    }
  }

  .dark\:bg-green-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #0d542b33;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-green-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-green-900) 20%, transparent);
    }
  }

  .dark\:bg-red-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #82181a33;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-red-900\/20:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-red-900) 20%, transparent);
    }
  }

  .dark\:bg-red-900\/30:where([data-theme="dark"], [data-theme="dark"] *) {
    background-color: #82181a4d;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .dark\:bg-red-900\/30:where([data-theme="dark"], [data-theme="dark"] *) {
      background-color: color-mix(in oklab, var(--color-red-900) 30%, transparent);
    }
  }

  .dark\:text-blue-300:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-blue-300);
  }

  .dark\:text-blue-400:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-blue-400);
  }

  .dark\:text-gray-100:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-gray-100);
  }

  .dark\:text-gray-200:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-gray-200);
  }

  .dark\:text-gray-300:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-gray-300);
  }

  .dark\:text-gray-400:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-gray-400);
  }

  .dark\:text-green-200:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-green-200);
  }

  .dark\:text-green-300:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-green-300);
  }

  .dark\:text-green-400:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-green-400);
  }

  .dark\:text-red-300:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-red-300);
  }

  .dark\:text-red-400:where([data-theme="dark"], [data-theme="dark"] *) {
    color: var(--color-red-400);
  }

  .dark\:decoration-green-400:where([data-theme="dark"], [data-theme="dark"] *) {
    -webkit-text-decoration-color: var(--color-green-400);
    -webkit-text-decoration-color: var(--color-green-400);
    text-decoration-color: var(--color-green-400);
  }

  .dark\:placeholder-gray-400:where([data-theme="dark"], [data-theme="dark"] *)::placeholder {
    color: var(--color-gray-400);
  }

  @media (hover: hover) {
    .dark\:hover\:bg-blue-900\/30:where([data-theme="dark"], [data-theme="dark"] *):hover {
      background-color: #1c398e4d;
    }

    @supports (color: color-mix(in lab, red, red)) {
      .dark\:hover\:bg-blue-900\/30:where([data-theme="dark"], [data-theme="dark"] *):hover {
        background-color: color-mix(in oklab, var(--color-blue-900) 30%, transparent);
      }
    }

    .dark\:hover\:bg-gray-600:where([data-theme="dark"], [data-theme="dark"] *):hover {
      background-color: var(--color-gray-600);
    }

    .dark\:hover\:bg-gray-700:where([data-theme="dark"], [data-theme="dark"] *):hover {
      background-color: var(--color-gray-700);
    }

    .dark\:hover\:bg-green-900\/30:where([data-theme="dark"], [data-theme="dark"] *):hover {
      background-color: #0d542b4d;
    }

    @supports (color: color-mix(in lab, red, red)) {
      .dark\:hover\:bg-green-900\/30:where([data-theme="dark"], [data-theme="dark"] *):hover {
        background-color: color-mix(in oklab, var(--color-green-900) 30%, transparent);
      }
    }

    .dark\:hover\:text-gray-200:where([data-theme="dark"], [data-theme="dark"] *):hover {
      color: var(--color-gray-200);
    }

    .dark\:hover\:text-red-200:where([data-theme="dark"], [data-theme="dark"] *):hover {
      color: var(--color-red-200);
    }
  }
}

html {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
}

*, :before, :after {
  box-sizing: inherit;
}

:root {
  --vh: 1vh;
  --sidebar-header-action-height: 61px;
  --sidebar-nav-width: 73px;
  --sidebar-content-width: 360px;
  --message-input-max-height: 100px;
  --message-input-min-height: 20px;
  --bg-primary: #fff;
  --bg-secondary: #e9eaec;
  --bg-app-title: #00a884;
  --bg-incoming-bubble: #fff;
  --bg-outgoing-bubble: #e7ffdb;
  --bg-input-container: #f0f2f5;
  --bg-panel-header: #f0f2f5;
  --bg-hover: #f5f5f5;
  --bg-splash: #f0f2f5;
  --bg-nav: #f0f2f5;
  --bg-avatar: #dfe5e8;
  --bg-notice: #87ceeb;
  --bg-update: #c8f2e9;
  --bg-update-pending: #fef3c7;
  --text-primary: #111b21;
  --text-secondary: #54656f;
  --text-tertiary: #8696a0;
  --text-input: #3b4a54;
  --text-app-title: #fff;
  --text-link: #027eb5;
  --border-strong: #e9edef;
  --border-input: #dde0e1;
  --border-divider: #f0f2f5;
  --border-divider-contrast: #e9edef;
  --border-media-preview: #32323233;
  --border-input-container: var(--border-input);
  --icon-primary: #54656f;
  --icon-secondary: #8696a0;
  --icon-green: #00a884;
  --icon-green-darker: #008060;
  --icon-green-rgb: 0, 128, 96;
  --icon-ack: #53bdeb;
  --scrollbar-track: #f0f2f5;
  --scrollbar-thumb: #cdcfd1;
  --scrollbar-thumb-hover: #b4b6b8;
  --popup-bg: #fff;
  --popup-shadow: 0 1px 3px #00000014, 0 4px 6px #0000000a;
  --popup-shadow-strong: 0 4px 12px #0000001a, 0 2px 6px #0000000f;
  --danger-color: #d32f2f;
  --danger-bg: #ffebee;
  --danger-color-rgb: 211, 47, 47;
  --message-bubble-shadow-opacity: .15;
  --message-translation-border-color: var(--border-strong);
  --bottom-nav-height: 60px;
  --bottom-bar-height: 60px;
  --header-height: 69px;
  --info-background: #007bff1a;
  --warning-background: #ffc1071a;
  --warning-color: #ffc107;
  --accent-color: #00a884;
  --input-background: var(--bg-primary);
  --button-secondary-bg: var(--bg-hover);
  --chatlogo-user-bubble: #f0e5f1;
  --chatlogo-user-color: #ef4497;
  --chatlogo-partner-bubble: #e8f7f4;
  --chatlogo-partner-color: #05a884;
  --button-secondary-text: var(--text-secondary);
  --toast-color-info: #039be5;
  --toast-color-success: #00a884;
  --toast-color-warning: #ffa000;
  --toast-color-error: #d32f2f;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

body[data-theme="dark"] {
  --bg-primary: #111b21;
  --bg-secondary: #202c33;
  --bg-nav: #111b21;
  --bg-app-title: #202c33;
  --bg-incoming-bubble: #2a3741;
  --bg-outgoing-bubble: #005c4b;
  --bg-input-container: #202c33;
  --bg-panel-header: #2a3942;
  --bg-hover: #2a3942;
  --bg-splash: #202c33;
  --bg-avatar: #4a4e5f;
  --bg-notice: #483d8b;
  --bg-update: #1a4a3e;
  --bg-update-pending: #3d2f00;
  --text-primary: #e9edef;
  --text-secondary: #aebac1;
  --text-tertiary: #8696a0;
  --text-input: #d1d7db;
  --text-app-title: #e9edef;
  --text-link: #53bdeb;
  --border-strong: #2a3942;
  --border-input: #374045;
  --border-divider: #2a3942;
  --border-divider-contrast: #37434b;
  --border-media-preview: #c8c8c833;
  --border-input-container: var(--border-input);
  --icon-primary: #aebac1;
  --icon-secondary: #8696a0;
  --icon-green: #00a884;
  --icon-green-darker: #008060;
  --icon-green-rgb: 0, 128, 96;
  --icon-ack: #53bdeb;
  --scrollbar-track: #202c33;
  --scrollbar-thumb: #374045;
  --scrollbar-thumb-hover: #4a555c;
  --popup-bg: #2a3942;
  --popup-shadow: 0 2px 5px #0000004d;
  --popup-shadow-strong: 0 6px 15px #0006, 0 2px 8px #0000004d;
  --danger-color: #f44336;
  --danger-bg: #4d1a1a;
  --danger-color-rgb: 244, 67, 54;
  --toast-color-info: #53bdeb;
  --toast-color-success: #00a884;
  --toast-color-warning: #ffca28;
  --toast-color-error: #f44336;
  --message-bubble-shadow-opacity: .5;
  --message-translation-border-color: #fff3;
  --info-background: #6495ed33;
  --warning-background: #ffc10733;
  --warning-color: #ffd54f;
  --accent-color: #00a884;
  --chatlogo-user-bubble: #2a3741;
  --chatlogo-user-color: #aebac1;
  --chatlogo-partner-bubble: #015c4b;
  --chatlogo-partner-color: #05a884;
  --input-background: var(--bg-primary);
  --button-secondary-bg: var(--bg-hover);
  --button-secondary-text: var(--text-secondary);
}

a {
  color: var(--text-link);
  -webkit-text-decoration: inherit;
  -webkit-text-decoration: inherit;
  text-decoration: inherit;
  font-weight: 500;
}

a:hover {
  color: var(--text-link);
  opacity: .9;
}

body {
  background-color: var(--bg-primary);
  width: 100%;
  min-width: 320px;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  transition: background-color .2s ease-in-out, color .2s ease-in-out;
  overflow: hidden;
}

h1 {
  color: var(--text-primary);
  font-size: 3.2em;
  line-height: 1.1;
}

button.legacy {
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  cursor: pointer;
  border: 1px solid #0000;
  border-radius: 8px;
  padding: .6em 1.2em;
  font-family: inherit;
  font-size: 1em;
  font-weight: 500;
  transition: border-color .25s, background-color .25s;
}

button.legacy:hover {
  border-color: var(--icon-green);
}

button.legacy:focus, button.legacy:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

:root {
  --ai-chat-primary: #6366f1;
  --ai-chat-secondary: #e0e7ff;
  --ai-chat-hover: #f3f4f6;
  --feedback-avatar-bg: #7a9ceb;
  --bg-feedback-row: #00a8840d;
  --bg-feedback-row-hover: #00a88414;
}

body[data-theme="dark"] {
  --ai-chat-primary: #818cf8;
  --ai-chat-secondary: #312e81;
  --ai-chat-hover: #374151;
  --feedback-avatar-bg: #7a9ceb;
  --bg-feedback-row-dark: #00a8841a;
  --bg-feedback-row-dark-hover: #00a88426;
}

.ai-chat-row {
  background: linear-gradient(90deg, var(--ai-chat-secondary) 0%, transparent 100%);
}

.ai-chat-row:hover {
  background: linear-gradient(90deg, var(--ai-chat-hover) 0%, transparent 100%);
}

.ai-chat-row .avatar {
  background: var(--ai-chat-primary);
  color: #fff;
}

.ai-chat-row .avatar i {
  color: #fff;
}

.prompt-selection {
  border-color: var(--toast-color-warning) !important;
  box-shadow: 0 0 0 2px #ffa00033 !important;
}

.prompt-description {
  color: var(--toast-color-warning) !important;
  font-weight: 500 !important;
}

.study-language-modal-overlay {
  z-index: 1000;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background-color: #00000080;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

.study-language-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  padding: 24px;
  overflow-y: auto;
  box-shadow: 0 10px 25px #0003;
}

.study-language-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.study-language-modal-header h3 {
  color: var(--text-color);
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

.study-language-modal-header p {
  color: var(--text-color-secondary);
  margin: 0;
  font-size: .9rem;
}

.study-language-modal-content {
  margin-bottom: 24px;
}

.study-language-modal-content label {
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 500;
  display: block;
}

.study-language-modal-select {
  border: 2px solid var(--border-color);
  background: var(--background-color);
  width: 100%;
  color: var(--text-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  transition: border-color .2s;
}

.study-language-modal-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), .1);
  outline: none;
}

.study-language-modal-actions {
  justify-content: center;
  gap: 12px;
  display: flex;
}

.modal-button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}

.modal-button.secondary {
  background: var(--background-color-secondary);
  color: var(--text-color-secondary);
  border: 1px solid var(--border-color);
}

.modal-button.secondary:hover:not(:disabled) {
  background: var(--border-color);
  color: var(--text-color);
}

.modal-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.modal-saving-indicator {
  text-align: center;
  color: var(--text-color-secondary);
  margin-top: 12px;
  font-size: .9rem;
}

.modal-save-message {
  text-align: center;
  border-radius: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  font-size: .9rem;
}

.modal-save-message.success {
  color: #22c55e;
  background: #22c55e1a;
  border: 1px solid #22c55e33;
}

.modal-save-message.error {
  color: #ef4444;
  background: #ef44441a;
  border: 1px solid #ef444433;
}

.message-text-l2 {
  color: var(--text-primary);
  margin: .15rem 0 .2rem;
  font-size: 1.05em;
  font-weight: 400;
  line-height: 1.5;
}

.message-text-l2.is-translated .translation-icon {
  opacity: .9;
}

.message-text-l1 {
  color: var(--text-primary);
  opacity: .95;
  margin: .15rem 0 .2rem;
  font-size: .95em;
  font-weight: 400;
  line-height: 1.5;
}

.message-text-l1.is-translated .translation-icon {
  opacity: .85;
}

.message-text-l2 ~ .message-text-l1, .message-text-l1 ~ .message-text-original, .message-text-l2 ~ .message-text-original {
  margin-top: 1rem;
}

.message-lang-label {
  width: 100%;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-size: .8rem;
  font-weight: 300;
  display: inline-block;
}

.message-text-original {
  color: var(--text-tertiary);
  margin: .1rem 0 0;
  font-size: .85em;
  line-height: 1.4;
}

.translation-prefix {
  opacity: .85;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 6px;
  font-size: .8em;
  font-weight: 600;
}

.translation-icon {
  color: var(--text-secondary);
  margin-right: 6px;
}

.onboarding-modal {
  z-index: 1000;
  background-color: #0009;
  justify-content: center;
  align-items: center;
  padding: 20px;
  display: flex;
  position: fixed;
  inset: 0;
}

.onboarding-content {
  background: var(--popup-bg);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  box-shadow: var(--popup-shadow-strong);
  border-radius: 12px;
  padding: 32px;
  overflow-y: auto;
}

.onboarding-content h2 {
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 16px;
}

.onboarding-content p {
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
}

.preference-options {
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  display: flex;
}

.preference-option {
  background: var(--bg-primary);
  border: 2px solid var(--border-input);
  cursor: pointer;
  text-align: left;
  border-radius: 12px;
  padding: 20px;
  transition: all .2s;
}

.preference-option:hover {
  border-color: var(--accent-color);
  background: var(--bg-hover);
}

.preference-option h3 {
  color: var(--text-primary);
  margin: 0 0 8px;
  font-size: 1.1em;
}

.preference-option p {
  color: var(--text-secondary);
  text-align: left;
  margin: 0;
  font-size: .9em;
}

.onboarding-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  display: flex;
}

.primary-button {
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 500;
  transition: all .2s;
}

.primary-button:hover:not(:disabled) {
  background: var(--icon-green-darker);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: 1px solid var(--border-input);
  cursor: pointer;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1em;
  transition: all .2s;
}

.secondary-button:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
  display: block;
}

.form-group select {
  border: 1px solid var(--border-input);
  background: var(--input-background);
  width: 100%;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 12px;
  font-size: 1em;
}

.form-group select:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 2px #00a88433;
}

.error-message {
  color: var(--danger-color);
  background: var(--danger-bg);
  border-radius: 8px;
  margin: 16px 0;
  padding: 12px;
  font-size: .9em;
}

.dismissible-error {
  align-items: flex-start;
  gap: 8px;
  display: flex;
}

.dismissible-error span {
  word-break: break-word;
  flex: 1;
}

.dismiss-error-button {
  color: var(--danger-color);
  cursor: pointer;
  opacity: .7;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 1.25em;
  font-weight: bold;
  line-height: 1;
  transition: opacity .15s;
  position: absolute;
  top: 4px;
  right: 4px;
}

.dismiss-error-button:hover {
  opacity: 1;
  background: #0000001a;
}

.dismiss-error-button:focus {
  outline: 2px solid var(--danger-color);
  outline-offset: 1px;
}

.conversation-setup-view {
  background-color: var(--bg-secondary);
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  padding: 20px;
  display: flex;
  overflow-y: auto;
}

.setup-content-wrapper {
  background: var(--bg-primary);
  width: 100%;
  max-width: 550px;
  box-shadow: var(--popup-shadow);
  border-radius: 12px;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  display: flex;
}

.setup-header-section h2 {
  color: var(--text-primary);
  margin: 0 0 8px;
  font-size: 1.75em;
  font-weight: 600;
}

.setup-header-section p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
}

.setup-form-section label {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
  display: block;
}

.setup-form-section select {
  border: 1px solid var(--border-input);
  background-color: var(--bg-input-container);
  width: 100%;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 12px;
  font-size: 1em;
}

.setup-benefits-section {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 20px;
}

.setup-benefits-section h3 {
  color: var(--text-primary);
  margin: 0 0 16px;
  font-size: 1.1em;
  font-weight: 600;
}

.setup-benefits-section ul {
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.setup-benefits-section li {
  color: var(--text-secondary);
  align-items: center;
  gap: 12px;
  font-size: .95em;
  display: flex;
}

.setup-benefits-section i {
  color: var(--icon-primary);
  text-align: center;
  width: 20px;
  font-size: 1.1em;
}

.setup-actions-section {
  border-top: 1px solid var(--border-divider);
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  display: flex;
}

.setup-actions-section .button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  min-width: 110px;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 500;
  transition: all .2s;
  display: flex;
}

.setup-actions-section .button.secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
}

.setup-actions-section .button.secondary:hover:not(:disabled) {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
}

.setup-actions-section .button.primary {
  background-color: var(--icon-green);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px #00a8844d;
}

.setup-actions-section .button.primary:hover:not(:disabled) {
  background-color: var(--icon-green-darker);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #00a88466;
}

.setup-actions-section .button:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.setup-footer-section {
  text-align: center;
  color: var(--text-tertiary);
  font-size: .85em;
}

.setup-footer-section p {
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 0;
  display: flex;
}

.conversation-item {
  align-items: center;
  display: flex;
  position: relative;
}

.conversation-item-main {
  cursor: pointer;
  flex: 1;
  align-items: center;
  width: 100%;
  display: flex;
}

.conversation-delete-button {
  color: var(--danger-color);
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  background-color: #0000;
  border: none;
  border-radius: 50%;
  padding: 8px;
  font-size: 14px;
  transition: opacity .2s, background-color .2s;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.conversation-item:hover .conversation-delete-button {
  opacity: 1;
}

.conversation-delete-button:hover {
  background-color: var(--danger-bg);
  opacity: 1;
}

.conversation-delete-button:focus {
  opacity: 1;
  outline: 2px solid var(--danger-color);
  outline-offset: 2px;
}

.delete-confirmation-modal {
  width: 90%;
  max-width: 400px;
}

.delete-confirmation-modal .modal-header h3 {
  color: var(--danger-color);
  align-items: center;
  gap: 8px;
  display: flex;
}

.delete-warning {
  text-align: center;
  padding: 20px 0;
}

.delete-warning i {
  color: var(--danger-color);
  margin-bottom: 16px;
  font-size: 48px;
  display: block;
}

.delete-warning p {
  margin-bottom: 12px;
  line-height: 1.5;
}

.delete-warning .warning-text {
  color: var(--text-secondary);
  font-size: .9rem;
}

.modal-footer {
  border-top: 1px solid var(--border-divider);
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  display: flex;
}

.button.danger {
  background-color: var(--danger-color);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  align-items: center;
  padding: 10px 20px;
  font-weight: 500;
  transition: background-color .2s;
  display: flex;
}

.button.danger:hover:not(:disabled) {
  background-color: #c62828;
}

.button.danger:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.button.secondary {
  background-color: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: 1px solid var(--border-input);
  cursor: pointer;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: background-color .2s;
}

.button.secondary:hover:not(:disabled) {
  background-color: var(--bg-hover);
}

.button.secondary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.modal-overlay {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
  background-color: #00000080;
  justify-content: center;
  align-items: center;
  width: 100vw !important;
  height: calc(var(--vh, 1vh) * 100) !important;
  z-index: 99999 !important;
  pointer-events: auto !important;
  height: 100dvh !important;
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
}

.modal {
  width: 90%;
  max-width: 500px;
  max-height: calc(var(--vh, 1vh) * 90);
  border: 1px solid var(--border-divider);
  border-radius: 12px;
  max-height: 90dvh;
  padding: 24px;
  overflow-y: auto;
  box-shadow: 0 10px 25px #0003;
  background: var(--bg-secondary) !important;
  pointer-events: auto !important;
  z-index: 99999 !important;
  position: relative !important;
}

.modal-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  display: flex;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  cursor: pointer;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 4px;
  font-size: 1rem;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-content {
  margin-bottom: 20px;
}

.selection-action-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-divider);
  min-height: var(--sidebar-header-action-height);
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  display: flex;
}

.selection-action-bar-left {
  align-items: center;
  gap: 12px;
  display: flex;
}

.selection-close-button {
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 4px;
  font-size: 16px;
  display: flex;
}

.selection-close-button:hover {
  background: var(--bg-hover);
}

.selection-count {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.selection-action-bar-right {
  align-items: center;
  display: flex;
}

.selection-more-button {
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 8px;
  font-size: 16px;
  display: flex;
}

.selection-more-button:hover {
  background: var(--bg-hover);
}

.action-menu {
  background: var(--bg-secondary);
  border: 1px solid var(--border-divider);
  border-radius: 8px;
  min-width: 160px;
  overflow: hidden;
  box-shadow: 0 4px 12px #00000026;
}

.action-menu-item {
  width: 100%;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  transition: background-color .2s;
  display: flex;
}

.action-menu-item:hover {
  background: var(--bg-hover);
}

.action-menu-item.danger {
  color: var(--danger-text);
}

.action-menu-item.danger:hover {
  background: var(--danger-bg);
}

.action-menu-item i {
  text-align: center;
  width: 16px;
  font-size: 14px;
}

.conversation-item.selected {
  background: rgba(var(--icon-green-rgb), .1);
  border-left: 3px solid var(--icon-green);
}

.conversation-item:not(.selected) .conversation-item-main:hover .selection-checkbox {
  opacity: .6;
}

.selection-checkbox-container {
  justify-content: flex-end;
  width: 100%;
  height: 20px;
  margin-top: 4px;
  display: flex;
}

.selection-checkbox {
  border: 2px solid var(--text-tertiary);
  background: var(--bg-primary);
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  transition: all .2s;
  display: flex;
}

.selection-checkbox:hover {
  border-color: var(--text-primary);
}

.conversation-item.selected .selection-checkbox {
  opacity: 1;
  background-color: var(--icon-green);
  border-color: var(--icon-green);
}

.selection-checkbox i.fa-check {
  color: #fff;
  font-size: 12px;
}

body[data-theme="dark"] .selection-action-bar {
  background: var(--bg-primary);
}

.sidebar-header-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.sidebar-search {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--sidebar-header-action-height);
  align-items: center;
  padding: 12px 16px;
  display: flex;
  position: relative;
}

.sidebar-search input {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-input);
  width: 100%;
  color: var(--text-input);
  box-sizing: border-box;
  border-radius: 8px;
  padding: 9px 12px 9px 65px;
  font-size: 15px;
}

.sidebar-search input:focus {
  outline: none;
}

.sidebar-search input::placeholder {
  color: var(--text-tertiary);
}

.sidebar-search-icon {
  color: var(--icon-secondary);
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
}

.conversations-container, .contacts-container {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  flex: 1;
  overflow-y: auto;
}

@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-rotate-x {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-y {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-z {
  syntax: "*";
  inherits: false
}

@property --tw-skew-x {
  syntax: "*";
  inherits: false
}

@property --tw-skew-y {
  syntax: "*";
  inherits: false
}

@property --tw-space-y-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-gradient-position {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-from {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-via {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-to {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-stops {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-via-stops {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-from-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --tw-gradient-via-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 50%;
}

@property --tw-gradient-to-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-leading {
  syntax: "*";
  inherits: false
}

@property --tw-font-weight {
  syntax: "*";
  inherits: false
}

@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-ring-inset {
  syntax: "*";
  inherits: false
}

@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0;
}

@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}

@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-outline-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-blur {
  syntax: "*";
  inherits: false
}

@property --tw-brightness {
  syntax: "*";
  inherits: false
}

@property --tw-contrast {
  syntax: "*";
  inherits: false
}

@property --tw-grayscale {
  syntax: "*";
  inherits: false
}

@property --tw-hue-rotate {
  syntax: "*";
  inherits: false
}

@property --tw-invert {
  syntax: "*";
  inherits: false
}

@property --tw-opacity {
  syntax: "*";
  inherits: false
}

@property --tw-saturate {
  syntax: "*";
  inherits: false
}

@property --tw-sepia {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-blur {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-brightness {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-contrast {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-grayscale {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-hue-rotate {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-invert {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-opacity {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-saturate {
  syntax: "*";
  inherits: false
}

@property --tw-backdrop-sepia {
  syntax: "*";
  inherits: false
}

@property --tw-duration {
  syntax: "*";
  inherits: false
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* --- CSS Transforms for the ChatLogo component --- */
.logo-top-left {
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0.7);
}

.logo-right {
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0.82);
}

.logo-bottom-left {
  transform-origin: right bottom;
  transform-box: fill-box;
  transform: scale(0.9);
}
/* src/shared/ui/LoadingShell.css */
/* Neutral loading shell for auth/guard initialization */

.loading-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--background-color, #ffffff);
  color: var(--text-color, #333333);
}

.loading-shell__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.loading-shell__spinner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color, #e5e7eb);
  border-top: 3px solid var(--primary-color, #3b82f6);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-shell__message {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  font-weight: 400;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .loading-shell {
    background-color: var(--background-color-dark, #1f2937);
    color: var(--text-color-dark, #f9fafb);
  }

  .spinner {
    border-color: var(--border-color-dark, #374151);
    border-top-color: var(--primary-color-dark, #60a5fa);
  }

  .loading-shell__message {
    color: var(--text-muted-dark, #9ca3af);
  }
}
/* TTS Button Styles */

/* Base button styles shared by all TTS buttons */
.tts-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem; /* p-1.5 */
  transition: all 200ms;
  outline: none;
  box-sizing: border-box;
  border: none;
  background: none;
}

.tts-button:focus {
  outline: none;
}

.tts-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Native platform styling (Android/iOS) */
.tts-button--native {
  border-radius: 0.375rem; /* rounded-md */
  color: rgb(55 65 81); /* text-gray-700 */
}

.tts-button--native:hover:not(:disabled) {
  background-color: rgb(243 244 246); /* hover:bg-gray-100 */
}

.tts-button--native:focus {
  ring: 2px;
  ring-color: rgb(107 114 128); /* ring-gray-500 */
  ring-offset: 1px;
}

/* Native platform dark mode */
body[data-theme='dark'] .tts-button--native {
  color: rgb(
    229 231 235
  ); /* dark:text-gray-200 — bright enough to see on dark bg */
}

body[data-theme='dark'] .tts-button--native:hover:not(:disabled) {
  background-color: rgba(55 65 81 / 0.4); /* dark:hover:bg-gray-700/40 */
}

/* Web platform styling */
.tts-button--web {
  border-radius: 9999px; /* rounded-full */
  color: rgb(75 85 99); /* text-gray-600 */
}

.tts-button--web:hover:not(:disabled) {
  background-color: rgb(243 244 246); /* hover:bg-gray-100 */
}

.tts-button--web:focus {
  ring: 2px;
  ring-color: rgb(168 85 247); /* ring-purple-500 */
  ring-offset: 1px;
}

/* Web platform dark mode */
body[data-theme='dark'] .tts-button--web {
  color: rgb(
    229 231 235
  ); /* dark:text-gray-200 — bright enough to see on dark bg */
}

body[data-theme='dark'] .tts-button--web:hover:not(:disabled) {
  background-color: rgb(55 65 81); /* dark:hover:bg-gray-700 */
}

/* Error state */
.tts-button--error {
  color: rgb(239 68 68) !important; /* text-red-500 */
}

/* Placeholder (invisible but reserves space) */
.tts-button--placeholder {
  opacity: 0;
  pointer-events: none;
  width: 24px;
  height: 24px;
}
/* src/features/onboarding-flow/ui/OnboardingFlow.css */

/* ===== ONBOARDING FLOW CONTAINER ===== */
.onboarding-flow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  z-index: 1000;
  /* overflow: hidden; */
  /* Mobile: Enable scrolling */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  transform: translateZ(0); /* Force GPU acceleration */
}

.future-solution-for-onboarding {
  /* Mobile: Enable scrolling */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  transform: translateZ(0); /* Force GPU acceleration */
}

.onboarding-error {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--danger-color);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1001;
  box-shadow: var(--popup-shadow);
}

.onboarding-error button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
}

/* ===== ONBOARDING SCREEN CONTAINER ===== */
.onboarding-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.onboarding-back-button {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  left: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.onboarding-back-button:hover {
  background-color: var(--bg-hover);
}

.onboarding-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 20px 20px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

/* ===== ONBOARDING BUTTONS ===== */
.onboarding-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  min-height: 48px;
}

.onboarding-button--full-width {
  width: 100%;
}

.onboarding-button--primary {
  background-color: var(--accent-color);
  color: white;
}

.onboarding-button--primary:hover:not(.onboarding-button--disabled) {
  background-color: var(--icon-green-darker);
  transform: translateY(-1px);
}

.onboarding-button--secondary {
  background-color: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: 1px solid var(--border-input);
}

.onboarding-button--secondary:hover:not(.onboarding-button--disabled) {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
}

.onboarding-button--outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-input);
}

.onboarding-button--outline:hover:not(.onboarding-button--disabled) {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.onboarding-button--social {
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
}

.onboarding-button--social:hover:not(.onboarding-button--disabled) {
  background-color: var(--bg-hover);
}

.onboarding-button--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.onboarding-button .loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== WELCOME SCREEN ===== */
.welcome-screen .onboarding-content-wrapper {
  text-align: center;
}

.welcome-content {
  width: 100%;
  max-width: 400px;
}

.app-logo {
  /* */
}

.logo-icon {
  position: relative;
  display: inline-block;
  width: 11rem;
  height: 11rem;
  color: var(--accent-color);
}

/* Legacy FontAwesome icon styles - kept for backward compatibility */
.logo-icon .fa-comments {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 2rem;
  color: var(--icon-green-darker);
}

.app-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
}

.tagline {
  margin-bottom: 40px;
}

.tagline p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 4px 0;
  line-height: 1.4;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== LANGUAGE SELECTION SCREEN ===== */
.language-selection-content {
  width: 100%;
}

.native-language-section {
  margin-bottom: 32px;
}

.language-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Removed .onboarding-skill-level__language-dropdown - replaced with generic Dropdown component */

.target-language-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  text-align: center;
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--border-input);
  border-radius: 8px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.language-option:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
}

.language-option.selected {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
  color: var(--accent-color);
}

.language-flag {
  font-size: 1.2rem;
}

.language-name {
  font-size: 1rem;
  font-weight: 500;
}

.language-selection-actions {
  margin-top: 24px;
}

/* ===== SKILL LEVEL SCREEN ===== */
.skill-level-content {
  width: 100%;
}

.skill-level-header {
  text-align: center;
  margin-bottom: 24px;
}

.skill-level-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.skill-level-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

.skill-assessment-bubble {
  margin-bottom: 24px;
}

.skill-level-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.skill-level-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--border-input);
  border-radius: 8px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.skill-level-option:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
}

.skill-level-option.selected {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
  color: var(--accent-color);
}

.skill-signal {
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signal-bars {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 20px;
}

.signal-bar {
  width: 4px;
  background-color: var(--border-input);
  border-radius: 1px;
  transition: background-color 0.2s ease;
}

.signal-bar-1 {
  height: 4px;
}
.signal-bar-2 {
  height: 8px;
}
.signal-bar-3 {
  height: 12px;
}
.signal-bar-4 {
  height: 16px;
}
.signal-bar-5 {
  height: 20px;
}

.signal-bar.active {
  background-color: var(--accent-color);
}

.skill-level-option.selected .signal-bar.active {
  background-color: var(--accent-color);
}

.skill-level-option:hover .signal-bar.active {
  background-color: var(--accent-color);
}

.skill-text {
  font-size: 1rem;
  line-height: 1.4;
}

.skill-text-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.skill-level-actions {
  margin-top: 24px;
}

/* ===== CHAT BUBBLE COMPONENT ===== */
.chat-bubble-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.app-logo-medium,
.app-logo-small {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px; /* Reduced from default margin */
}

.app-logo-small .logo-icon {
  width: 4rem;
  height: 4rem;
}

.app-logo-small .logo-icon {
  width: 8rem;
  height: 8rem;
}

.chat-bubble {
  background-color: var(--bg-input-container);
  border: 1px solid var(--border-input);
  border-radius: 16px;
  padding: 12px 16px;
  max-width: 280px;
}

.chat-message {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.chat-translation {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ===== SIGNUP SCREEN ===== */
.signup-content {
  width: 100%;
  text-align: center;
}

.signup-headline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px 0;
  line-height: 1.3;
}

.signup-subheadline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.4;
}

.signup-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.signup-separator {
  display: flex;
  align-items: center;
  margin: 8px 0;
}

.signup-separator::before,
.signup-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-input);
}

.signup-separator span {
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.fake-login-button {
  margin-top: 8px;
  font-size: 0.9rem !important;
}

.signup-disclaimer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 24px;
}

.agreement-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.agreement-checkbox {
  margin-top: 2px;
  cursor: pointer;
}

.agreement-checkbox.error {
  border-color: #f97316;
  outline: 2px solid #f97316;
}

.onboarding__agreement-text {
  flex: 1;
  line-height: 1.4;
  text-align: left;
}

.agreement-text.error {
  text-decoration: underline;
  text-decoration-color: #f97316;
}

.signup-disclaimer a {
  color: var(--accent-color);
  text-decoration: none;
}

.signup-disclaimer a:hover {
  text-decoration: underline;
}

.agreement-error-message {
  background-color: #7c3aed;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  text-align: center;
}

.coming-soon {
  font-size: 0.8rem;
  margin-left: 8px;
  opacity: 0.7;
}

/* ===== LOGIN SCREEN ===== */
.login-content {
  width: 100%;
  text-align: center;
}

.login-headline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px 0;
  line-height: 1.3;
}

.login-subheadline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.4;
}

.login-error {
  background-color: var(--danger-color);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: center;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.login-separator {
  display: flex;
  align-items: center;
  margin: 8px 0;
}

.login-separator::before,
.login-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-input);
}

.login-separator span {
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.email-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.email-login-form .form-group {
  margin-bottom: 0;
}

.email-login-form .form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.email-login-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-input);
  border-radius: 8px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
}

.email-login-form .form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.email-login-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.email-login-actions .onboarding-button {
  flex: 1;
}

.forgot-password {
  text-align: center;
  margin-top: 12px;
}

.forgot-password a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.login-signup-prompt {
  margin: 24px 0;
  text-align: center;
}

.login-signup-prompt p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.login-disclaimer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: center;
}

.login-disclaimer a {
  color: var(--accent-color);
  text-decoration: none;
}

.login-disclaimer a:hover {
  text-decoration: underline;
}

.disabled {
  position: relative;
}

.disabled .coming-soon {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* ===== EMAIL REGISTRATION SCREEN ===== */
.email-registration-content {
  width: 100%;
  text-align: center;
}

.registration-headline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px 0;
  line-height: 1.3;
}

.registration-subheadline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.4;
}

.registration-error {
  background-color: var(--danger-color);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: center;
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.registration-form .form-group {
  margin-bottom: 0;
}

.registration-form .form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.registration-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-input);
  border-radius: 8px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.registration-form .form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.registration-form .form-group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Password requirements styling */
.password-requirements {
  margin-bottom: 8px;
  padding: 12px;
  background-color: var(--bg-input-container);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  font-size: 0.85rem;
}

.requirements-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirements-list li {
  display: flex;
  align-items: center;
  padding: 2px 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.requirements-list li::before {
  content: '•';
  margin-right: 8px;
  font-size: 1rem;
  line-height: 1;
}

.requirement-met {
  color: var(--success-color, #22c55e);
}

.requirement-met::before {
  content: '✓';
  color: var(--success-color, #22c55e);
  font-weight: bold;
}

.requirement-unmet {
  color: var(--text-secondary);
}

.register-submit-button {
  margin-top: 8px;
}

.registration-disclaimer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: center;
}

.registration-disclaimer a {
  color: var(--accent-color);
  text-decoration: none;
}

.registration-disclaimer a:hover {
  text-decoration: underline;
}

/* ===== GOAL SETTING SCREEN ===== */
.goal-setting-content {
  width: 100%;
}

.goal-setting-header {
  text-align: center;
  margin-bottom: 24px;
}

.goal-setting-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.goal-assessment-bubble {
  margin-bottom: 24px;
}

.goal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

/* Toggle-style goal buttons */
.goal-option-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-input);
  border-radius: 10px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
  text-align: left;
  font-size: 1rem;
  line-height: 1.4;
  /* Fix iOS scroll triggering focus/active states */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

.goal-option-toggle:focus {
  /* Suppress focus ring to avoid confusion with selection state */
  outline: none;
}

.goal-option-toggle:focus-visible {
  /* Only show focus ring for keyboard navigation */
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.goal-option-toggle.selected {
  border-color: var(--accent-color);
  background-color: rgba(var(--accent-color-rgb), 0.08);
}

.goal-option-toggle:not(:disabled):active {
  transform: scale(0.98);
}

.goal-option-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.goal-option-check {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--border-input);
  transition: color 0.2s ease;
}

.goal-option-toggle.selected .goal-option-check {
  color: var(--accent-color);
}

.goal-option-text {
  flex: 1;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .goal-option-toggle {
    padding: 14px;
    font-size: 0.95rem;
  }
}

/* Touch device — suppress hover effects that trigger on scroll */
@media (hover: none) and (pointer: coarse) {
  .goal-option-toggle {
    min-height: 52px;
  }

  .goal-option-toggle:hover {
    border-color: var(--border-input);
    background-color: var(--bg-input-container);
  }

  .goal-option-toggle.selected:hover {
    border-color: var(--accent-color);
    background-color: rgba(var(--accent-color-rgb), 0.08);
  }
}

.goal-setting-actions {
  margin-top: 24px;
}

/* Animation for message appearance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== INVITE FRIENDS SCREEN ===== */
.invite-friends-content {
  width: 100%;
  text-align: center;
}

.invite-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.invite-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.4;
}

.invite-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.invite-option {
  text-align: center;
}

.invite-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.3;
}

/* Copy notification for share button */
.copy-notification {
  background-color: var(--success-color, #10b981);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 8px;
  margin-bottom: 8px;
  display: inline-block;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Coming soon indicator */
.coming-soon-indicator {
  background-color: var(--border-input);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 6px;
  margin-bottom: 6px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Disabled button styles */
.invite-qr--disabled,
.invite-email--disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
}

.invite-qr--disabled:hover,
.invite-email--disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.invite-skip {
  margin-top: 24px;
}

.skip-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}

.skip-link:hover {
  color: var(--text-primary);
}

/* Post-share state styles */
.invite-share--confirmed {
  background-color: var(--success-color, #10b981) !important;
  opacity: 0.8;
  cursor: default !important;
}

.invite-share--confirmed:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Done button styles */
.invite-done {
  margin-top: 16px;
}

/* DEV environment indicator */
.dev-indicator {
  text-align: center;
  margin-top: 16px;
}

.dev-indicator small {
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.7;
}

/* ===== AI INTRODUCTION SCREEN ===== */
.ai-introduction-content {
  width: 100%;
  text-align: center;
}

.ai-intro-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 32px 0;
  line-height: 1.3;
}

.app-logo-large {
  margin: 16px 0; /* Reduced margin */
}

.app-logo-large .logo-icon {
  width: 12rem; /* Reduced from 16rem */
  height: 12rem; /* Reduced from 16rem */
}

/* Legacy FontAwesome icon styles - kept for backward compatibility */
.app-logo-large .fa-comments {
  font-size: 2.5rem;
  top: 15px;
  left: 15px;
}

.ai-intro-text {
  margin-bottom: 32px;
}

.ai-intro-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ai-intro-actions {
  margin-bottom: 24px;
}

.ai-intro-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===== GRAMMAR GENDER SCREEN ===== */
.grammar-gender-content {
  width: 100%;
}

.grammar-gender-header {
  text-align: center;
  margin-bottom: 24px;
}

.grammar-gender-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.grammar-gender-explanation {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Example cards showing masculine/feminine sentence pairs */
.grammar-gender-examples {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.gender-example-card {
  background-color: var(--bg-input-container);
  border: 1px solid var(--border-input);
  border-radius: 12px;
  padding: 16px;
}

.gender-example-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.gender-example-sentence {
  margin: 0 0 4px 0;
  line-height: 1.5;
}

.gender-example-sentence.primary {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  font-style: italic;
}

.gender-example-sentence.secondary {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Gender selection buttons (Use male / Use female) */
.grammar-gender-selection {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.gender-select-btn {
  flex: 1;
  padding: 16px;
  border: 2px solid var(--border-input);
  border-radius: 12px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.gender-select-btn:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
}

.gender-select-btn.selected {
  border-color: var(--accent-color);
  background-color: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.15);
}

.gender-select-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.grammar-gender-actions {
  margin-top: 8px;
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .gender-select-btn {
    min-height: 56px;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
  .onboarding-content-wrapper {
    max-width: 600px;
    padding: 80px 40px 40px;
  }

  .welcome-content {
    max-width: 500px;
  }

  .app-name {
    font-size: 3rem;
  }

  .tagline p {
    font-size: 1.2rem;
  }

  .language-list {
    max-height: 400px;
  }

  .chat-messages {
    padding: 32px;
  }
}
/* ChatWindow v2 minimal positioning fixes */
/* Floating indicator: bottom-right, above input */
.scroll-to-bottom-indicator {
  position: fixed;
  right: 16px;
  bottom: 116px;
  z-index: 10;
  pointer-events: auto;
}

.new-message-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.95);
  color: rgba(0, 0, 0, 0.75);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.new-message-button:hover {
  background: #fff;
  color: rgba(0, 0, 0, 0.9);
}

.new-message-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  background: #2563eb; /* fallback accent */
  color: #fff;
  font-size: 12px;
  text-align: center;
}

/* Top pagination control container, sits above first message */
.load-older-container {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
}

.load-older-button {
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.load-older-button:hover {
  color: rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 0, 0, 0.2);
}

.load-older-button[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Ensure message list anchors to bottom and scrolls correctly */
.messages-list {
  position: relative; /* Create positioning context for overlay */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  gap: 10px; /* Space between messages */
}

/* Make loading UI in messages area transparent and unobtrusive */
.messages-list .loading-container {
  background: transparent !important;
  height: auto;
  padding: 8px 0;
}
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
    'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#root {
  height: 100%;
  width: 100%;
}

.App {
  width: 100%;
  height: 100%;
  margin: 0;
  background-color: var(--bg-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Loading --- */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-size: 1.2em;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
}

/* --- Auth Screen --- */
.auth-container {
  padding: 40px;
  max-width: 400px;
  width: 90%;
  margin: 40px auto;
  background-color: var(--popup-bg);
  border-radius: 12px;
  text-align: center;
  color: var(--text-primary);
  box-shadow: var(--popup-shadow);
}

.auth-container h2 {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 24px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  box-sizing: border-box;
  background-color: var(--bg-input-container);
  color: var(--text-input);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  border-color: var(--icon-green);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.2);
}

.auth-container button {
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.auth-container button[type='submit'] {
  background-color: var(--icon-green);
  color: var(--text-app-title);
}

.auth-container button[type='submit']:hover {
  background-color: var(--icon-green);
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-container .google-button {
  background-color: #ea4335;
  color: var(--text-app-title);
}

.auth-container .google-button:hover {
  background-color: #d62516;
  transform: translateY(-1px);
}

.auth-container .toggle-button {
  background-color: transparent;
  color: var(--icon-green);
  border: 1px solid var(--icon-green);
  margin-top: 16px;
}

.auth-container .toggle-button:hover {
  background-color: rgba(0, 168, 132, 0.1);
}

.auth-container button:disabled {
  background-color: var(--bg-input-container);
  cursor: not-allowed;
  color: var(--text-tertiary);
}

.error-message {
  color: var(--danger-color);
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-color);
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  margin-bottom: 10px;
  font-size: 0.9em;
  text-align: center;
}

/* Compact error message variant (for inline form errors) */
.message.error-message {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 5px 0;
  text-align: left;
  font-size: 14px;
}

.success-message {
  color: var(--icon-green);
  font-size: 14px;
  margin: 10px 16px;
}

/* --- Permission Banner --- */

.toast-popup {
  position: fixed;
  top: 20px; /* Adjust as needed */
  right: 20px; /* Adjust as needed */
  background-color: var(--popup-bg);
  color: var(--text-primary);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--popup-shadow-strong);
  display: flex;
  align-items: center; /* Vertically align icon and text */
  z-index: 1500;
  cursor: pointer;
  max-width: 380px; /* Slightly wider */
  width: calc(100% - 40px); /* Responsive width */
  border-left: 5px solid; /* Default border, color set by style */
  animation: slideInFromRight 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother animation */
  min-height: 60px; /* Ensure minimum height */
  box-sizing: border-box;
}

/* Add styles for different variants (colors set via inline style now) */
/* .toast-popup--info { border-left-color: var(--toast-color-info); } */
/* .toast-popup--success { border-left-color: var(--toast-color-success); } */
/* .toast-popup--warning { border-left-color: var(--toast-color-warning); } */
/* .toast-popup--error { border-left-color: var(--toast-color-error); } */

@keyframes slideInFromRight {
  from {
    transform: translateX(110%);
    opacity: 0.6;
  } /* Start further out */
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-popup-icon {
  margin-right: 15px;
  font-size: 22px; /* Slightly larger icon */
  flex-shrink: 0;
  /* Color set by inline style */
}

.toast-popup-content {
  flex-grow: 1;
  /* Ensure text doesn't overflow */
  overflow: hidden;
  word-wrap: break-word;
}

.toast-popup-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px; /* Increased spacing */
  line-height: 1.3;
}

.toast-popup-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  /* Allow multiple lines */
  white-space: pre-wrap;
}

.toast-popup-close {
  background: none;
  border: none;
  color: var(--icon-secondary);
  font-size: 20px; /* Larger close button */
  font-weight: bold;
  cursor: pointer;
  margin-left: 15px;
  padding: 0 5px;
  align-self: flex-start; /* Align to top right */
  line-height: 1; /* Prevent extra height */
  flex-shrink: 0;
}

.toast-popup-close:hover {
  color: var(--text-primary);
}

/* --- Home Screen Layout --- */

/* NEW: Wrapper for Home Screen + Notifications */
.home-screen-wrapper {
  display: flex;
  flex-direction: column; /* Stack banner/modals and home-screen vertically */
  height: 100%; /* Take full available height */
  width: 100%;
  overflow: hidden; /* Prevent wrapper scroll */
  position: relative; /* Context for absolute/fixed children like modals */
}

/* Ensure banner takes its space but doesn't grow/shrink */
.home-screen-wrapper > .permission-banner {
  display: flex;
  flex-shrink: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-notice);
  padding: 5px 10px;
}

.permission-banner__buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}

/* OTA update banner - success/confirmation style, sits above home-screen */
.home-screen-wrapper > .ota-update-banner {
  display: flex;
  flex-shrink: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-update);
  padding: 6px 14px;
  gap: 8px;
}

.ota-update-banner__message {
  font-size: 0.88em;
  color: var(--text-primary);
}

.ota-update-banner__dismiss {
  background: none;
  border: 1px solid currentColor;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8em;
  padding: 2px 10px;
  color: var(--text-primary);
  opacity: 0.75;
  white-space: nowrap;
  flex-shrink: 0;
}

.ota-update-banner__dismiss:hover {
  opacity: 1;
}

/* Restart-prompt variant — same green as the post-update confirmation */
.home-screen-wrapper > .ota-update-banner--restart {
  background: var(--bg-update);
}

.ota-update-banner--restart .ota-update-banner__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ota-update-banner__restart-now {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 600;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Make the actual home screen content grow */
.home-screen-wrapper > .home-screen {
  flex-grow: 1; /* Allow home-screen to fill remaining space */
  min-height: 0; /* Prevent flex item from overflowing its container */
  /* Keep its existing flex properties */
  display: flex;
  /* height: 100%; */ /* Remove fixed height, let flex-grow handle it */
  overflow: hidden; /* Prevent this inner container from scrolling */
}

/* --- Original Home Screen Layout --- */
.home-screen {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.logout-button {
  display: none;
}

/* --- WhatsApp-like Sidebar --- */
.sidebar-container {
  display: flex; /* Keeps internal structure (content + nav) */
  flex-direction: column; /* Stack content and bottom nav */
  height: 100%;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-divider-contrast);
  flex: 0 0 var(--sidebar-content-width); /* Use CSS variable */
  min-width: var(--sidebar-content-width); /* Use CSS variable */
  transition:
    width 0.3s ease,
    min-width 0.3s ease,
    transform 0.3s ease; /* Add transform */
  position: relative; /* Needed for z-index potentially */
  z-index: 2; /* Ensure sidebar is above chat on mobile transition */
}

.sidebar-main-content {
  flex: 1; /* Allow content area to grow */
  overflow-y: auto; /* Make this area scrollable */
  display: flex; /* Needed if content inside needs flex */
  flex-direction: column; /* Stack sections inside */
}

.chat-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.3s ease; /* Add transition for mobile sliding */
  z-index: 1;
}

/* --- Bottom Navigation Bar --- */
.sidebar-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--bottom-bar-height); /* Use CSS variable */
  min-height: var(--bottom-bar-height); /* Use CSS variable */
  max-height: var(--bottom-bar-height); /* Use CSS variable */
  box-sizing: border-box;
  border-top: 1px solid var(--border-divider);
  background-color: var(--bg-panel-header); /* Or var(--bg-primary) */
  flex-shrink: 0; /* Prevent nav bar from shrinking */
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--icon-primary);
  font-size: 11px; /* Smaller text */
  cursor: pointer;
  padding: 5px 0;
  position: relative; /* For badge positioning */
  transition: color 0.2s;
}

.bottom-nav-item i {
  font-size: 20px; /* Icon size */
  margin-bottom: 3px;
}

/* New wrapper for positioning */
.bottom-nav-icon-wrapper {
  position: relative;
  display: inline-block; /* Ensure it wraps the icon tightly */
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--icon-green);
}

/* Badge Styles */
.nav-badge {
  position: absolute;
  /* top: 0px; */ /* Align closer to the top */
  /* right: 10px; */ /* Position closer to the right edge of the icon area */
  top: -4px; /* Adjust relative to icon wrapper top */
  right: -8px; /* Adjust relative to icon wrapper right */
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  /* Adjust positioning specifically for the dot */
  /* top: 2px; */
  /* right: 18px; */ /* Fine-tune this value as needed */
  /* Use general .nav-badge positioning, potentially slightly adjust if needed */
  /* e.g., top: -2px; right: -2px; */
}

.nav-badge.dot {
  width: 10px;
  height: 10px;
  padding: 0;
}

.nav-badge.numeric {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
  /* Ensure this matches MOBILE_BREAKPOINT_PX */
  .home-screen.sidebar-visible-mobile .sidebar-container {
    /* Sidebar takes full width when visible on mobile */
    width: 100%;
    min-width: 100%;
    border-right: none;
    transform: translateX(0);
    display: flex; /* Ensure it's displayed when visible */
  }

  .home-screen.sidebar-visible-mobile .chat-container {
    /* Hide chat view when sidebar is visible */
    display: none; /* Hide completely */
  }

  .home-screen.chat-visible-mobile .sidebar-container {
    /* Completely remove sidebar from layout when chat is visible */
    display: none;
  }

  .home-screen.chat-visible-mobile .chat-container {
    /* Chat takes full width naturally now */
    flex: 1 1 auto; /* Use base flex behavior */
    width: 100%; /* Still good to keep for clarity */
    display: flex; /* Ensure it's displayed when visible */
  }

  /* Hide placeholder on mobile when a chat is selected */
  .home-screen.chat-visible-mobile .chat-window-placeholder {
    display: none;
  }

  /* Mobile-specific modal constraints for better small screen experience */
  .user-settings-content {
    width: 95%; /* Use more screen width on mobile */
    /* Fit within parent overlay height minus vertical margins */
    max-height: calc(100% - 1rem);
    margin: 0.5rem auto; /* Smaller margins for mobile */
  }
}

/* Chat Header Back Button (Mobile) */
.chat-header-back-button {
  background: none;
  border: none;
  color: var(--icon-primary);
  font-size: 18px; /* Adjust size */
  cursor: pointer;
  padding: 8px 12px 8px 0; /* Adjust padding */
  margin-right: 10px; /* Space between button and avatar */
  display: flex; /* Ensure icon is centered if needed */
  align-items: center;
  justify-content: center;
}

.chat-header-back-button:hover {
  color: var(--text-primary);
  border-color: transparent; /* Override default button hover */
}

/* --- WhatsApp-like Sidebar --- */
.sidebar-navigation {
  width: var(
    --sidebar-nav-width,
    73px
  ); /* Use CSS variable, define fallback just in case */
  min-width: var(--sidebar-nav-width, 73px); /* Use CSS variable */
  background-color: var(--bg-nav);
  background: linear-gradient(281deg, var(--bg-nav), var(--bg-panel-header));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15px;
  flex-shrink: 0; /* Prevent navigation from shrinking */
}

.sidebar-icon {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--icon-primary);
  border-radius: 50%;
  margin-bottom: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-icon:hover {
  background-color: var(--bg-hover);
}

.sidebar-icon.active {
  color: var(--icon-green);
}

.sidebar-content {
  /* This style might be unnecessary if .sidebar-container controls the overall width */
  /* width: var(--sidebar-content-width, 360px); */ /* Potentially remove if handled by parent */
  /* min-width: var(--sidebar-content-width, 360px); */ /* Potentially remove if handled by parent */
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  transition: width 0.3s ease;
  flex-shrink: 0; /* Prevent sidebar content from shrinking if it has its own width */
  flex: 1; /* Allow content area to grow if it's inside a flex container */
  overflow-y: auto; /* Make content scrollable */
}

.sidebar-content.collapsed {
  width: 0;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-primary);
  height: var(--header-height);
  border-bottom: 1px solid var(--border-divider);
  background-color: var(--bg-panel-header);
  justify-content: space-between;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.sidebar-header-icons {
  display: flex;
  gap: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header-icon {
  color: var(--icon-primary);
  cursor: pointer;
}

.sidebar-header-icon:hover {
  color: var(--text-primary);
}

.sidebar-header-button {
  background: none;
  border: none;
  color: var(--icon-primary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px; /* Adjust icon size */
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.sidebar-header-button:hover:not(:disabled) {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-header-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* AI Chat Button in Sidebar */
.ai-chat-button {
  background-color: var(--ai-chat-primary);
  color: white;
  border: 1px solid var(--ai-chat-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.ai-chat-button:hover:not(:disabled) {
  background: #5856eb;
  border-color: #5856eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.ai-chat-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ai-chat-button i {
  color: white;
}
/* .sidebar-header-button.ai-chat-button {
  background-color: var(--ai-chat-primary);
  color: white;
} */

.sidebar-search {
  padding: 12px 16px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-search input {
  width: 100%;
  padding: 9px 12px 9px 65px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  color: var(--text-input);
  font-size: 15px;
  box-sizing: border-box;
}

.sidebar-search input:focus {
  outline: none;
}

.sidebar-search input::placeholder {
  color: var(--text-tertiary);
}

.sidebar-search-icon {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--icon-secondary);
}

/* --- Conversations & Contacts Lists --- */
.conversations-container,
.contacts-container {
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.conversation-item,
.contact-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-divider);
  cursor: pointer;
  transition: background-color 0.2s;
  background: linear-gradient(-155deg, var(--bg-hover) -50%, transparent 50%);
}

.conversation-item:hover,
.contact-item:hover {
  background-color: var(--bg-hover);
}

.conversation-item.active,
.contact-item.active {
  background-color: var(--bg-hover);
  border-left: 3px solid var(--icon-green);
}

.avatar {
  width: 49px;
  height: 49px;
  border-radius: 25%;
  margin-right: 15px;
  background-color: var(--bg-avatar);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rounded-avatar {
  border-radius: 25% !important;
  overflow: hidden !important;
}

.conversation-details,
.contact-details {
  flex: 1;
  overflow: hidden;
}

.conversation-name,
.contact-name {
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-message {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  color: var(--text-tertiary);
  font-size: 12px;
  margin-left: auto;
  padding-left: 10px;
  align-self: flex-start;
}

/* Conversation meta container for time and unread badges */
.conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  min-width: 55px; /* Ensure consistent width for alignment */
}

/* Unread badge in conversation list */
.conversation-unread-badge {
  background-color: var(--icon-green);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 0 6px;
}

.conversation-item.unread:hover {
  background-color: rgba(0, 168, 132, 0.1);
}

.conversation-item.unread .conversation-name {
  font-weight: 600;
}

/* Make nav badge count more flexible */
.nav-badge.numeric.plus {
  min-width: 24px;
  font-size: 8px;
}

/* --- Chat Window --- */
.chat-header {
  z-index: 9999;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background-color: var(--bg-panel-header);
  height: var(--header-height); /* Use CSS variable */
  min-height: var(--header-height); /* Added min-height for robustness */
  border-bottom: 1px solid var(--border-divider);
}

.chat-header .avatar {
  margin-right: 15px;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-weight: 600;
  font-size: 1.1em;
  color: var(--text-primary);
}

.chat-header-language-pair {
  font-size: 0.8rem;
  opacity: 0.8;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}

.learning-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-header-status {
  font-size: 0.8em;
  color: var(--text-secondary);
}

.chat-header-icons {
  display: flex;
  gap: 20px;
  color: var(--icon-primary);
}

.chat-header-icon {
  cursor: pointer;
}

.chat-header-icon:hover {
  color: var(--text-primary);
}

/* Translation toggle button in header */
.chat-header-translation-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.translation-toggle-button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  background-color: rgba(134, 150, 160, 0.1);
  color: var(--text-tertiary);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.translation-toggle-button.active {
  color: var(--icon-green);
  background-color: rgba(var(--icon-green-rgb), 0.1);
}

.translation-toggle-button:hover {
  background-color: rgba(134, 150, 160, 0.2);
}

.translation-toggle-button.active:hover {
  background-color: rgba(var(--icon-green-rgb), 0.2);
}

.translation-toggle-button i {
  font-size: 16px;
}

/* --- Message Bubbles --- */

.message-container {
  display: flex;
}

.message-container.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-container.received {
  align-self: flex-start;
}

.message-bubble {
  padding: 8px 12px;
  border-radius: 18px;
  word-wrap: break-word;
  position: relative;
  min-width: 100px;
  max-width: 100%;
  overflow: hidden;
}

.message-container.sent .message-bubble {
  background-color: var(--bg-outgoing-bubble);
  color: var(--text-primary);
  border-bottom-right-radius: 4px; /* Sent bubble tail */
  box-shadow: 1px 2px 3px rgba(0, 0, 0, var(--message-bubble-shadow-opacity));
}

.message-container.received .message-bubble {
  background-color: var(--bg-incoming-bubble);
  color: var(--text-primary);
  border-top-left-radius: 4px; /* Received bubble tail */
  box-shadow: -1px 2px 3px rgba(0, 0, 0, var(--message-bubble-shadow-opacity));
}

.message-text,
.message-text-translated {
  margin: 0;
  word-wrap: break-word;
  margin-bottom: 4px;
  white-space: pre-wrap;
}

.message-metadata {
  font-size: 0.65em;
  opacity: 0.8;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.message-container .message-metadata {
  opacity: 0.7;
}

.message-container.sent .message-metadata {
  color: var(--text-secondary);
}

.source-language-indicator {
  font-size: 0.9em;
  opacity: 0.7;
  margin-right: 8px;
  display: inline-block;
}

.message-text-translated {
  margin: 4px 0;
  padding-left: 8px;
  word-wrap: break-word;
  white-space: pre-wrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.translation-icon {
  font-size: 0.8em;
  opacity: 0.7;
  color: var(--text-secondary);
  margin-top: 2px;
  flex-shrink: 0;
}

.translation-prefix {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-right: 4px;
  flex-shrink: 0;
}

/* L2 translation styling (primary study language) */
.message-text-translated.l2-translation {
  font-size: 1em;
  color: var(--text-primary);
}

/* L1 translation styling (native language) */
.message-text-translated.l1-translation {
  font-size: 0.9em;
  color: var(--text-secondary);
  opacity: 0.85;
}

/* Original text when shown at bottom for foreign messages */
.message-text-original {
  font-size: 0.85em;
  color: var(--text-tertiary);
  opacity: 0.7;
  margin-top: 6px;
}

/* === Error and Status Icons in Message Bubble === */
.status-icon {
  font-size: 0.8em;
  opacity: 0.8;
}

.translation-error-icon {
  color: var(--danger-color);
}

/* --- Chat Input Area --- */

.chat-input-container {
  display: flex;
  padding: 8px 16px;
  border-top: 1px solid var(--border-input-container);
  background-color: var(--bg-input-container);
  align-items: flex-end; /* Align items to bottom as textarea grows */
  min-height: var(--bottom-bar-height); /* Added min-height based on variable */
}

.message-input-form {
  display: flex;
  flex: 1;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-input);
  border-radius: 12px;
  padding: 0 8px 0 0; /* Remove most padding, handled by textarea/button */
  min-height: 43px; /* To have a proper minimum height which makes the chat-input-container the same (min) height as the bottom mobile menu */
}

/* Language Assistant Button */
.language-assistant-button {
  background: none;
  border: none;
  color: var(--icon-secondary);
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-assistant-button:hover:not(:disabled) {
  color: var(--icon-green);
}

.language-assistant-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Target the TEXTAREA specifically */
.message-input-form textarea {
  /*
    Height is controlled by JS based on content + MIN/MAX height from config.
    These styles set the default/fallback size and overflow behavior.
    Use CSS vars for max/min height fallback.
  */
  max-height: var(--message-input-max-height, 100px); /* Use CSS variable */
  min-height: var(--message-input-min-height, 20px); /* Use CSS variable */
  overflow-y: hidden; /* Managed by JS based on height, default is hidden */
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-input);
  font-size: 15px;
  padding: 8px 12px;
  margin-right: 8px;
  resize: none;
  border-radius: 18px;
  line-height: 1.4;
  box-sizing: border-box;
}

.message-input-form textarea:focus {
  outline: none;
}

.message-input-form textarea::placeholder {
  color: var(--text-tertiary);
}

.message-input-form button {
  background: none;
  border: none;
  color: var(--icon-secondary);
  font-size: 18px;
  padding: 8px 10px; /* Adjust padding for vertical alignment */
  cursor: pointer;
  transition: color 0.2s ease;
  align-self: flex-end; /* Keep send button aligned to bottom */
  margin-bottom: 1px; /* Fine-tune vertical alignment with textarea bottom */
}

.message-input-form button:hover {
  color: var(--icon-primary);
}

.message-input-form button:disabled {
  color: var(--icon-disabled);
  cursor: not-allowed;
}

.chat-window-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  text-align: center;
  padding: 20px;
}

.chat-window-placeholder-icon {
  font-size: 70px;
  color: var(--icon-green);
  margin-bottom: 20px;
  border: 3px solid var(--icon-green);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-window-placeholder h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.chat-window-placeholder p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 500px;
  line-height: 1.6;
}

/* Contact management styles */
.add-contact-form {
  padding: 16px;
  border-bottom: 1px solid var(--border-divider);
}

.add-contact-form h4 {
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 10px;
}

.add-contact-form form {
  display: flex;
  gap: 10px;
}

.add-contact-form input {
  flex: 1;
  padding: 8px 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  color: var(--text-input);
}

.add-contact-form button {
  background-color: var(--icon-green);
  color: var(--text-app-title);
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
}

.add-contact-form button:disabled {
  background-color: var(--bg-input-container);
  color: var(--text-tertiary);
}

.pending-requests,
.accepted-contacts,
.pending-outgoing {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-divider);
}

.pending-requests h4,
.accepted-contacts h4,
.pending-outgoing h4 {
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 10px;
}

.request-actions {
  display: flex;
  gap: 5px;
}

.request-actions button {
  background-color: var(--icon-green);
  color: var(--text-app-title);
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.request-actions button:last-child {
  background-color: var(--danger-color);
}

/* Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(var(--icon-green-rgb), 0.1);
  border-left-color: var(--icon-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Profile and settings menu */
.profile-menu {
  position: relative;
  margin-top: auto;
  margin-bottom: 20px;
}

.profile-dropdown {
  position: absolute;
  left: 50px;
  bottom: 0;
  width: 180px;
  background-color: #2a3942;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
  overflow: hidden;
}

.profile-dropdown-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  color: #e9edef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.profile-dropdown-item:hover {
  background-color: #374248;
}

.profile-dropdown-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* User Settings Modal */
.user-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  /* Use dynamic viewport height; prefer dvh when available */
  height: calc(var(--vh, 1vh) * 100);
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Include safe-area insets so content avoids notch/home bar */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  z-index: 1000;
}

.user-settings-content {
  background-color: var(--popup-bg);
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  overflow-y: auto;
  color: var(--text-primary);
  box-shadow: var(--popup-shadow);
  /* Constrain to parent overlay height minus vertical margins */
  max-height: calc(100% - 2rem);
  margin: 1rem auto; /* Keep modal within viewport bounds */
}

.user-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-strong);
}

.user-settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.close-button {
  background: none;
  border: none;
  color: var(--icon-primary);
  font-size: 24px;
  cursor: pointer;
}

.close-button:hover {
  color: var(--text-primary);
}

.settings-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-divider);
}

/* Class to remove the bottom border */
.settings-section.no-border {
  border-bottom: none;
}

.settings-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.settings-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}

.settings-section select {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  background-color: var(--bg-input-container);
  border: 1px solid var(--border-input);
  color: var(--text-primary);
  font-size: 15px;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23aebac1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 12px auto;
}

.settings-help-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.settings-actions {
  padding: 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Specific styles for language section actions */
.settings-language-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.settings-error-message {
  color: var(--danger-color);
  font-size: 14px;
  margin: 10px 0;
}

.inline-success-message {
  color: var(--icon-green);
  font-size: 14px;
  margin-right: 10px;
}

.save-button {
  padding: 10px 20px;
  background-color: var(--icon-green);
  color: var(--text-app-title);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.save-button:hover {
  background-color: var(--icon-green);
  opacity: 0.9;
}

.save-button:disabled {
  background-color: var(--bg-input-container);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

/* Styling for the language toggle in messages */
.translate-toggle {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-left: 4px;
  cursor: pointer;
  padding: 0;
}

.translate-toggle:hover {
  color: var(--icon-green);
}

/* Theme Selection Styles */
.theme-buttons-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.theme-button {
  flex: 1 1 calc(33.333% - 10px); /* Allow three buttons to fit with gap in between */
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-input);
  background-color: var(--bg-input-container);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 90px; /* Ensure buttons have a minimum width */
}

.theme-button.active {
  border-color: var(--icon-green);
  background-color: var(--bg-hover);
  color: var(--icon-green);
}

.theme-button:hover {
  background-color: var(--bg-hover);
}

.theme-button i {
  font-size: 16px;
}

/* Message styles */
.message.error-message,
p.error-message {
  color: var(--danger-color);
  font-size: 14px;
  margin: 5px 0;
}

.message.success-message,
p.success-message {
  color: var(--icon-green);
  font-size: 14px;
  margin: 10px 0;
}

.loading-text,
.info-text {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 10px 16px;
  text-align: center;
}

/* Message coloring for add contact form */
.add-contact-form .message.error-message {
  color: var(--danger-color);
  margin: 5px 0;
  padding: 0;
  font-size: 0.85em;
  text-align: left;
  background-color: transparent;
  border: none;
}

.add-contact-form .message.success-message {
  color: var(--icon-green);
  margin: 5px 0;
  padding: 0;
  font-size: 0.85em;
  text-align: left;
}

/* Bottom Nav Item Container (for More menu) */
.bottom-nav-item-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* More Menu Styles */
.more-menu {
  position: absolute;
  bottom: var(--bottom-bar-height);
  right: 4px;
  min-width: 180px;
  background-color: var(--bg-panel-header); /* Match bottom nav background */
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.more-menu-item {
  display: flex;
  align-items: center;
  padding: 20px 18px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.more-menu-item:last-child {
  border-bottom: none;
}

.more-menu-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.more-menu-item:hover {
  background-color: var(--bg-hover);
}

.more-menu-item.logout {
  color: var(--danger-color);
}

.more-menu-item.logout i {
  color: var(--danger-color);
}

/* More Menu Version Info */
.more-menu-version {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-default);
}

.more-menu-app-name {
  font-size: 12px;
}

.more-menu-version-line {
  font-size: 11px;
  opacity: 0.7;
}

/* Logout Confirmation Dialog */
.logout-confirmation {
  position: absolute;
  bottom: var(--bottom-bar-height);
  right: 10px;
  background-color: var(--bg-panel-header);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 250px;
  z-index: 1001;
  border: 1px solid var(--border-strong);
  text-align: center;
}

.logout-confirmation p {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 15px;
}

.logout-confirmation-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.logout-confirmation-buttons button {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  background-color: var(--bg-input-container);
  color: var(--text-primary);
}

.logout-confirmation-buttons button.confirm-logout {
  background-color: var(--danger-color);
  color: white;
}

.logout-confirmation-buttons button:hover {
  opacity: 0.9;
}

/* Date Separator Styles */
.date-separator {
  display: flex;
  align-items: center;
  margin: 16px 0;
  position: relative;
  text-align: center;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-divider);
}

.date-separator-text {
  color: var(--text-tertiary);
  font-size: 12px;
  margin: 0 10px;
  padding: 0 8px;
  background-color: var(--bg-secondary); /* Match chat background */
  position: relative;
  z-index: 1;
}

/* Styles for Chat Header Settings Popup */

.chat-header__settings-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  background: rgba(var(--icon-green-rgb), 0.1);
  border-radius: 8px;
}

.chat-header__settings {
  background: none;
  border: none;
  color: var(--icon-primary);
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.chat-header__settings:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.chat-header__settings--language {
  font-size: 0.8rem;
  margin-right: 8px;
  color: var(--text-primary);
}

.chat-settings-popup {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background-color: var(--popup-bg);
  border-radius: 8px;
  box-shadow: var(--popup-shadow-strong);
  z-index: 10;
  min-width: 280px;
  border: 1px solid var(--border-strong);
  overflow: visible; /* Allow dropdowns to extend beyond popup boundaries */
  padding: 10px;
}

.chat-settings-popup-item {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.15s ease;
}

.chat-settings-popup-item:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.6;
}

.chat-settings-popup-item:disabled:hover {
  background-color: transparent;
}

.chat-settings-popup-item__description {
  font-size: 14px;
  color: var(--text-tertiary);
  opacity: 0.8;
  margin-top: -10px;
  padding-top: 0;
  cursor: default;
}

.chat-settings-popup-item__description--disabled {
  opacity: 0.5;
}

/* Styling for the ON/OFF status text */
.setting-status {
  font-weight: 600;
  font-size: 0.9em;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--text-secondary); /* Default OFF color */
  background-color: var(--bg-secondary);
  cursor: pointer;
}

.chat-settings-popup-item.active .setting-status {
  color: var(--icon-green); /* Active ON color */
  background-color: rgba(var(--icon-green-rgb), 0.1);
}

/* Specific styles for the study language row */
.study-language-item {
  cursor: default; /* Not directly clickable */
  flex-direction: column; /* Stack vertically */
  align-items: flex-start; /* Align items to start */
  justify-content: flex-start; /* Remove space-between */
  gap: 6px; /* Add gap between label and select */
}

/* .study-language-item:hover {
  background-color: transparent;
} */

.study-language-item label {
  flex-shrink: 0;
  font-weight: 500;
}

.study-language-item select {
  flex-grow: 0;
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  background-color: var(--bg-input-container);
  border: 1px solid var(--border-input);
  color: var(--text-primary);
  font-size: 14px;
}

.study-language-item select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Saving Indicator and Message */
.popup-saving-indicator,
.popup-save-message {
  padding: 6px 14px;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--border-divider); /* Separator */
}

.popup-saving-indicator {
  color: var(--text-secondary);
}

.popup-save-message.success {
  color: var(--icon-green);
}

.popup-save-message.error {
  color: var(--danger-color);
}

/* Language Selector Styles - Now using LanguageSelector component */
.language-selector-container {
  position: relative;
  width: 100%;
}

/* --- Contacts View Toggle Menu --- */
.contact-view-toggle {
  display: flex;
  border-bottom: 1px solid var(--border-divider);
  background-color: var(--bg-secondary); /* Slightly different background */
  flex-shrink: 0; /* Prevent shrinking */
  padding: 0 8px; /* Add some horizontal padding */
}

.contact-view-toggle .toggle-button {
  flex: 1;
  padding: 12px 5px; /* Vertical padding, less horizontal */
  background: none;
  border: none;
  border-bottom: 3px solid transparent; /* Underline for active state */
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition:
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
  position: relative; /* For badge */
  border-radius: 4px 4px 0 0; /* Slight rounding at top */
}

.contact-view-toggle .toggle-button:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.contact-view-toggle .toggle-button.active {
  color: var(--accent-color); /* Use accent color */
  border-bottom-color: var(--accent-color);
}

/* Style for disabled toggle button */
.contact-view-toggle .toggle-button:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.6;
  background-color: transparent;
  border-bottom-color: transparent;
}

.toggle-badge {
  display: inline-block; /* Use inline-block for badge */
  background-color: var(--accent-color); /* Use accent color */
  color: white;
  border-radius: 10px; /* Pill shape */
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle; /* Align badge nicely */
}

/* Ensure the container below the toggle fits */
.contacts-view-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden; /* Prevent content overflow issues */
}

/* --- Contact List Specific Styles --- */
.contact-list-content {
  flex: 1; /* Allow list to take remaining space */
  overflow-y: auto; /* Make list scrollable */
}

/* General List Item Styles (Consolidate) */
.list-container {
  /* Container for any list (conversations, contacts, etc.) */
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Add loading container styles */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-secondary);
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 10px 16px; /* Adjusted padding */
  border-bottom: 1px solid var(--border-divider);
  cursor: pointer;
  transition: background-color 0.2s;
  min-height: 72px; /* Ensure consistent height */
}

.list-item:last-child {
  border-bottom: none; /* Remove border for the last item */
}

.list-item:hover {
  background-color: var(--bg-hover);
}

.list-item.active {
  background-color: var(--bg-active); /* Distinct active background */
}

.list-item .avatar {
  width: 48px; /* Consistent avatar size */
  height: 48px;
  margin-right: 12px;
  flex-shrink: 0; /* Prevent avatar shrinking */
}

.list-item-details {
  flex: 1;
  overflow: hidden; /* Prevent text overflow */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center details vertically */
  gap: 2px; /* Small gap between name and subtext */
}

.list-item-name {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-subtext {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center; /* Center meta content */
  margin-left: 10px; /* Use margin instead of padding */
  flex-shrink: 0; /* Prevent meta shrinking */
  min-width: 55px; /* Consistent width for meta column */
  gap: 4px; /* Gap between time and badge */
  text-align: right;
}

.list-item-time {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.list-item-badge {
  background-color: rgba(var(--icon-green-rgb), 0.8);
  color: white;
  border-radius: 10px; /* More rounded */
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  display: inline-flex; /* Use inline-flex */
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  line-height: 1;
}

/* Conversation Specific */
.conversation-item.unread .conversation-name {
  font-weight: 600; /* Bolder name for unread */
}
.conversation-item.unread .conversation-message {
  color: var(--text-primary); /* Darker message preview for unread */
}

/* Request Item Specific Styles */
.request-item .request-actions {
  display: flex;
  gap: 8px; /* Space between buttons */
  margin-left: auto; /* Push actions to the right */
  padding-left: 10px;
  flex-shrink: 0;
}

.request-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    opacity 0.2s,
    background-color 0.2s;
  display: flex; /* Align loading indicator */
  align-items: center;
  justify-content: center;
  min-width: 70px; /* Ensure buttons have minimum width */
}

.request-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.request-actions .accept-button {
  background-color: var(--icon-green);
  color: white;
}
.request-actions .accept-button:hover:not(:disabled) {
  background-color: var(--icon-green-darker);
}

.request-actions .decline-button {
  background-color: var(
    --danger-color
  ); /* Or a less aggressive color like gray */
  color: white;
}
.request-actions .decline-button:hover:not(:disabled) {
  background-color: var(--danger-darker);
}

/* Delete invitation button - discreet trash icon style */
.request-actions .delete-invitation-button {
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition:
    background-color 0.2s,
    color 0.2s,
    opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
}

.request-actions .delete-invitation-button:hover:not(:disabled),
.request-actions .delete-invitation-button:focus:not(:disabled),
.request-actions .delete-invitation-button:active:not(:disabled) {
  background-color: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.request-actions .delete-invitation-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sent-request-item {
  cursor: default !important; /* Explicitly make not clickable */
  opacity: 0.8;
}

.sent-request-item:hover {
  background-color: var(--bg-primary); /* Prevent hover effect */
}

.sent-request-item .contact-status {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* --- NEW: Add Contact Row Styles --- */
.add-contact-row {
  cursor: pointer;
  background-color: var(--bg-secondary); /* Slightly different background */
}

.add-contact-row:hover {
  background-color: var(--bg-hover); /* Hover effect */
}

.add-contact-avatar {
  /* Match general avatar size */
  width: 48px;
  height: 48px;
  border-radius: 25%; /* Match other avatars */
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-avatar-subtle); /* A different background */
  border: 1px dashed var(--icon-primary); /* Dashed border */
  color: var(--icon-primary); /* Icon color */
}

.add-contact-avatar i {
  font-size: 18px;
}

.add-contact-text {
  color: var(--text-primary); /* Or use accent color */
  font-weight: 500;
}

/* --- Add Contact Modal --- */
/* Reuse .user-settings-modal and .user-settings-content */
.add-contact-modal {
  /* Inherits backdrop from .user-settings-modal */
}

.add-contact-modal-content {
  /* Inherits general modal styles from .user-settings-content */
  max-width: 450px;
}

/* --- AI Chat Setup Modal --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--popup-bg);
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  padding: 24px;
  color: var(--text-primary);
  box-shadow: var(--popup-shadow);
  max-height: calc(
    var(--vh, 1vh) * 90
  ); /* Use dynamic viewport height for mobile browser compatibility */
  overflow-y: auto;
}

.modal-content h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-content p {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-strong);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-close-button {
  background: none;
  border: none;
  color: var(--icon-primary);
  font-size: 24px;
  cursor: pointer;
}

.modal-close-button:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
}

.modal-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: left;
}

.form-help {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: block;
}

.add-contact-modal-form {
  padding: 20px 24px; /* Consistent padding */
}

.modal-explanation {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: left;
}

.add-contact-modal-form .form-group {
  margin-bottom: 16px;
}

.add-contact-modal-form label {
  display: block; /* Ensure label is on its own line */
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
}

.add-contact-modal-form input[type='email'],
.add-contact-modal-form input[type='text'],
.add-contact-modal-form textarea,
.add-contact-modal-form select {
  /* Use existing input styles if available, or define */
  width: 100%;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background-color: var(--bg-input);
  color: var(--text-input);
}

.add-contact-modal-form textarea {
  resize: vertical;
  min-height: 60px;
}

.add-contact-modal-form input[type='email']:focus,
.add-contact-modal-form input[type='text']:focus,
.add-contact-modal-form textarea:focus,
.add-contact-modal-form select:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.add-contact-modal-form .email-invite-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-divider);
}

.add-contact-modal-form .email-invite-section h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.add-contact-modal-form .character-count {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 4px;
}

/* Modal Actions (Cancel/Add Buttons) */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-divider);
}

.modal-actions button {
  padding: 9px 18px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s,
    opacity 0.2s;
}

.modal-actions .cancel-button {
  background-color: var(--bg-secondary); /* Use secondary bg */
  color: var(--text-primary);
  border: 1px solid var(--border-input);
}
.modal-actions .cancel-button:hover:not(:disabled) {
  background-color: var(--bg-hover);
}

.modal-actions .add-button {
  background-color: var(--icon-green);
  color: white;
  border: none;
  display: flex; /* Align loading indicator */
  align-items: center;
  justify-content: center;
  min-width: 110px; /* Give it some base width */
}
.modal-actions .add-button:hover:not(:disabled) {
  background-color: var(--icon-green-darker);
}

.modal-actions .button {
  padding: 9px 18px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s,
    opacity 0.2s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
}

.modal-actions .button.secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
}

.modal-actions .button.secondary:hover:not(:disabled) {
  background-color: var(--bg-hover);
}

.modal-actions .button.primary {
  background-color: var(--icon-green);
  color: white;
}

.modal-actions .button.primary:hover:not(:disabled) {
  background-color: var(--icon-green-darker);
}

.modal-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Align message inside modal */
.add-contact-modal-form .message {
  text-align: left;
  margin-top: 10px;
  margin-bottom: -5px; /* Reduce space below message */
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
}

.add-contact-modal-form .success-message {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.add-contact-modal-form .error-message {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

/* --- Feedback Chat Row Styling --- */

/* Previously applied a greenish tint to feedback row; per CON-28 adjust styling:
   - Remove tint from feedback rows
   - Apply highlight to actively selected conversation instead
*/
.feedback-chat-row {
  background-color: transparent;
}
body[data-theme='dark'] .feedback-chat-row {
  background-color: transparent;
}

/* No special hover for feedback row */
.feedback-chat-row:hover {
  background-color: var(--bg-hover); /* fall back to default hover */
}
body[data-theme='dark'] .feedback-chat-row:hover {
  background-color: var(--bg-hover);
}

/* Active conversation gets a distinct highlight */
.ai-chat-row.list-item.active,
.list-item.active {
  background-color: var(--bg-active, var(--bg-hover));
  border-left: 3px solid var(--icon-green);
}

/* Style the avatar container specifically for the feedback row */
.feedback-chat-header .avatar,
.feedback-chat-row .avatar {
  background-color: var(
    --feedback-avatar-bg,
    #7a9ceb
  ); /* New: use dedicated feedback color */
  color: white; /* Icon color */
  font-size: 22px; /* Adjust icon size if needed */
}

/* --- AI Chat Styling --- */

.ai-chat-row .avatar,
.ai-chat-header .avatar {
  background-color: var(--ai-chat-primary); /* Use AI primary theme color */
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-input);
}

.ai-chat-header i {
  color: var(--icon-primary);
}

.ai-chat-row .avatar i,
.ai-chat-header .avatar i {
  font-size: 20px;
  color: white;
}

/* Subtle background for AI chat rows */
.ai-chat-row {
  background-color: var(--bg-ai-chat-row, rgba(100, 100, 100, 0.02));
}

body[data-theme='dark'] .ai-chat-row {
  background-color: var(--bg-ai-chat-row-dark, rgba(255, 255, 255, 0.02));
}

.ai-chat-row:hover {
  background-color: var(--bg-ai-chat-row-hover, rgba(100, 100, 100, 0.05));
}

body[data-theme='dark'] .ai-chat-row:hover {
  background-color: var(--bg-ai-chat-row-dark-hover, rgba(255, 255, 255, 0.05));
}

/* Ensure icon is centered if needed */
.feedback-chat-row .avatar i {
  line-height: 1; /* Helps centering */
}

/* --- End Feedback Chat Row Styling --- */

/* --- Toggle Switch Styles (Added for Notifications) --- */
.settings-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.settings-toggle-container span {
  color: var(--text-primary);
  font-size: 15px;
  margin-right: 10px; /* Add some spacing */
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  background-color: var(--bg-input-container);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: 1px solid var(--border-input);
  flex-shrink: 0;
}

.toggle-switch-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px; /* Size of the handle */
  height: 20px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.toggle-switch.active {
  background-color: var(--icon-green); /* Active background color */
  border-color: var(--icon-green);
}

.toggle-switch.active .toggle-switch-handle {
  transform: translateX(20px); /* Move handle to the right */
}

.toggle-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* --- End Toggle Switch Styles --- */

/* === New Message Indicator === */
.new-message-indicator {
  position: absolute;
  bottom: 80px; /* Position above input area */
  right: 20px;
  z-index: 10;
  pointer-events: none; /* Allow clicks to pass through container */
}

.new-message-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  pointer-events: auto; /* Allow clicks on button */
  position: relative;
}

.new-message-button:hover {
  background-color: var(--accent-color-hover, var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.new-message-button:active {
  transform: translateY(0);
}

.new-message-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
}

/* === Word-Level Text Selection (msg-words-highlighting-2) === */

/* Word span styling - foundation for Phase 1-4 */
/* STEP 5: Enhanced native selection suppression for Android physical devices */
.word {
  transition: background-color 0.15s ease-in-out;
  cursor: default;

  /* STEP 5: Multiple layers of native selection prevention for maximum compatibility */
  user-select: none;
  -webkit-user-select: none; /* Safari/Chrome/Android WebView */
  -webkit-touch-callout: none; /* iOS Safari - prevents callout menu on long-press */
  -webkit-tap-highlight-color: rgba(
    0,
    0,
    0,
    0
  ); /* Remove iOS/Android tap flash */

  padding: 2px 0;
  touch-action: none; /* Prevent scroll/zoom during drag on mobile */
}

/* Container: ensure touch-action none on the whole selectable area */
.selectable-text-container {
  touch-action: none;
  /* STEP 5: Also prevent native selection on container */
  user-select: none;
  -webkit-user-select: none;
}

/* Space between words - preserve whitespace exactly */
.word-space {
  white-space: preserve;
  user-select: none;
}

/* Highlighted word styling - ensure strong specificity */
.selectable-text-container .word.word-highlighted {
  background-color: rgba(
    135,
    206,
    250,
    0.4
  ) !important; /* Ensure selection wins */
  border-radius: 2px;
}

/* Word Hover Feedback - 40% opacity highlight (desktop only) */
.word:hover:not(.word-highlighted) {
  background-color: rgba(135, 206, 250, 0.15); /* Light blue at 15% opacity */
  border-radius: 2px;
}

/* Don't change already-highlighted words on hover */
.word.word-highlighted:hover {
  background-color: rgba(135, 206, 250, 0.4); /* Keep selection highlight */
}

/* Mobile: No hover/active effects and no bg transitions overriding selection */
@media (hover: none) and (pointer: coarse) {
  .word {
    transition: none;
  }
  .word:hover {
    background-color: transparent !important;
  }
  .word:active {
    background-color: transparent !important;
  }
}

/* Selection tooltip styling */
.selection-tooltip {
  position: fixed; /* Rendered via portal */
  background-color: var(--popup-bg);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--popup-shadow);
  z-index: 1000;
  font-size: 14px;
  line-height: 1.5;
  max-width: min(90vw, 680px);
  max-height: min(80vh, 560px);
  overflow: auto; /* Only scroll when content exceeds max sizes */
  word-break: break-word;
  pointer-events: auto;
}

/* Selection tooltip content container - stacked layout */
.selection-tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Selected text display */
.selection-tooltip-text {
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.5;
}

/* TTS action buttons container - right-aligned */
.selection-tooltip-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

/* TTS button spacing within tooltip */
.selection-tooltip-tts-button {
  flex-shrink: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.selection-tooltip {
  animation: fadeIn 0.15s ease-in-out;
}

/* Mobile adjustments for tooltip */
@media (max-width: 640px) {
  .selection-tooltip {
    max-width: 80vw;
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Chat Window Overlay - Portaled to body and positioned via inline styles */
.chat-window-overlay {
  background-color: rgba(0, 0, 0, 0.1); /* Light mode: subtle dim */
  backdrop-filter: blur(0px); /* No blur per feedback */
  cursor: default;
  pointer-events: auto; /* Receive clicks to dismiss */
  animation: overlayFadeIn 0.15s ease-in-out;
}

/* Dark mode: white base for overlay */
body[data-theme='dark'] .chat-window-overlay {
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
