/* —— basic reset —— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* —— L'Oréal brand colors and fonts —— */
:root {
  --black: #000000;
  --white: #ffffff;
  --passionate-red: #ff003b;
  --eternal-gold: #e3a535;
  --soft-gray: #f6f6f6;
  --mid-gray: #666666;
}

body {
  min-height: 100vh;
  font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  display: flex;
  justify-content: center;
}

.page-wrapper {
  width: 90%;
  max-width: 960px;
}

/* header */
.site-header {
  text-align: center;
  padding-top: 46px;
}

.brand-logo {
  display: block;
  width: min(250px, 70%);
  height: auto;
  margin: 0 auto 24px;
}

.gold-line {
  width: 42px;
  height: 3px;
  margin: 0 auto 22px;
  background: var(--eternal-gold);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--passionate-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-title {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-intro {
  max-width: 560px;
  margin: 0 auto;
  color: var(--mid-gray);
  font-size: 16px;
  line-height: 1.5;
}

/* chat window */
.chatbox {
  margin: 38px 0;
  padding: 24px;
  border-top: 4px solid var(--black);
  background: var(--soft-gray);
}

.chat-window {
  position: relative;
  height: 360px;
  border: 1px solid var(--black);
  padding: 20px;
  font-size: 18px;
  line-height: 1.5;
  overflow-y: auto;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* This space lets the newest question scroll all the way to the top. */
.chat-window::after {
  content: "";
  flex: 0 0: calc(100% - 80px);
}

/* messages */
.msg {
  width: fit-content;
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.msg.user {
  align-self: flex-end;
  color: var(--white);
  background: var(--black);
  border-bottom-right-radius: 4px;
}

.msg.ai {
  align-self: flex-start;
  color: var(--black);
  background: var(--soft-gray);
  border-left: 4px solid var(--passionate-red);
  border-bottom-left-radius: 4px;
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--black);
  border-radius: 0;
  font-family: inherit;
  font-size: 18px;
  background: var(--white);
}

.chat-form input:focus {
  outline: 3px solid var(--eternal-gold);
  outline-offset: 2px;
}

.chat-form button {
  font-size: 18px;
  background: var(--passionate-red);
  color: var(--white);
  border: none;
  padding: 14px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-form button .material-icons {
  font-size: 24px;
}

.chat-form button:hover {
  background: var(--black);
}

.chat-form button:focus {
  outline: 3px solid var(--eternal-gold);
  outline-offset: 2px;
}

/* visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* footer */
.site-footer {
  margin: 60px 0 40px;
  text-align: center;
  font-size: 14px;
  color: var(--mid-gray);
}

.site-footer img {
  width: 110px;
  height: auto;
  margin-bottom: 14px;
}

.site-footer nav {
  margin-top: 12px;
}

.site-footer a {
  margin: 0 8px;
  color: var(--black);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--passionate-red);
}

/* Keep the chat comfortable to use on smaller screens. */
@media (max-width: 600px) {
  .site-header {
    padding-top: 32px;
  }

  .chatbox {
    margin-top: 30px;
    padding: 14px;
  }

  .chat-window {
    height: 330px;
    padding: 16px;
    font-size: 16px;
  }

  .msg {
    max-width: 88%;
  }

  .chat-form {
    gap: 8px;
  }

  .chat-form input {
    font-size: 16px;
  }
}
