:root {
  --blue-lightest: rgb(232, 238, 255);
  --blue-light: rgb(214, 229, 254);
  --blue: rgb(172, 200, 250);
  --blue-dark: rgb(43, 80, 170);
  --blue-darkest: rgb(19,27,40);
}

body {
  background-color: var(--blue-light);
  font-family: Inter, Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, main, footer {
  padding: 1.5rem;
}

header {
  background-color: var(--blue-dark);
}

header > section {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  background-color: var(--blue-dark);
  color: rgb(253, 253, 253);
  max-width: 1800px;
  margin: auto;
}

main {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  @media only screen and (max-width: 940px) {
    flex-direction: column-reverse;
    justify-content: start;
  }
}


main > section:first-of-type {
  @media only screen and (min-width: 941px) {
    flex: 3;
  }
}


footer {
    background-color: var(--blue-darkest);
    color: rgb(253, 253, 253);
    margin-top: auto;
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.4;
  text-wrap: balance;
}

h1, .as-h1 {
    font-size: clamp(4rem, 3.75vw, 7.2rem);
    font-weight: 800;
}

h2, .as-h2 {
    font-size: clamp(3.6rem, 3.125vw, 6rem);
    font-weight: 700;
}

h3, .as-h3 {
    font-size: clamp(3rem, 2.1875vw, 4.2rem);
    font-weight: 700;
}

h5, .as-h5 {
    font-size: clamp(1.8rem, 1.0416666667vw, 2rem);
    font-weight: 700;
    color: var(--blue-dark);
}

.maintitle {
    font-size: clamp(2.0rem, 3.125vw, 6rem);
    font-weight: 700;
}

input, select, textarea {
  padding: 0.4rem;
}

label {
  display: block;
  margin-top: 0.4rem;
}

.submit-button {
  background-color: var(--blue-darkest);
  border: none;
  color: white;
  vertical-align: bottom;
  padding: 16px 32px;
  text-decoration: none;
  margin: 6px 6px;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 1rem;
}

.external:after {
  display: inline-block;
  content: "";
  background-image: url("/images/external-link-svgrepo-com.svg");
  background-size: contain;
  height: 1rem;
  width: 1rem;
  margin-left: 0.4rem;
}
.logo-container {
  align-content: center;
}
.logo {
  flex: 1;
  width:100px; 
}

.center {
  text-align: center;
}

.chat, .input-section, .intro, .main-question, .initial-selection-form {
  max-width: 640px;
  margin: 2rem auto;
}

.input-section {
  background-color: var(--blue);
  border-radius: 1rem;
  padding: 1rem;
  box-sizing: border-box;
}

.input-text {
  background-color: var(--blue-lightest);
  border-radius: 0.4rem;
  padding: 0.4rem;
  min-height: 33vh;
}

.input-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  gap: 0.4rem;
}

.icon-button {
  padding: 0.4rem 0.4rem;
  font-size: 1rem;
  background-color: var(--blue);
  color: var(--blue-darkest);
  border: none;
}

.icon-button:focus {
  background-color: var(--blue-light);
  outline: 1px solid red;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

.chat {
  display: flex;
  flex-direction: column;
}

.chat-ai, .chat-user {
  padding: 1rem;
  width: 75%;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.chat-ai {
  background-color: var(--blue);
}

.chat-ai-summary, .chat-summary {
  background-color: var(--blue-dark);
  color: white;
}

/* New message type styles */
.chat-system {
  background-color: var(--blue-lightest);
  border-left: 4px solid var(--blue-dark);
  font-style: italic;
}

.chat-question {
  background-color: var(--blue);
}

.chat-final-summary {
  background-color: var(--blue-darkest);
  color: white;
  font-weight: 500;
}

.question-progress {
  color: rgba(0, 0, 0, 0.6);
}

.chat-user {
  background-color: var(--blue-light);
  align-self: flex-end;
  text-align: right;
}


.initial-selection-form {
  background-color: var(--blue-light);
  padding: 2em;
  margin-top: 1em;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  text-align: left;
}

.initial-selection-form h3 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.initial-selection-form .submit-button {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.summary-form {
  background-color: var(--blue-light);
  padding: 2em;
  margin-top: 1em;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.summary-form h4 {
  font-size: clamp(1.8rem, 1.0416666667vw, 2rem);
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 1rem;
}

.summary-content {
  background: var(--blue-lightest);
  padding: 2em;
  border-radius: 8px;
  margin-bottom: 1em;
  border: 1px solid #ccc;
}

.approval-section {
  margin-top: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.hidden {
  display: none;
}

.spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 6px solid var(--blue-lightest);
  border-top: 6px solid var(--blue-dark);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 9999;
  background: transparent;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.appointment-section {
  margin-bottom: 1rem;
}

.appointmentTimeslot-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.appointmentTimeslot-section input {
  min-height: 1.5rem;
}

/* Custom validation styles */
.validation-messages {
  margin: 1rem 0;
}

.validation-error {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.validation-error ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #c33;
}

.validation-error li {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.validation-error li:last-child {
  margin-bottom: 0;
}

/* Mobile-specific validation styles */
@media only screen and (max-width: 640px) {
  .validation-error {
    margin: 0.5rem 0;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .validation-error ul {
    padding-left: 1.2rem;
  }
  
  .validation-messages {
    margin: 0.75rem 0;
  }
}

/* Footer link styles */
.footer-link {
  color: rgb(253, 253, 253);
  text-decoration: underline;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--blue-light);
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: white;
  border-radius: 1rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  color: var(--blue-dark);
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  padding: 0 0.5rem;
  background: transparent;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--blue-darkest);
}

.privacy-content {
  color: var(--blue-darkest);
  line-height: 1.6;
  padding: 2rem;
  padding-right: 3rem;
  overflow-y: auto;
  flex: 1;
}

.privacy-content h1 {
  font-size: 2rem;
  color: var(--blue-dark);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-content h1:first-child {
  margin-top: 0;
}

.privacy-content h2 {
  font-size: 1.5rem;
  color: var(--blue-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.privacy-content h3 {
  font-size: 1.25rem;
  color: var(--blue-dark);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul,
.privacy-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
}

.privacy-content a {
  color: var(--blue-dark);
  text-decoration: underline;
}

.privacy-content a:hover {
  color: var(--blue-darkest);
}

@media only screen and (max-width: 640px) {
  .modal {
    padding: 0;
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  
  .privacy-content {
    padding: 1.5rem;
    padding-top: 4rem;
    padding-right: 1.5rem;
  }
  
  .modal-close {
    top: 1rem;
    right: 1rem;
  }
  
  .privacy-content h1 {
    font-size: 1.5rem;
  }
  
  .privacy-content h2 {
    font-size: 1.25rem;
  }
  
  .privacy-content h3 {
    font-size: 1.1rem;
  }
}