:root {
    /* Core Neutrals */
    --color-background: #F0F2F5;
    --color-surface: #FFFFFF;
    --color-border: #E5E7EB;
    --color-text-primary: #1E293B;
    --color-text-secondary: #1c2129;
    --color-text-muted: #64748B;
    --card-background: #ffffff;
    --container-background: #c5e4f8;
    --border-color: #b1afaf;

    --nav-text-default: #475569;
    --nav-text-hover: #1E293B;
    --nav-text-active: #FFFFFF;
  
    --nav-bg-hover: #abc9f0;
    --nav-bg-active: #1E40AF;
    /* Accent Colors */
    --color-primary: #3B82F6;
    --color-primary-hover: #2563EB;
    --color-accent: #0EA5E9;
    --color-secondary: #6366F1;
  
    /* Functional Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
  
    /* Gradients */
    --gradient-hero: linear-gradient(90deg, #d2e3fd, #9d9ff7);

    --color-chat-user-bg: var(--color-primary);            /* User message background */
    --color-chat-user-text: #ffffff;                       /* User message text */
    --color-chat-figure-bg: var(--color-surface);          /* Figure message background */
    --color-chat-figure-text: var(--color-text-primary);   /* Figure message text */
  
    --color-chat-border: var(--color-border);              /* Chat bubble border */
    --color-chat-input-bg: var(--color-surface);           /* Chat input background */
    --color-chat-input-border: var(--color-border);        /* Chat input border */
    --color-chat-input-text: var(--color-text-primary);    /* Chat input text */
    --color-chat-input-placeholder: var(--color-text-muted); /* Chat input placeholder */
  
    --color-chat-button-bg: var(--color-primary);          /* Send button background */
    --color-chat-button-bg-hover: var(--color-primary-hover); /* Send button hover */
    --color-chat-button-text: #ffffff;                     /* Send button text */

    --color-chat-user-bg: var(--color-secondary);  /* Purple for user bubble */
  --color-chat-user-text: #FFFFFF;               /* White text */
  --color-chat-figure-bg: var(--color-surface);  /* White for figure bubble */
  --color-chat-figure-text: var(--color-text-primary); /* Dark text for figure */
  --color-chat-border: var(--color-border);
  --color-chat-input-bg: var(--color-surface);
  --color-chat-input-border: var(--color-border);
  --color-chat-input-text: var(--color-text-primary);
  --color-chat-input-placeholder: var(--color-text-muted);
  --color-chat-button-bg: var(--color-primary);
  --color-chat-button-bg-hover: var(--color-primary-hover);
  --color-chat-button-text: #FFFFFF;

  --btn-color-primary: #1a73e8;         /* Blue */
  --btn-color-primary-hover: #1669c1;

  --btn-color-secondary: #34a853;       /* Green */
  --btn-color-secondary-hover: #2c8c46;

  --btn-color-tertiary: #dddddd;        /* Grayish */
  --btn-color-tertiary-hover: #e9e9e9;

  --btn-color-white: #ffffff;
  --btn-color-dark: #222;

  --btn-border-color: #000000;

  --color-white: #ffffff;
  }
  



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;

  }
  
  html, body {
  height: 100svh; /* instead of 100vh */
}


button,
a {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
}


.overflow {
  overflow: hidden;
}

.learn-more {
  background-color: white;
}

  body {
    font-family: 'Inter', sans-serif;
    background: var(--color-background);
    color: var(--color-text-dark);
  }
  .app-container {
    display: flex;
    min-height: calc(var(--vh, 1vh) * 100);

  }
  
  
  /* Sidebar */



  .main-nav {
    margin-top: 16px;
    width: 100%;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
  height: calc(var(--vh, 1vh) * 100);
    background: #e5e7eb;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    justify-content: space-between;

  }
  .sidebar-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .legal-link {
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
  }
  
  .legal-link a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
  }
  
  .legal-link a:hover {
    text-decoration: underline;
  }
  
  .sidebar .profile-icon {
    font-size: 2rem;
    margin-bottom: 16px;
  }
  
  .sidebar nav ul {
    list-style: none;
    width: 100%;
  }
  
  .sidebar nav li {
    margin-bottom: 1rem;
  }
  
  .sidebar nav a {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
  }
  
  .sidebar nav ul li.active a {
    background-color: var(--nav-bg-active);
    color: var(--nav-text-active);
    font-weight: 600;
  }
  
  .sidebar nav ul li a:hover {
    background-color: var(--nav-bg-hover);
    color: var(--nav-text-hover);
  }
  .sidebar nav ul li a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--color-text-dark);
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  
  sidebar nav .active a {
    background: var(--color-accent);
    color: var(--color-text-light);
  }
  
  /* Main Content */
  .main-content {
    padding-left: 260px; /* Only offset sidebar */
    padding-right: 0px;
    padding-top: 2rem;
    padding-bottom: 2rem;
    width: 100%;
  }
  
  
  
  .content-wrapper {
    margin: 0 auto;
    max-width: 1440px;
    width: 100%;
    padding: 0px 40px;
  }
  
  
  .chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
      justify-content: space-between;

}

