html, body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 1.05rem;
}

.page {
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
}

main {
    flex: 1;
    display: flex;
    min-height: 0; /* CRITICAL */
    overflow: hidden; /* CRITICAL for mobile keyboard */
}

.chat-page {
    position: relative;
    height: calc(100dvh - 60px); /* or 100dvh for mobile */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.inner-shadow {
  box-shadow: inset 1px 6px 20px 0px rgba(0, 0, 0, 0.09);
  border-radius: 0px;
  padding-top: 30px;
  border-top: 1px solid #ccc;
}

.pb-0 {
  padding-bottom: 0 !important;
}

#home-content h3 {
  text-align: center;
  padding: 10px 0;
}

.inactive {
  color: #ccc;
}

.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-nav h3 {
  margin: 0;
}

.settings-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 60px);
    overflow: hidden;
    padding: 0;
}

.settings-window {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

.main-page {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.main-page-history {
    display: flex;
    flex-direction: column;
    padding: 0;
}

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

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 1.5rem 1.5rem;
    box-shadow: inset 0 -10px 10px -10px rgba(0, 0, 0, 0.2);
}

.chat-input-bar {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px #e3e3e3 solid;
    width: 100vw;
}

.border-line {
  border-bottom: 1px solid #eee;
  width: 100%;
  display: block;
  height: 1px;
  margin-top: 10px;
}

h1 {
    font-size: 1.5rem;
}

h1:focus {
    outline: none;
}

.red {
    color: rgb(105, 10, 10);
}

a, .btn-link {
    color: hsla(98, 94%, 19%, 1.00);
}

.btn-primary {
    color: #fff;
    /* background-color: hsla(98, 94%, 19%, 1.00); */
    /* border-color: hsla(98, 94%, 19%, 1.00); */
    background: #6e9600;
    background: linear-gradient(180deg,rgba(110, 150, 0, 1) 49%, rgba(41, 102, 67, 1) 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid hsla(98, 94%, 19%, 1.00);
    border-radius: 20px;
    width: 60% !important;
    align-items: center;
}

.btn-primary:active {
    background-color: hsla(98, 94%, 19%, 0.8);
    border-color: hsla(98, 94%, 19%, 0.8);
}

.btn-facebook {
    color: #fff;
    /* background-color: hsla(98, 94%, 19%, 1.00); */
    /* border-color: hsla(98, 94%, 19%, 1.00); */
    background: #0966ff;
    background: linear-gradient(180deg,#0966ff 49%, #022660 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #0e035e;
    border-radius: 20px;
    width: 60% !important;
    align-items: center;
}

.btn-facebook:active {
    background-color: hsla(98, 94%, 19%, 0.8);
    border-color: hsla(98, 94%, 19%, 0.8);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  background-color: hsla(0, 0%, 100%, 0.8);
  box-shadow: 0 0 0 0.2rem rgb(182, 226, 184);
}

.btn-secondary {
    color: #fff;
    /* background-color: rgb(205, 80, 2);
    border-color: rgb(205, 80, 2); */
    border-radius: 20px;
    background: #963000;
background: linear-gradient(180deg,rgba(150, 48, 0, 1) 49%, rgba(102, 41, 41, 1) 100%);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid rgb(158, 11, 11);
}

.validation-message {
    color: rgb(158, 11, 11);
}

/* Sidebar links */
.sidebar a {
    color: white !important;       /* makes the text white */
    text-decoration: none;         /* optional: removes underline */
}

/* Optional: hover effect */
.sidebar a:hover {
    color: #f0f0f0 !important;     /* slightly lighter on hover */
}

.sidebar {
    background: hsla(98, 94%, 19%, 1.00); /* solid greenish */
    color: white; /* ensures text is readable */
}

.chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem;
    /* border-top: 1px solid #ddd;
    background: #fff; */
}

#chat-input {
    flex: 1;
    resize: none;
    min-height: 36px;
    max-height: 200px;
    padding: 8px 12px;
    line-height: 1.4;
    border-radius: 18px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 0.95rem;
    overflow-y: auto;
}

svg.icon {
    stroke-width: 2;
}

.chat-icon-header {
    position: fixed;
    right: 10px;
    top: 70px;
    color: black;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    align-items: center;
    justify-content: center;
    display: flex;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-icon-add-header {
    position: fixed;
    left: 10px;
    top: 70px;
    color: black;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    align-items: center;
    justify-content: center;
    display: flex;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-icon-header i {
    font-size: 1.4rem;
    color: black;
    cursor: pointer;
}

.menu-buttons div i.bi {
    font-size: 1.4rem;
    transform: scale(1.1);
    color: white;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjb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ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: hsla(98, 94%, 19%, 1.00);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

/* Input */
#chat-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
    background-color: #484848; /* dark background when not focused */
    color: white;              /* white text */
    font-size: 16px;           /* prevents iOS zoom */
    overflow-y: hidden;        /* for auto-grow textarea */
    resize: none;              /* prevents manual resizing */
    transition: all 0.2s ease; /* smooth focus transition */
}

#chat-input:focus {
    border: 1px solid #666;
    background-color: #fff; /* light background when focused */
    color: black;              /* dark text for readability */
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6); /* light grey for dark background */
}

#chat-input:focus::placeholder {
    color: #999; /* darker grey on light background */
}

.video-container {
  width: 100%;
  height: 300px;
  position: relative;
}

.video-container video {
  width: 100%;
  height: 300px;
  object-fit: cover; /* Fills screen nicely */
  display: block;
}

