:root {
  font-family: system-ui, sans-serif;
  color: #172033;
  background: #f4f6fb;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.65rem 0.9rem;
  color: white;
  background: #3657d6;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.secondary {
  color: #263659;
  background: #e5eaf6;
}

.site-header,
.app-header,
.section-heading,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header {
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: white;
  background: #172033;
}

.site-header p,
.app-header h1,
.app-header p {
  margin: 0;
}

.brand {
  color: white;
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
}

main {
  width: min(96rem, 100%);
  margin: auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.auth-card,
.panel,
.app-header {
  border: 1px solid #dce1ec;
  border-radius: 0.9rem;
  padding: 1rem;
  background: white;
}

.auth-card {
  width: min(28rem, 100%);
  margin: 8vh auto 0;
  padding: 2rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  font-size: 1.1rem;
}

form {
  display: grid;
  gap: 0.55rem;
}

label {
  margin-top: 0.45rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #aeb8cc;
  border-radius: 0.5rem;
  padding: 0.65rem;
  color: #172033;
  background: white;
}

.error,
.status {
  min-height: 1.5rem;
  margin: 0;
}

.error {
  color: #a11b24;
}

.status {
  color: #245b3d;
}

.app-header {
  margin-bottom: 1rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(20rem, 2fr) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.details {
  display: grid;
  gap: 1rem;
}

#preferences-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preference-field {
  display: grid;
  gap: 0.2rem;
}

.preference-field label {
  margin-top: 0;
}

#preferences-status,
#preferences-form > button {
  grid-column: 1 / -1;
}

.plain-list,
.transcript {
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversation-button {
  width: 100%;
  margin-bottom: 0.4rem;
  overflow: hidden;
  color: #263659;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef1f8;
}

.conversation-button[aria-current="page"] {
  color: white;
  background: #3657d6;
}

.transcript {
  display: flex;
  min-height: 8rem;
  max-height: 55vh;
  margin-bottom: 1rem;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.transcript:empty::before {
  margin: auto;
  color: #65708a;
  text-align: center;
  content: attr(data-empty-message);
}

.message {
  max-width: 85%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  overflow-wrap: anywhere;
  background: #eef1f8;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
}

.user-message {
  align-self: end;
  color: white;
  background: #3657d6;
}

.booking-list li {
  padding: 0.75rem 0;
  border-top: 1px solid #e2e6ef;
}

.booking-list h3,
.booking-list p {
  margin-bottom: 0.3rem;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: #e6eaf3;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: capitalize;
}

@media (max-width: 50rem) {
  .site-header,
  .app-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header p {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  #preferences-form {
    grid-template-columns: 1fr;
  }
}
