/* Zeed Inbox — minimal custom styles on top of Tailwind */

/* ─────────────── THEME VARIABLES (dark default + light override) ─────────────── */
:root {
  /* Dark theme (default — unchanged) */
  --bg: #0a0a14;
  --surface: #13131b;
  --surface-elevated: #1b1b23;
  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-active: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #f5f3fa;
  --text-body: #d8d5e4;
  --text-muted: rgba(199, 196, 215, 0.7);
  --text-faint: rgba(199, 196, 215, 0.45);
  --accent: #00ffa3;
  --accent-strong: #4cffbe;
  --accent-bg: rgba(0, 255, 163, 0.04);
  --accent-bg-strong: rgba(0, 255, 163, 0.10);
  --accent-border: rgba(0, 255, 163, 0.3);
  --error: #ffb4ab;
  --error-bg: rgba(255, 180, 171, 0.08);
  --code-bg: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(19, 19, 27, 0.6);
  --backdrop: rgba(10, 10, 20, 0.95);
  --shadow: 0 0 24px rgba(0, 255, 163, 0.15);
}

html.light {
  /* Light theme — flat clean white, uniform throughout */
  --bg: #ffffff;                    /* pure white everywhere */
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f5f6f8;         /* very subtle gray for hover only */
  --surface-active: #eceef2;
  --border: #e5e7eb;                /* clean light gray border */
  --border-strong: #d4d7de;
  --text-primary: #0b0d12;          /* near-black for headings */
  --text-body: #2c3038;             /* dark gray body text */
  --text-muted: #5b6271;            /* secondary text */
  --text-faint: #8a92a3;            /* tertiary / labels */
  --accent: #0d7a4e;                /* deeper, premium emerald */
  --accent-strong: #086c43;
  --accent-bg: #ecfdf5;
  --accent-bg-strong: #d1fae5;
  --accent-border: #99e6c2;
  --error: #c8302e;
  --error-bg: #fef2f2;
  --code-bg: #f5f6f8;
  --glass-bg: #ffffff;
  --backdrop: rgba(255, 255, 255, 0.94);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* Light mode — uniform pure white, no gradient/tinted bg */
html.light body {
  background: #ffffff;
}
html.light #alias-display,
html.light .bg-surface-container,
html.light .bg-surface-container-lowest,
html.light .bg-surface-container-low,
html.light .bg-surface-container-high,
html.light .bg-surface-container-highest,
html.light .bg-surface,
html.light .bg-background {
  background-color: #ffffff !important;
}
html.light #alias-display {
  border-color: var(--border) !important;
}
html.light .border-white\/5,
html.light .border-white\/10,
html.light .border-white\/20 {
  border-color: var(--border) !important;
}
html.light .text-on-surface,
html.light .text-on-background {
  color: var(--text-primary) !important;
}
html.light .text-on-surface-variant,
html.light .text-on-surface-variant\/70 {
  color: var(--text-muted) !important;
}
html.light .hover\:bg-white\/5:hover,
html.light .hover\:bg-white\/10:hover {
  background-color: var(--surface-hover) !important;
}
html.light .glass-card {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: none;
}
html.light header {
  background: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none;
}
html.light #sidebar {
  background: #ffffff !important;
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
html.light .email-item {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: none;
}
html.light .email-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}
html.light .email-item.unread {
  background: #ffffff;
  border-left: 3px solid var(--accent);
  border-color: var(--border) var(--border) var(--border) var(--accent);
}
html.light .email-item.selected {
  background: var(--accent-bg);
  border-color: var(--accent);
}
html.light .email-item .email-subject { color: var(--text-primary); }
html.light .email-item.unread .email-subject { color: var(--text-primary); font-weight: 600; }
html.light .email-item .email-preview { color: var(--text-muted); }

/* Email detail — same pure white as everywhere */
html.light #email-detail-col,
html.light #email-detail,
html.light .email-article {
  background: #ffffff !important;
}

/* Buttons & toggles */
html.light .theme-toggle {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--text-muted);
}
html.light .theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* Topbar action buttons (refresh, copy, etc) */
html.light header button:not(.theme-toggle):not(#mobile-menu):not(#back-to-list) {
  color: var(--text-muted);
}
html.light header button:hover {
  background: var(--surface-hover) !important;
  color: var(--text-primary);
}

