/* Basic styles for Hatter's enquiry chatbot starter */
:root {
  --bg: #fff8fc;
  --surface: #ffffff;
  --accent: #c90872;
  --accent-soft: #ffe9f5;
  --accent-cool: #0e5d7b;
  --accent-cool-soft: #e8f4f8;
  --border: #1f2937;
  --muted: #5a6578;
  --text: #141b2d;
  --line: rgba(31, 41, 55, 0.22);
  --shadow-soft: 0 8px 22px rgba(25, 34, 52, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #fffdfd 0%, var(--bg) 100%);
  color: var(--text);
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
}

.logo{
  width: 50px;  
  height: auto;
  vertical-align: middle;
  margin-left: 10px;
}

.page-header, .page-footer {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-header {
  border-top: none;
}

.page-footer {
  border-top: 1px solid var(--line);
  border-bottom: none;
  margin-top: 24px;
}

h1 {
  margin: 0 0 4px;
}

h2 {
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
}

.warning {
  text-align: center;
}

.small {
  font-size: 0.9rem;
}

.chat-widget {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);

  width: 420px;
  height: 520px;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  position: relative;

  margin: 0 auto;   /* THIS is the ONLY centering rule you need */
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}

#chatbot-title {
  color: var(--text);
}

.chat-log {
  padding: 12px 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  position: relative;
  pointer-events: auto;
}

.chat-message {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chat-message--bot {
  background: #ffffff;
  border: 1px solid var(--line);
  align-self: flex-start;
}

.chat-message--user {
  background: var(--accent);
  color: #ffffff;
  align-self: flex-end;
}

.chat-meta {
  display: none; /* can be used for timestamps if students want to extend */
}

.quick-actions {
  max-width: 85%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  align-self: flex-start;
}

.quick-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.quick-chip:hover {
  background: var(--accent-cool-soft);
  border-color: rgba(14, 93, 123, 0.35);
  transform: translateY(-1px);
}

.quick-chip:focus {
  outline: 3px solid #fdcde6;
  outline-offset: 2px;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff9fc;
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input button {
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.chat-input button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.important {
  text-align: center;
  font-size: 25px;
  color:red;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}
.chat-input input:focus,
.chat-input button:focus,
button:focus {
  outline: 3px solid #fdcde6;
  outline-offset: 2px;
}

.chat-input input[type="text"]:focus {
  border-color: rgba(201, 8, 114, 0.45);
  box-shadow: 0 0 0 4px rgba(201, 8, 114, 0.12);
}

.panel {
  margin-top: 24px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.code-block {
  padding: 8px;
  background: #0b0c0c;
  color: #f8f8f8;
  border-radius: 6px;
  max-height: 260px;
  overflow: auto;
  font-size: 0.8rem;
}

.btn {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn:hover {
  filter: brightness(0.97);
  border-color: rgba(14, 93, 123, 0.45);
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}


@media (max-width: 600px) {
  .chat-widget {
    max-width: 100%;
    height: 70vh;
  }
}

#contact-form {
  position: static;
  pointer-events: auto;
  width: min(300px, 85%);
  max-width: 85%;
  align-self: flex-start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(25, 34, 52, 0.06);
  margin: 0 0 8px 0;
  display: flex;
  flex-direction: column;
}

#contact-form.is-visible {
  display: flex;
}

#contact-form[hidden] {
  display: none !important;
}

#contact-form h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  text-align: left;
  color: var(--accent-cool);
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  margin-bottom: 6px;
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.86rem;
}

#contact-form textarea {
  resize: vertical;
  min-height: 62px;
  max-height: 120px;
}

#contact-form button {
  width: 100%;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
}

#formbtn {
  background-color: var(--accent);
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  color: white;
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  margin-top: 8px;
  transition: filter 0.2s;
}

#formbtn:hover {
  filter: brightness(0.95);
}

.page-layout {
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 0;
  width: 100%;
}

@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  h1 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .logo {
    width: 38px;
    margin-left: 6px;
  }

  .page-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .chat-center {
    width: 100%;
  }

  .chat-widget {
    width: 100%;
    max-width: 100%;
    height: 70vh;
  }

  .chat-log {
    padding-bottom: 16px;
  }

  .chat-input {
    padding: 10px;
    gap: 6px;
  }

  .chat-input input[type="text"] {
    min-width: 0;
    font-size: 16px;
  }

  #contact-form {
    position: static;
    width: min(300px, 85%);
    max-width: 85%;
    margin: 0 0 8px 0;
    margin-bottom: 0;
  }

  #contact-form input,
  #contact-form textarea {
    font-size: 16px;
  }

  .panel {
    margin: 16px 12px 0;
    padding: 12px;
  }
}

.chat-center {
  width: min(420px, 100%);
  display: flex;
  justify-content: center;
}

/* KEEP CHAT STABLE */
.chat-widget {
  width: min(420px, 100%);
  margin: 0 auto;
}


