﻿/* Base reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  color: #111;
  background: #f5f2ed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.page-wrapper {
  width: 90%;
  max-width: 960px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  padding: 48px clamp(24px, 5vw, 64px);
}

.site-header {
  display: flex;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 28px;
}

.loreal-logo {
  filter: brightness(0);
}

.tagline {
  flex: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: #b4975a;
  margin-bottom: 12px;
}

.site-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
}

main {
  margin-top: 40px;
}

.chatbox {
  background: linear-gradient(135deg, #ffffff, #f6efe1);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.latest-question {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7040;
  margin-bottom: 12px;
}

.chat-window {
  min-height: 360px;
  max-height: 520px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.msg-row {
  display: flex;
  gap: 12px;
}

.msg-row.user {
  justify-content: flex-end;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.avatar.ai {
  background: #111;
}

.avatar.user {
  background: #d4c7b1;
  color: #111;
}

.msg {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

.msg.user {
  background: #111;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg.ai {
  background: #fff;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.msg-question {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #b4975a;
  margin-bottom: 8px;
}

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

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b4975a;
  animation: pulse 1.2s infinite ease-in-out;
}

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

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.chat-form {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.chat-form input {
  flex: 1;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-size: 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.chat-form input:focus {
  border-color: #b4975a;
  box-shadow: 0 0 0 4px rgba(180, 151, 90, 0.2);
  outline: none;
}

.chat-form button {
  border: none;
  width: 56px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-form button:hover {
  transform: translateY(-2px);
  background: #b4975a;
}

.chat-form button:focus {
  outline: 3px solid rgba(180, 151, 90, 0.4);
  outline-offset: 3px;
}

.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;
}

.site-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.site-footer nav {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.site-footer a {
  color: #111;
  text-decoration: none;
  position: relative;
}

.site-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: #b4975a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-footer a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    text-align: center;
  }

  .msg {
    max-width: 100%;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-form button {
    width: 100%;
    height: 54px;
  }
}