.chat-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;

  display: none; /* Hidden on desktop */
  margin-bottom: 0px;
  padding: 4px;
  text-align: left;

}

.chat-toggle img {
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
  margin-left: 8px;
}

.mobile-chat-list {
  display: none;
  background: white;
  border-bottom: 1px solid #ccc;
  max-height: 250px;
  overflow-y: auto;
}
/* Fullscreen white action sheet */
.action-sheet {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;      /* 👈 align to left */
  justify-content: flex-start;  /* 👈 align to top */
  padding: 1.5rem 1rem;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.action-sheet-content {
  width: 100%;
}

.action-sheet.hidden {
  display: none;
}

.action-sheet.visible {
  display: flex;
}


.chat-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}



.chat-history-list li:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
}


.action-sheet h3 {
  margin: 1rem 0 1rem 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

#close-chat-sheet {
  height: 56px;
  width: 56px;
}



.close-sheet-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #1e293b;
  cursor: pointer;
}


.close-sheet-btn:hover {
  transform: scale(1.1);
}




.action-sheet.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}


.action-sheet.visible {
  display: flex; /* or block, depending on layout */
  position: fixed;
  top: 16;
  left: 16;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

#clear-history {
  background-color: transparent;
}

.chat-options {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 2rem;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 160px;
}

.dropdown-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #f0f0f0;
}

.dropdown-icon {
  width: 20px;
  height: 20px;
}

.hidden {
  display: none !important;
}





.close-sheet-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  color: #333;
}

.close-sheet-btn:hover {
  color: #000;
}


.action-sheet ul {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  width: 100%;
  text-align: top;
}

.action-sheet li {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  font-size: 1.25rem;
  cursor: pointer;
}

.action-sheet li:hover {
  background-color: #f7f7f7;
}




.mobile-chat-list ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  width: 100%;
}

.mobile-chat-list li {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
    width: 100%;

  
}

/* Show toggle only on mobile */
@media (max-width: 768px) {
  .chat-toggle {
    display: flex;
    flex-direction: row;
  }
}


.chat-toggle.rotate img {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

  
  
  .top-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--color-primary);
    color: var(--color-text-light);
    border-radius: 12px;
    height: 150px;
    margin-bottom: 2rem;
  }
  
  .shape {
    width: 60px;
    height: 60px;
    background: var(--color-secondary);
    border-radius: 8px;
  }
  
  .shape-1 {
    border-radius: 50%;
  }
  
  .shape-2 {
    border-radius: 8px;
  }
  
  .shape-3 {
    border-radius: 0;
  }
  
  /* Card Grid */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  
  .card {
    display: flex;
    flex-direction: column;
    height: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-accent);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .card-header {
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid var(--color-accent);
    z-index: 2;
    background: var(--color-surface);
    position: relative;
  }
  
  .card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .card-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-align: left;
  }
  

  .card-title p {
    font-size: 0.9rem;
    color: var(--color-text-dark);
    text-align: left;
  }

 .card-ellipsis {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-dark);
  margin-left: 0.5rem;
  align-items: center;
  justify-content: center;
  justify-items: center;
  line-height: 1;    /* Keeps it vertically aligned */
  padding-left: 0.5rem;

}
  
  
  .card-body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  
  .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: rgba(236, 236, 236, 0.8); /* Light background color */

  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }
  
