/* ===== Emporium in-browser reader (all classes prefixed eml-) ===== */

.eml-read-btn {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 15px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.eml-read-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(27, 42, 65, 0.28); }
@media (max-width: 600px) {
  .eml-read-btn { font-size: 0.75rem; padding: 7px 10px; }
}

.eml-reader-overlay {
  position: fixed; inset: 0; z-index: 9500;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: #f1f5f9; color: #1f2937;
  font-family: "Poppins", sans-serif;
}
.eml-reader-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: #1b2a41; color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.eml-reader-title {
  flex: 1; min-width: 0;
  font-family: "Playfair Display", serif; font-weight: 600; font-size: 0.98rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eml-reader-info { font-size: 0.78rem; color: #cbd5e1; white-space: nowrap; }
.eml-reader-bar button {
  flex-shrink: 0; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; transition: background 0.2s ease;
}
.eml-reader-bar button:hover { background: #ff7a18; border-color: #ff7a18; }
.eml-reader--embed .eml-reader-prev,
.eml-reader--embed .eml-reader-next { display: none; }

.eml-reader-view {
  flex: 1; min-height: 0; position: relative;
  overflow: auto; -webkit-overflow-scrolling: touch;
  background: #f8fafc;
}
.eml-reader-canvas {
  display: block; margin: 8px auto; background: #fff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
}
.eml-reader-iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.eml-reader-text {
  max-width: 720px; margin: 0 auto; padding: 24px 18px 60px;
  background: #fff; min-height: 100%;
  white-space: pre-wrap; line-height: 1.75; font-size: 1rem; font-family: Georgia, serif;
}
.eml-reader-status { text-align: center; margin: 18vh 20px 0; color: #6b7280; }
.eml-reader-fallback {
  display: table; margin: 14px auto 0;
  color: #ff7a18; font-weight: 600; text-decoration: none;
}
.eml-reader-fallback:hover { text-decoration: underline; }