/* Email count pill */
html.light #email-count {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 600;
}

/* Sync indicator */
html.light #sync-status { color: var(--text-muted); }
html.light .bg-primary { background-color: var(--accent) !important; }

/* Email detail */
html.light .detail-sender { border-bottom: 1px solid var(--border); }
html.light .detail-avatar {
  filter: saturate(0.85) brightness(0.95);
  box-shadow: none;
}

/* Email body — readable like Stripe docs */
html.light .email-body { color: var(--text-body); }
html.light .email-body h1, 
html.light .email-body h2, 
html.light .email-body h3, 
html.light .email-body h4 { color: var(--text-primary); }
html.light .email-body a { color: var(--accent); }
html.light .email-body a:hover { color: var(--accent-strong); }
html.light .email-body blockquote { 
  border-left-color: var(--accent-border);
  background: var(--accent-bg);
  border-radius: 0 6px 6px 0;
  padding: 8px 14px;
}
html.light .email-body pre, 
html.light .email-body code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
html.light .email-body img { 
  box-shadow: none;
}

/* Token input (welcome page) */
html.light #token-input,
html.light input[type="text"],
html.light input[type="search"],
html.light textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: none;
}
html.light #token-input:focus,
html.light input:focus,
html.light textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  outline: none;
}
html.light input::placeholder, 
html.light textarea::placeholder { color: var(--text-faint); }

/* Welcome page CTA button */
html.light button[id="open-token"],
html.light .btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent-strong);
  box-shadow: none;
}
html.light button[id="open-token"]:hover,
html.light .btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: none;
  transform: none;
}

/* Welcome navigation panel */
html.light nav {
  background: #ffffff !important;
  border-right: 1px solid var(--border);
  box-shadow: none;
}
html.light nav h1 { color: var(--text-primary); }
html.light nav h2 { color: var(--text-faint); letter-spacing: 0.05em; }
html.light nav .glow-accent {
  box-shadow: none;
}

/* Recent items */
html.light .recent-item {
  background: #ffffff;
  border: 1px solid var(--border);
}
html.light .recent-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

/* Toasts */
html.light .toast {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.light .toast.success { border-color: var(--accent-border); }
html.light .toast.success .material-symbols-outlined { color: var(--accent); }
html.light .toast.error { border-color: var(--error); }
html.light .toast.error .material-symbols-outlined { color: var(--error); }

/* Modals */
html.light .modal-backdrop { background: rgba(15, 23, 42, 0.5) !important; }
html.light .glass-card.modal-content {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* Sync indicator dot — softer pulse in light */
html.light .animate-ping { opacity: 0.4; }

/* Scrollbar premium feel */
html.light ::-webkit-scrollbar { width: 10px; height: 10px; }
html.light ::-webkit-scrollbar-track { background: transparent; }
html.light ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 8px;
  border: 2px solid #ffffff;
}
html.light ::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.25); }

/* Body background follows theme */
html, body { background: var(--bg); color: var(--text-body); }
html { transition: background-color 0.3s ease; }
body { transition: background-color 0.3s ease, color 0.3s ease; }

/* Override Tailwind utility colors that depended on hardcoded values */
.bg-background    { background-color: var(--bg) !important; }
.bg-surface       { background-color: var(--surface) !important; }
.text-on-background, .text-on-surface { color: var(--text-body) !important; }
.text-on-surface-variant { color: var(--text-muted) !important; }
.text-primary     { color: var(--accent) !important; }
.bg-primary       { background-color: var(--accent) !important; }
.text-on-primary  { color: #ffffff !important; }
.border-outline-variant, .border-white\/10, .border-white\/5 { border-color: var(--border) !important; }
.bg-white\/5, .bg-white\/3 { background-color: var(--surface-hover) !important; }
.hover\:bg-white\/5:hover, .hover\:bg-white\/3:hover { background-color: var(--surface-hover) !important; }
.text-white       { color: var(--text-primary) !important; }

/* ─────────────── GLASS / SURFACES ─────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.glow-accent {
  box-shadow: var(--shadow);
}

/* Hide scrollbars where intended */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Material Symbols base */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Sidebar drawer state */
#sidebar.open {
  transform: translateX(0) !important;
}