.card-footer {
  background: linear-gradient(
    to top,
    rgba(198, 215, 247, 0.4) 0%,
    rgba(198, 215, 247, 0.7) 60%,
    rgba(198, 215, 247, 0.7) 100%
  );
  color: var(--color-text-secondary);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  font-weight: 600;
  color: #555;
  font-size: 0.875rem;
  position: relative;
  font-size: 0.9rem;
}

#auth-controls input[type="tel"],
#auth-controls input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

#verification-code {
  margin-top: 16px !important;
}


#auth-controls input[type="tel"]:focus,
#auth-controls input[type="text"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
  background-color: #fff;
}


.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ccc;
  margin: 0 0.5rem;
}



#auth-controls input{
  margin-bottom: 8px;
}

  
  
  .privacy_content {
    margin-left: 240px;
    padding-left: 40px;
    height: fit-content;
  }
  
  .card-footer p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .card-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  button {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  background-color: var(--btn-color-tertiary);  
color: #000;}

  .primary {
    background-color: var(--color-primary);
    color: var(--color-white);
  }
  
  .primary:hover {
    background-color: #155ab6;
  }
  
  #mobile-only {
  display: none;
}

  .secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
  }
  
  .secondary:hover {
    background-color: #2a8643;
  }
  
  .tertiary {
    background-color: var(--color-tertiary);
    color: var(--color-dark);
    border: 1px solid var(--btn-border-color);
  }
  
  .tertiary:hover {
    background-color: var(--btn-color-tertiary-hover);
  }
  
  
  .card-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
  }
  
  .card img {
    width: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    flex-shrink: 0; /* Prevent image from shrinking */
    position: relative;
  }
  
  .card h3 {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
  }
  
  .card p {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  
  .card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
  }
  
  .card-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
  }
  
  .card-actions .primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }


  .card-actions .primary:hover {
    background-color: var(--color-accent);
  }

  .card-actions .secondary {
    background: var(--color-secondary);
    color: var(--color-text-dark);
  }
  
  .card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
/* chat page */
.app-container {
    display: flex;
  height: calc(var(--vh, 1vh) * 100);
  }
  
  .privacy-container {
    height: fit-content;
  }


  .phone-container {
    padding: 8px;
    border: solid 1px var(--border-color);
    margin-bottom: 24px;
    border-radius: 8px;
  }
  
  .chat-sidebar {
    width: 260px;
    margin-left: 260px; /* match .sidebar width */
    background: var(--color-surface);
    padding: 2rem;
    padding-right: 1rem;
    border-right: 1px solid var(--color-accent);
    z-index: 1;
  }
  
  .google-signin-btn {
    background-color: #4285f4;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
  }
  
  .google-signin-btn:hover {
    background-color: #357ae8;
  }

  #verification-code {
    padding-top: 16px;
  }
  
  
  .chat-sidebar h3 {
    font-size: 20px;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
    margin-top: 16px;
  }
  
  .chat-list {
    list-style: none;
  }
  
  .chat-list li {
    margin-bottom: 16px;
    cursor: pointer;
  }
  
  .chat-list li.active {
    font-weight: bold;
    color: var(--color-primary);
  }
  
  .chat-content {
    max-width: 1440px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-left: 0; /* Ensure no centering via margin */
    position: relative;
    z-index: 2;

  }

  .chat-top-container {
    display: flex;
    flex-direction: column;
    flex: 1;               /* Fills vertical space */
    overflow-y: auto;
    padding-bottom: 0rem;
  }
  
  

  .chat-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;  /* Align content to the left */
    align-items: flex-end;
     position: relative;
  z-index: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  padding-left: 40px;
  }
  
  .chat-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .05); /* Dark overlay */
    z-index: 1;
  }
  
  
  /* Limit content width inside chat */
