/* Contact page. The hero, contents list and body card come from style/doc.css;
   this file adds the four channel cards and the message form. Scoped to
   body.Contact, because Page loads every page stylesheet on every page. */

/* --- Section 1: channel cards ------------------------------------------ */

body.Contact .contact-channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px; /* gap-4 */
}

/* Buttons rather than links: they fill the topic in and scroll, they do not
   navigate. The reset is needed because .modern-forms only removes the legacy
   button styling, it does not supply any. */
body.Contact .contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 20px; /* p-5 */
  border: 1px solid #e6dbf0;
  border-radius: 12px; /* rounded-xl */
  background: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.Contact .contact-channel:hover {
  border-color: #d8b4fe; /* purple-300 */
  box-shadow: 0 4px 6px -1px rgba(126, 96, 246, 0.1);
}

body.Contact .contact-channel:focus-visible {
  outline: 2px solid #9333ea;
  outline-offset: 2px;
}

body.Contact .contact-channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px; /* w-10 */
  height: 40px;
  border-radius: 8px; /* rounded-lg */
  background-image: linear-gradient(to bottom right, #f3e8ff, #ffedd5);
}

body.Contact .contact-channel-icon svg {
  width: 20px;
  height: 20px;
  color: #7e22ce; /* purple-700 */
}

body.Contact .contact-channel-copy {
  display: block;
  min-width: 0;
}

body.Contact .contact-channel-title {
  display: block;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #25153c;
  transition: color 0.15s ease;
}

body.Contact .contact-channel:hover .contact-channel-title {
  color: #7e22ce;
}

body.Contact .contact-channel-text {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  color: #6c5393;
}

/* --- Section 2: the form ----------------------------------------------- */

/* Result of the last submission. The shared getAllFlash() markup predates the
   rebrand, so contactPage renders its own and it is styled here. */
body.Contact .contact-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px !important;
  padding: 14px 16px;
  border: 1px solid #e6dbf0;
  border-radius: 12px;
  font-size: 14px !important;
  line-height: 21px !important;
}

body.Contact .contact-notice svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

body.Contact .contact-notice--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534 !important;
}

body.Contact .contact-notice--success svg {
  color: #16a34a;
}

body.Contact .contact-notice--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b !important;
}

body.Contact .contact-notice--error svg {
  color: #dc2626;
}

body.Contact .contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* space-y-5 */
}

body.Contact .contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

body.Contact .contact-field {
  display: block;
}

body.Contact .contact-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: #25153c;
}

body.Contact .contact-label span {
  color: #9333ea;
}

/* .modern-forms takes the legacy input rules off; these put the design's back
   on. Height matches .doc-btn so a field and a button line up. */
body.Contact .contact-form input[type="text"],
body.Contact .contact-form input[type="email"],
body.Contact .contact-form select,
body.Contact .contact-form textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e6dbf0;
  border-radius: 12px;
  background: #ffffff;
  color: #25153c;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.Contact .contact-form input[type="text"],
body.Contact .contact-form input[type="email"],
body.Contact .contact-form select {
  height: 42px;
}

body.Contact .contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

body.Contact .contact-form input::placeholder,
body.Contact .contact-form textarea::placeholder {
  color: #9a86b8;
}

body.Contact .contact-form input:focus,
body.Contact .contact-form select:focus,
body.Contact .contact-form textarea:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.12);
}

/* The honeypot. Off-screen rather than display:none, because some bots skip
   fields they can tell are hidden. aria-hidden on the wrapper keeps it away
   from screen readers. */
body.Contact .contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.Contact .contact-actions {
  display: flex;
}

body.Contact .contact-actions .doc-btn {
  width: 100%;
  justify-content: center;
}

body.Contact .contact-small {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 18px !important;
  color: #9a86b8 !important;
}

body.Contact .contact-small a {
  color: #7e22ce;
  text-decoration: underline;
}

/* --- Paragraph spacing ------------------------------------------------- */

/* doc.css defaults section paragraphs to the mb-4 of continuous prose. Both
   sections here introduce a block, so they get the design's mb-6 instead. */
body.Contact #doc-sec-1 > p,
body.Contact #doc-sec-2 > p {
  margin-bottom: 24px !important;
}

@media (min-width: 640px) {
  body.Contact .contact-channels,
  body.Contact .contact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.Contact .contact-actions .doc-btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.Contact .contact-channel,
  body.Contact .contact-channel-title,
  body.Contact .contact-form input,
  body.Contact .contact-form select,
  body.Contact .contact-form textarea {
    transition: none;
  }
}