/* Loader bars */
.loader-bars {
  height: 32px;
}
.loader-bars span {
  display: inline-block;
  width: 4px;
  height: 100%;
  background: #00ffa3;
  border-radius: 2px;
  animation: loader-bars 1s ease-in-out infinite;
}
.loader-bars span:nth-child(1) { animation-delay: 0.0s; }
.loader-bars span:nth-child(2) { animation-delay: 0.1s; }
.loader-bars span:nth-child(3) { animation-delay: 0.2s; }
.loader-bars span:nth-child(4) { animation-delay: 0.3s; }
.loader-bars span:nth-child(5) { animation-delay: 0.4s; }
@keyframes loader-bars {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1;   }
}

/* Email item — list */
.email-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  animation: email-fade-in 0.3s ease-out backwards;
}
.email-item:hover {
  background: var(--surface-active);
  border-color: var(--accent-border);
}
.email-item.unread {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}
.email-item.selected {
  background: var(--accent-bg-strong);
  border-color: var(--accent-border);
}
.email-item.unread::before {
  content: "";
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

@keyframes email-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.email-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.email-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: rgba(0,0,0,0.65);
  flex-shrink: 0;
}
.email-meta {
  flex: 1;
  min-width: 0;
}
.email-sender {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 16px;
}
.email-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.email-subject {
  font-size: 13px;
  color: var(--text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 42px;
}
.email-item.unread .email-subject {
  color: var(--text-primary);
  font-weight: 500;
}

/* Recent inbox item */
.recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
}
.recent-item:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}
.recent-item .recent-alias {
  flex: 1;
  font-size: 12px;
  color: var(--text-body);
  font-family: "Space Grotesk", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.recent-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.recent-item .remove-btn {
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-faint);
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.recent-item .remove-btn:hover {
  background: var(--error-bg);
  color: var(--error);
}
.recent-item .remove-btn .material-symbols-outlined { font-size: 14px; }

/* Toast */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toast-in 0.25s ease-out;
}
.toast.success { border-color: var(--accent-border); }
.toast.success .material-symbols-outlined { color: var(--accent); }
.toast.error { border-color: var(--error); }
.toast.error .material-symbols-outlined { color: var(--error); }
.toast.info .material-symbols-outlined { color: #7dd3fc; }
.toast .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────── EMAIL DETAIL (inline, scrollable, Gmail-style) ─────────────── */
.email-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 96px;
  color: var(--text-body);
}
@media (min-width: 768px) {
  .email-article { padding: 32px 28px 96px; }
}

.detail-subject {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.32;
  margin: 0 0 20px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  word-wrap: break-word;
  word-break: break-word;
}
@media (min-width: 768px) {
  .detail-subject { font-size: 24px; margin-bottom: 24px; }
}

/* Sender row — Gmail-style horizontal layout with avatar */
.detail-sender {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0 0 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.detail-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  user-select: none;
}
.detail-sender-info {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
}
.detail-sender-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  margin-bottom: 2px;
}
.detail-sender-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  word-break: break-word;
}
.detail-sender-email {
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  word-break: break-all;
}
.detail-recipient {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}
.detail-meta-label {
  color: var(--text-faint);
}
.detail-recipient-val {
  word-break: break-all;
  font-family: "Space Grotesk", system-ui, sans-serif;
}
.detail-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 3px;
}
@media (max-width: 480px) {
  .detail-date { display: none; }
}

