/* =====================================================================
   Contact form (/contact) and the owner's messages (/admin/messages).
   Layout, fields and buttons come from settings.css and auth.css.
   ===================================================================== */

/* The honeypot: off screen, not display:none, which some bots skip */
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-optional {
  margin-left: 4px;
  font-weight: normal;
  color: var(--text-muted, #656f77);
}

.contact-sent {
  margin: 0 0 12px;
  font-size: 16px;
}

/* ── Messages ──────────────────────────────────────────────────────── */

admin-messages {
  display: block;
}

.contact-messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-message {
  padding: 12px 14px;
  border: 1px solid var(--border-subtle, #edebe6);
  border-radius: 12px;
  background-color: #ffffff;
}

.contact-message.is-unread {
  border-color: #10b981;
}

.contact-message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.contact-message-head a {
  overflow-wrap: anywhere;
}

.contact-message-new {
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
}

.contact-message-head time {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted, #656f77);
}

.contact-message-text {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.contact-message-actions {
  display: flex;
  gap: 16px;
}

/* ── Overlay over the feed (ContactPanel.js) ───────────────────────── */
/* Same shape as the chat profile: the backdrop fades, the sheet slides  */

contact-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  background-color: rgb(0 0 0 / 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease,
              visibility 0s linear 0.25s;
}

contact-panel.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease,
              visibility 0s;
}

contact-panel-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  min-height: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background-color: #fff;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

contact-panel.is-open contact-panel-sheet {
  transform: translateX(0);
}

contact-panel-sheet:focus {
  outline: none;
}

contact-panel-body {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* The page's settings.css isn't on the feed: the few classes the form uses */
contact-panel .settings-section {
  margin: 0;
}

contact-panel .settings-note {
  margin: 0 0 16px;
  color: var(--text-muted, #656f77);
}

contact-panel .settings-link {
  color: inherit;
  font-weight: 600;
}