.chat-overlay {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Push input to bottom */
  align-items: stretch; /* Remove horizontal centering */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  height: 100%;
  overflow-y: auto;
  min-width: 400px;
}

  

  .chat-background {
    width: 100%;
    height: 100%;
    display: flex;
  }
  

  .chat-header h2 {
    font-size: 24px;
  }

  .chat-header {
    padding: 16px;
    background-color: #f3f3f3;
  }

  #user-info {
    border: 1px solid #ccc;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-family: Inter, sans-serif;
    width: 100%;
    }
  
  .label-text {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
  }
  
  .user-name {
    color: #222;
    font-size: 1rem;
    font-weight: 600;
  }
  
  
  
  
  .chat-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 24px;
    overflow-y: auto;
    overflow-y: scroll; /* Keep scroll behavior */
    scrollbar-width: none; /* Firefox */
    padding: 0px 16px 16px;
  }

  .chat-log::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .chat-log .user-message {
    background-color: var(--color-secondary);
  color: #ffffff;
    border-radius: 0.75rem;
    padding: 8px 0px;
    margin: 0.5rem 0;
    max-width: 75%;
    align-self: flex-end;
  }

  #user-message {

    padding: 8px 0px;
   
  }
  .chat-log .figure-message {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    max-width: 75%;
    align-self: flex-start;
  }
  .chat-message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
    text-align: left;  /* Text inside bubble is always left-aligned */
  }
  
  .chat-message.user {
    align-self: flex-end;
  background-color: var(--color-chat-user-bg);
  color: var(--color-chat-user-text);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 20px 0px;
  max-width: 70%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .chat-message.figure {
    align-self: flex-start;
  background-color: var(--color-chat-figure-bg);
  color: var(--color-chat-figure-text);
  border: 1px solid var(--color-chat-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 20px 0px;
  max-width: 70%;
  }
  
  
  
  
  .chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .input-with-button {
    display: flex;
    align-items: center;
    border: 1px solid var(--btn-color-tertiary);
    border-radius: 6px;
    overflow: hidden;
    background-color: white;
    padding:8px;
  }
  
  
  #input-message-buttons {
    padding: 0px;
    height: 100%;
    display: flex;
    gap: 8px;
    align-items: center;
  }

  #input-message-buttons button {
    background: none;
    border: none;
    padding: 0px 8px;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.2s;
  }

  #input-message-buttons button:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  .icon-button {
    width: 24px;
    height: 24px;
    display: block;
  }

  .input-with-button input {
    flex: 1;
    border: none;
    padding: 0rem;
    font-size: 1rem;
    outline: none;
  }
  
  .input-with-button .btn {
    border-radius: 0;
    border-left: 1px solid var(--btn-color-tertiary);
    height: 100%;
    padding: 0.75rem 1rem;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
  }

  
  .chat-input-area input {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
  }
  

  .chat-input-area button {
    height: 100%;
    padding: 0px 8px;
    background-color: transparent;
  }

  #send-message {
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  display: none;
}




  .chat-input-area input[type="text"] {
    flex-grow: 1;
    background-color: var(--color-chat-input-bg);
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: var(--color-chat-input-text);
  }

  .chat-input-area input::placeholder {
  color: var(--color-chat-input-placeholder);
  }
  .chat-log {
    scroll-behavior: smooth;
    margin-top: 0px;
  }

  .chat-message {
  margin-left: auto;  /* for user */
  margin-right: auto; /* for figure */
}



  .figure-image {
    display: flex;
    align-items: flex-end;   /* Aligns the image to the bottom */
    justify-content: center; /* Center horizontally */
    height: 100%;            /* Fills available height of chat-content */
    width: 45%;
  }
  
  
  
  .figure-image img {
    max-height: 100%;    /* Fills height of .figure-image */
    width: 100%;         /* Keeps natural aspect ratio */
    object-fit: contain; /* Ensures full figure is visible */
    object-position: bottom; /* Just in case */
    height: 100%;
  }
  
  .loading-dots {
    display: inline-flex;
    gap: 4px; /* Space between dots */
    align-items: center;
    justify-content: center;
    height: 1em;
  }
  
  .loading-dots div {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    animation: pulse 1s infinite ease-in-out;
  }
  
  .loading-dots div:nth-child(1) {
    animation-delay: 0s;
  }
  
  .loading-dots div:nth-child(2) {
    animation-delay: 0.15s;
  }
  
  .loading-dots div:nth-child(3) {
    animation-delay: 0.3s;
  }
  
  @keyframes pulse {
    0%, 100% {
      transform: scale(0.7);
      opacity: 0.6;
    }
    50% {
      transform: scale(1);
      opacity: 1;
    }
  }
  /* Hero Section */