/* Email body — inline rendered, mimics Gmail body area */
.email-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.email-body * { max-width: 100% !important; }
.email-body img,
.email-body video,
.email-body picture { height: auto !important; display: inline-block; border-radius: 4px; }
.email-body a { color: var(--accent); word-break: break-word; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.email-body a:hover { color: var(--accent-strong); }
.email-body p { margin: 0 0 14px; }
.email-body p:last-child { margin-bottom: 0; }
.email-body h1, .email-body h2, .email-body h3, .email-body h4 {
  margin: 22px 0 10px; line-height: 1.3; color: var(--text-primary); letter-spacing: -0.01em;
}
.email-body h1 { font-size: 20px; font-weight: 700; }
.email-body h2 { font-size: 17px; font-weight: 700; }
.email-body h3 { font-size: 15px; font-weight: 600; }
.email-body h4 { font-size: 14px; font-weight: 600; }
.email-body blockquote {
  border-left: 3px solid var(--border-strong);
  padding: 4px 0 4px 14px;
  margin: 14px 0;
  color: var(--text-muted);
}
.email-body pre, .email-body code {
  font-family: "Space Grotesk", monospace;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.email-body pre { padding: 12px; margin: 12px 0; }
.email-body table {
  border-collapse: collapse;
  width: auto !important;
  max-width: 100% !important;
  table-layout: auto;
  margin: 10px 0;
}
.email-body td, .email-body th { word-break: break-word; padding: 4px 8px; vertical-align: top; }
.email-body hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.email-body ul, .email-body ol { padding-left: 22px; margin: 10px 0 14px; }
.email-body li { margin-bottom: 6px; }
.email-body button { max-width: 100% !important; }

/* ─────────────── THEME TOGGLE BUTTON ─────────────── */
.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface-active);
  border-color: var(--accent-border);
  color: var(--accent);
}
.theme-toggle .material-symbols-outlined { font-size: 20px; }
/* show moon (dark icon) when light mode active, sun when dark mode */
.theme-toggle .icon-light { display: none; }
.theme-toggle .icon-dark  { display: inline-block; }
html.light .theme-toggle .icon-light { display: inline-block; }
html.light .theme-toggle .icon-dark  { display: none; }

/* Light-mode adjustments for elements that need extra contrast */
html.light .email-item.unread::before { box-shadow: 0 0 6px rgba(0, 167, 106, 0.4); }
html.light .glow-accent { box-shadow: 0 4px 24px rgba(0, 167, 106, 0.15); }
html.light .toast { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12); }
html.light input::placeholder, html.light textarea::placeholder { color: var(--text-faint); }
html.light input, html.light textarea { color: var(--text-primary); }
html.light .detail-avatar { filter: saturate(0.9) brightness(1.05); }

/* ─────────────── LIST <-> DETAIL TOGGLE (all viewports) ─────────────── */
/* Single full-width view at all breakpoints. Klik email = swap to detail. */
#inbox-view #email-list-col      { display: flex; }
#inbox-view #email-detail-col    { display: none; }

#inbox-view.show-detail #email-list-col   { display: none; }
#inbox-view.show-detail #email-detail-col { display: flex; }

/* Show back button whenever in detail view (mobile + desktop) */
body:has(#inbox-view.show-detail) #back-to-list { display: grid; }
body:has(#inbox-view.show-detail) #mobile-menu  { display: none; }

/* Lock body scroll when sidebar open */
body.sidebar-locked { overflow: hidden; }

@media (max-width: 767px) {
  /* Notch / home-indicator safe areas */
  #sidebar { padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  header   { padding-top: max(12px, env(safe-area-inset-top)); }
  #toasts  { bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* Touch / no-hover devices */
@media (hover: none) {
  .email-item:hover { background: rgba(255, 255, 255, 0.02); border-color: rgba(255, 255, 255, 0.06); }
  .email-item.unread:hover { background: rgba(0, 255, 163, 0.04); border-color: rgba(0, 255, 163, 0.18); }
  .email-item.selected:hover { background: rgba(0, 255, 163, 0.10); border-color: rgba(0, 255, 163, 0.45); }
}

/* ─────────────── EMAIL FRAME (fidelitas email, terisolasi) ─────────────── */
.email-frame-wrap { margin: 6px 0 10px; }
.email-frame {
  width: 100%;
  border: 0;
  display: block;
  min-height: 220px;
  background: #ffffff;
  border-radius: 10px;
  color-scheme: light;
}
@media (max-width: 767px) {
  .email-frame-wrap { margin: 4px 0 8px; }
  .email-frame { min-height: 180px; border-radius: 8px; }
}
