/**
 * SAF Mail - Inbox three-pane layout.
 *
 * Path C UI (server-rendered HTML + vanilla JS hydration). No JS
 * toolchain. Mirrors the visual language of the other SAF Mail admin
 * screens (saf-mail-crm.css base components).
 */

.saf-mail-inbox-wrap h1 .button {
  margin-left: 0.6em;
  font-size: 0.9em;
  padding: 0 0.5em;
}

.saf-mail-inbox-threepane {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 12px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  min-height: 70vh;
}

.saf-mail-inbox__list,
.saf-mail-inbox__detail,
.saf-mail-inbox__actions {
  background: #fff;
  padding: 12px;
  overflow-y: auto;
  max-height: 80vh;
}

.saf-mail-inbox__list {
  border-right: 1px solid #e2e4e7;
}
.saf-mail-inbox__actions {
  border-left: 1px solid #e2e4e7;
}

.saf-mail-inbox__filterbar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.saf-mail-inbox__filterbar .button.is-active {
  background: #2271b1;
  color: #fff;
  border-color: #2271b1;
}

.saf-mail-inbox__threads {
  list-style: none;
  margin: 0;
  padding: 0;
}

.saf-mail-inbox__threads .saf-mail-list__item {
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  margin-bottom: 6px;
}
.saf-mail-inbox__threads .saf-mail-list__item:hover {
  background: #f6f7f7;
}
.saf-mail-inbox__threads .saf-mail-list__item.is-selected {
  background: #e7f0fa;
  border-color: #2271b1;
}

.saf-mail-list__line1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.saf-mail-list__line2 {
  font-weight: 600;
  margin-top: 2px;
  color: #1d2327;
}
.saf-mail-inbox__preview {
  font-size: 12px;
  color: #50575e;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.saf-mail-inbox__subject {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.saf-mail-inbox__msg {
  border: 1px solid #e2e4e7;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
}
.saf-mail-inbox__msg.is-outgoing {
  background: #f6fbf7;
  border-color: #c8e6c9;
}
.saf-mail-inbox__msg-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #50575e;
  margin-bottom: 6px;
}
.saf-mail-inbox__msg-time {
  color: #8c8f94;
}
.saf-mail-inbox__msg-body {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  margin: 0;
}

.saf-mail-inbox__composer {
  margin-top: 12px;
}
.saf-mail-inbox__composer textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
}
.saf-mail-inbox__allowlist-hint {
  /* contrast tuned for white bg per a11y-contrast-opacity-gotcha memory:
     opacity:0.6 fails 4.5:1; rgba on a darkened base passes. */
  color: rgba(29, 35, 39, 0.82);
  font-size: 12px;
  background: #fff8e1;
  border-left: 3px solid #d4a017;
  padding: 6px 8px;
  margin: 12px 0;
}

.saf-mail-inbox__help {
  border: 1px solid #2271b1;
  border-radius: 4px;
  padding: 16px;
}
.saf-mail-inbox__help table {
  border-collapse: collapse;
}
.saf-mail-inbox__help kbd {
  background: #1d2327;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.saf-mail-inbox__help td {
  padding: 4px 12px;
}

.saf-mail-form__msg.is-error {
  color: #b32d2e;
}
.saf-mail-form__msg.is-success {
  color: #007017;
}