.hero {
  background: var(--gradient-hero);
  color: white;
  padding: 4rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 3rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #f1f5f9;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.hero-buttons .primary {
  background: var(--color-primary);
  color: white;
}

.hero-buttons .primary:hover {
  background: var(--color-primary-hover);
}

.hero-buttons button:not(.primary) {
  background: white;
  color: var(--color-primary);
  border: 2px solid white;
}

.hero-buttons button:not(.primary):hover {
  background: rgba(255, 255, 255, 0.9);
}

/* How It Works */
.how-it-works {
  background: var(--gradient-hero);
  padding: 4rem 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.step {
  background: var(--card-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  max-width: 100%;
  flex: 1 1 250px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.step h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.step p {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

/* Testimonials */
.testimonials {
  background: var(--color-background);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-text-primary);
}

.testimonial-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 400px;
  flex: 1 1 300px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.testimonial p {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

.testimonial h4 {
  font-weight: 600;
  color: var(--color-primary);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid
   var(--color-border);
   margin-top: 48px;

}


.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-content p {
  color: var(--color-text-muted);
}

.footer-nav a {
  color: var(--color-primary);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 500;
  transition: color 0.3s;
}

#chat-options-wrapper .icon-button {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
}

#chat-options-wrapper .icon-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}


.footer-nav a:hover {
  color: var(--color-primary-hover);
}

#figure-name-mobile {
  font-size: 18px;
}
#figure-title-mobile {
  font-size: 14px;
  margin-top: 2px;
}

.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: #131314;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #e3e3e3;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
  border-color: #8e918f;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity .218s;
  transition: opacity .218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #13131461;
  border-color: #8e918f1f;
}

.gsi-material-button:disabled .gsi-material-button-state {
  background-color: #e3e3e31f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: white;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: white;
  opacity: 8%;
}

.input-error {
  border-color: red !important;
  background-color: #ffecec;
}



 /* === Sidebar === */
.sidebar {
  width: 260px;
  height: calc(var(--vh, 1vh) * 100);
  background-color: #f4f4f6;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.sidebar .main-nav {
  margin-top: 1rem;
}

.sidebar .main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .main-nav li {
  margin-bottom: 1rem;
}

.sidebar .main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #333;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar .main-nav a:hover,
.sidebar .main-nav a.active {
  background-color: #1e40af;
  color: white;
}

/* === Main Layout === */
.app-container {
  display: flex;
  flex-direction: row;
}

.chat-main {
  margin-left: 0px;
  flex: 1;
  padding: 2rem;
}

/* Overlay hidden by default */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999; /* Below sidebar (z-index: 1000) */
}

/* Show overlay when sidebar is open on mobile */
body.sidebar-open .overlay {
  display: block;
}


/* === Hamburger Menu === */
.hamburger {
  display: none;
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  width: auto;
}


body.sidebar-open .hamburger {
  display: none;
}
/* === Sidebar Hidden (for mobile toggle) === */






/* === Show hamburger on mobile only === */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

    .not-mobile {
    display: none;
  }
 



.chat-history-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

#chat-history-sheet {
  background-color: rgb(240, 242, 245);
}

.chat-history-list li {
  background-color: #f9f9f9;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
  border-left: 2px solid var(--color-primary);
}


.chat-history-list li:hover {
  background-color: #e5e7eb;
}



  .chat-main {
    margin-left: 0;
    padding: 1rem;
  }

  .app-container {
    flex-direction: column;
  }
}


  /* end chat page */

 @media (max-width: 1440px) {
    .chat-sidebar {
      width: 220px;
      margin-left: 220px;
      font-size: 14px;
      padding: 24px;

    }

       .main-content {
    padding-left: 220px; /* Only offset sidebar */

    
  }

    .chat-sidebar button {
      font-size: 14px;
    }


    .sidebar {
      width: 220px;
    }
  }
  

  @media (max-width: 900px) {
    .card-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 600px) {
    .card-grid {
      grid-template-columns: 1fr;
    }
  }
  