/* Button */
#send-btn {
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    /* background: hsla(98, 94%, 19%, 1.00); */
    background: #6e9600;
background: linear-gradient(180deg,rgba(110, 150, 0, 1) 49%, rgba(41, 102, 67, 1) 100%);
    color: white;
    font-size: 16px;
}

.mt-12 {
  display: block;
  margin-top: 50px;
}

.w-100 {
    width: 100% !important;
}

p {
    margin: 0;
    padding-bottom: 0px;
}

/* Send Button */

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

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.send-btn i {
  font-size: 1rem;
  color: white;
}

.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 6px 0 0 6px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #aaa;
  border-radius: 50%;
  animation: dotPulse 1.4s infinite ease-in-out;
  opacity: 0.3;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

.typing-indicator {
  margin: 20px 0 20px 8px;
  color: #666;
}

/* Chat History */
.chat-history-wrapper {
    height: calc(100dvh - 60px); /* adjust for header/footer */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
    /* border: 1px solid #eee; */
    border-radius: 8px;
}

.journal-history-wrapper {
  width: 100%;
  height: calc(100dvh - 60px); /* adjust for header/footer */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  /* border: 1px solid #eee; */
  border-radius: 8px;
}

#chat-history-container {
    display: flex;
    flex-direction: column;
}

/* Light grey background for even items */
.chat-history-item:nth-child(even) {
    background-color: #f5f5f5;
}

/* Optional: keep hover highlight */
.chat-history-item:hover {
    background-color: #eaeaea;
}

/* Optional: padding / border consistency */
.chat-history-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns */
  gap: 16px;
  /* max-width: 360px;          optional: prevent grid from stretching too wide */
  padding-top: 0px;
}

.icon-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.icon-cell:nth-child(even) {
  padding: 0 10px 0 10px;
}

.icon-cell img {
  width: 80px;
  height: 80px;
  object-fit: contain; /* optional, keeps aspect ratio */
}

.icon-cell span {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.mood-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Journal */
.main-page-journey {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100dvh;
    width: 100%;
}

.journal-wrapper {
    height: calc(100dvh - 60px);
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    align-items: stretch;
    width: 100%; 
}

#journal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100vw;
}

#journal-container textarea {
    flex: 1;
    width: 100% !important;
    box-sizing: border-box;
    padding: 10px 20px;
    resize: none;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    overflow-y: auto;
    text-align: left !important;
}

#journal-container textarea:focus {
    outline: none;
}

.main-page-journey button {
    width: calc(75% - 20px);
    padding: 10px;
    margin: 8px 10px;
}

/* Home */
.home-page {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 100vw;
    width: 100%;
}

.home-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;       /* stretch to parent width */
    align-items: stretch; 
    overflow-y: auto;
    height: 100dvh;
}

.terms {
  padding: 20px;
}

.terms p {
  padding-bottom: 1rem;
}

#home-container > * {
    width: 100%;
}

#home-content {
    padding: 20px;
}

.no-moods-recorded {
    padding: 20px;
    text-align: center;
    width: 100%;
}

.bb {
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
  margin-bottom: 20px;
}

#mood-container > div {
    padding: 10px 20px;
}

#mood-container > div:nth-child(even) {
    background-color: #f5f5f5;
}

.mood-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
}

.mood-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}

.mood-time {
  font-size: 12px; 
  color: #666; 
  font-weight: bold;
  margin-left: 10px;
}

.mood-info {
  display: flex;
  align-items: center; 
  gap: 12px;
}

.no-moods-recorded {
    padding: 20px;
    text-align: center;
    width: 100%;
}

#home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 100%;
    align-items: stretch;
}

#home-container, #journal-container, #chat-history-container {
    -webkit-overflow-scrolling: touch;
}

.main-page, .home-wrapper, #home-container {
    box-sizing: border-box;
}

.journal-date-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.journal-back-button .btn-back {
  width: 100%;
}

.btn-back-grey {
  background: #484848;
  background: linear-gradient(180deg,rgb(139, 37, 37) 49%, rgb(46, 20, 20) 100%);
  color: white !important;
}

.journal-back-button {
  padding: 20px;
  text-align: center;
  width: 100%;
}

.journal-chat-now-wrapper {
  padding: 20px;
  display: flex;
  gap: 12px;          /* space between buttons */
  justify-content: center;
}

.journal-entry {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.padding-20 {
  padding: 20px;
}

.padding-20-0 {
  padding: 0 20px 20px;
}

.journal-mood {
  flex: 0 0 30px;
  display: flex;           /* Make it a flex container */
  justify-content: center; /* Center horizontally */
  align-items: center;
}

.journal-body {
  flex: 1;
}

.journal-date {
  display: block;
  margin-top: 4px;
  opacity: 0.7;
  font-size: 0.85em;
}

.journal-actions {
  display: flex;
  align-items: center;
}

.journal-actions .btn-icon {
  flex: 1;
  /* background-color: orange; */
  border-radius: 20px;
  background: #963000;
background: linear-gradient(180deg,rgba(150, 48, 0, 1) 49%, rgba(102, 41, 41, 1) 100%);
  color: white;
  max-width: 50px;
}

.journal-actions .btn-save {
  flex: 3;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #114d02;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

#save-bio-error {
  color: red;
  display: none;
  margin: 0 0 10px 0;
  text-align: center;
  height: 30px;
}

#save-bio-success {
  color: green;
  display: none;
  margin: 0 0 10px 0;
  text-align: center;
  height: 30px;
}