/* === Responsive === */
@media (max-width: 768px) {

  .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: calc(var(--vh, 1vh) * 100);
  width: 260px;
  background-color: #f4f4f6;
  z-index: 1000;
  overflow-y: auto; /* ✅ Ensure scrollable if content exceeds height */
  transform: translateX(0);
  transition: transform .3s ease;
}



.sidebar.collapsed {
  transform: translateX(-100%);
}
  .page-chat{
    overflow-x: hidden;
  }

  .app-container {
    flex-direction: row;
    background-color: transparent;
  }

  .chat-main {
    margin-left: 0;
    padding: 1rem;
  }

  .chat-sidebar {
    display: none;
    
  }

  .chat-sidebar ul.chat-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.chat-sidebar ul.chat-list li {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding: 0.5rem;
  cursor: pointer;
}

.chat-sidebar ul.chat-list li span {
  display: inline-block;
  max-width: 100%;
}




  .chat-main {
    width: 100%;
    transition: margin-left 0.3s ease;
    padding: 0px;
    min-width: 100%;
    display: flex;
  flex-direction: column;
  height: 100%;
  }

  .sidebar.collapsed ~ .chat-main .chat-content {
    padding-left: 0rem;
    padding-right: 0rem;
  }

.chat-overlay {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 0px;
  height: 100%;
  overflow-y: auto;
  padding: 0 1rem; /* ✅ Add horizontal padding */
  min-width: unset;
    width: 100%;

}


.chat-top-container {
  width: 100%;
}

.figure-image {
  display: none;
}


.chat-header {
    display: flex;
    height: 84px;
    width: 100%;
    background-color: rgba(243, 243, 243);
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 1000;
    padding-left: 80px;
    flex-direction: row;



  }



  .hamburger {
    display: block;
    z-index: 999;
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  body.sidebar-open .hamburger {
    display: none;
  }





   .main-content {
    padding-left: 16px; /* Only offset sidebar */
    padding-right: 16px;
    padding-top: 104px;
    padding-bottom: 16px;
    width: 100%;
    
  }

  .mobile-header {
    display: block;
    height: 84px;
    width: 100%;
    background-color: rgba(243, 243, 243);
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 998;
  }

body.sidebar-open .mobile-header {
  display: none;
}

body.sidebar-open {
  body.sidebar-open {
  overflow: hidden;
  height: 100vh;
  position: fixed;
  width: 100%;
}

}

.content-wrapper {
  padding: 0px;
}

  .chat-message.figure {
    align-self: flex-start;
  background-color: var(--color-chat-figure-bg);
  color: var(--color-chat-figure-text);
  border: 1px solid var(--color-chat-border);
  border-radius: 12px;
  padding: 0.5rem .75rem;
  margin: 8px 0px;
  max-width: 90%;
  }

    .chat-message.user {
    align-self: flex-end;
  background-color: var(--color-chat-user-bg);
  color: var(--color-chat-user-text);
  border-radius: 12px;
  padding: 0.5rem .75rem;
  margin: 8px 0px;
  max-width: 90%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .chat-log {
    padding: 16px 0px;
  }

  .chat-input-area {
  position: relative; /* or static */
  bottom: 0;
  width: 100%;
  padding: 0rem 0rem;
  background-color: white;
  margin-bottom: 16px;
  border-radius: 16px;
  box-sizing: border-box;
  left: 0;
  right: 0;
}


  .chat-top-container {
    padding-bottom: 8px;
  }

  .how-it-works {
    padding: 16px;
  }

  .how-it-works h2 {
    font-size: 24px;
    margin-bottom: 24px;
    margin-top: 8px;
  }

  .how-it-works h3 {
    font-size: 16px;
  }


  .chat-input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 16px;
background: linear-gradient(
    to top,
    rgba(250, 250, 250, 0.6) 0%,
    rgba(250, 250, 250, 0.8) 60%,
    rgba(250, 250, 250, 0.8) 100%
  );    z-index: 999;
    width: auto;
    margin: 0px;
    border-radius: 0px;
    
  }

  .chat-log {
    padding-bottom: 80px; /* give room for input area */
    overflow-y: auto;
  }

    #phone-container {
    
    display: none !important;
  }

  .chat-log {
    scroll-behavior: smooth;
    margin-top: 84px;
  }


  #chat-options-wrapper .icon-button {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
}

#chat-options-wrapper .icon-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}



}



