/**
 * Email Showcase — front-end styles.
 *
 * Everything is scoped to .ems-showcase so themes cannot leak in and the
 * mockup cannot leak out. Sizing comes from the inline custom properties
 * printed by the shortcode: --ems-max-w, --ems-h, --ems-pane-w.
 */

.ems-showcase {
	--ems-accent: #8ab4f8;
	--ems-accent-ink: #10233f;
	--ems-bg: #1a1b1e;
	--ems-panel: #202124;
	--ems-panel-2: #26272b;
	--ems-hover: #2d2e32;
	--ems-selected: #22354f;
	--ems-text: #e8eaed;
	--ems-strong: #ffffff;
	--ems-muted: #9aa0a6;
	--ems-border: #35363a;
	--ems-avatar: #3c4043;
	--ems-chip: #2c2d31;
	--ems-bezel-a: #34353a;
	--ems-bezel-b: #17181a;

	max-width: var(--ems-max-w, 1400px);
	margin: 0 auto;
	color: var(--ems-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}

.ems-showcase.ems-theme-light {
	--ems-accent: #1a73e8;
	--ems-accent-ink: #ffffff;
	--ems-bg: #f6f8fc;
	--ems-panel: #ffffff;
	--ems-panel-2: #eaf1fb;
	--ems-hover: #f1f3f4;
	--ems-selected: #c2dbff;
	--ems-text: #202124;
	--ems-strong: #000000;
	--ems-muted: #5f6368;
	--ems-border: #dadce0;
	--ems-avatar: #d3e3fd;
	--ems-chip: #eef1f4;
	--ems-bezel-a: #d8dade;
	--ems-bezel-b: #a8abb0;
}

.ems-showcase *,
.ems-showcase *::before,
.ems-showcase *::after {
	box-sizing: border-box;
}

.ems-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------ theme reset
   Themes style every button on the page — rounded corners, borders, black
   hover fills, lowercase text, display fonts. None of that belongs in a mail
   client mockup, so controls inside the showcase are reset hard and the few
   backgrounds the mockup actually wants are re-applied below. */

.ems-showcase button,
.ems-showcase input,
.ems-showcase a {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	font-style: normal !important;
	line-height: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	transform: none !important;
	min-width: 0;
	min-height: 0;
	-webkit-appearance: none;
	appearance: none;
}

.ems-showcase button::before,
.ems-showcase button::after,
.ems-showcase a::before,
.ems-showcase a::after {
	content: none !important;
}

/* Stated explicitly so it also beats themes that mark their hover fills
   !important — the mockup supplies its own hover states below. */
.ems-showcase button:hover,
.ems-showcase button:focus,
.ems-showcase button:active,
.ems-showcase a:hover,
.ems-showcase a:focus,
.ems-showcase a:active {
	background: none !important;
	border-color: transparent !important;
	box-shadow: none !important;
	transform: none !important;
}

/* The hidden attribute has to beat the display rules further down. */
.ems-showcase [hidden] {
	display: none !important;
}

.ems-showcase :focus-visible {
	outline: 2px solid var(--ems-accent);
	outline-offset: -2px;
}

.ems-empty-notice {
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	color: #50575e;
	background: #fff;
}

/* ---------------------------------------------------------- device frame */

.ems-device {
	position: relative;
}

.ems-device-tablet .ems-device {
	padding: 16px;
	background: linear-gradient(160deg, var(--ems-bezel-a), var(--ems-bezel-b));
	border-radius: 34px;
	box-shadow:
		0 2px 0 rgba(255, 255, 255, 0.08) inset,
		0 30px 60px -20px rgba(0, 0, 0, 0.55);
}

.ems-device-tablet .ems-device::before,
.ems-device-tablet .ems-device::after {
	content: "";
	position: absolute;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 4px;
}

/* Top-edge buttons. */
.ems-device-tablet .ems-device::before {
	top: -3px;
	left: 22%;
	width: 74px;
	height: 4px;
}

/* Side camera dot. */
.ems-device-tablet .ems-device::after {
	top: 50%;
	left: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	transform: translateY(-50%);
}

.ems-device-laptop .ems-device {
	padding-top: 34px;
	background: var(--ems-panel-2);
	border: 1px solid var(--ems-border);
	border-radius: 14px;
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.5);
}

.ems-device-laptop .ems-device::before {
	content: "";
	position: absolute;
	top: 13px;
	left: 16px;
	width: 44px;
	height: 8px;
	background:
		radial-gradient(circle 4px at 4px 4px, #ff5f57 98%, transparent) 0 0/16px 8px no-repeat,
		radial-gradient(circle 4px at 4px 4px, #febc2e 98%, transparent) 18px 0/16px 8px no-repeat,
		radial-gradient(circle 4px at 4px 4px, #28c840 98%, transparent) 36px 0/16px 8px no-repeat;
}

.ems-screen {
	overflow: hidden;
	border-radius: 8px;
	background: var(--ems-bg);
}

.ems-device-tablet .ems-screen {
	border-radius: 20px;
}

.ems-device-none .ems-screen {
	border: 1px solid var(--ems-border);
	border-radius: 14px;
}

/* ------------------------------------------------------------ app shell */

.ems-app {
	display: flex;
	flex-direction: column;
	height: var(--ems-h, 780px);
	max-height: 88vh;
	background: var(--ems-bg);
}

/* ------------------------------------------------------------- top bar */

.ems-topbar {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
	align-items: center;
	padding: 10px 14px;
}

.ems-brand {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	align-items: center;
	font-size: 20px;
	letter-spacing: -0.2px;
	color: var(--ems-text);
}

.ems-brand .ems-svg {
	width: 30px;
	height: 30px;
	color: var(--ems-accent);
	stroke-width: 1.4;
}

.ems-brand-logo {
	width: auto;
	max-width: 110px;
	height: 28px;
	object-fit: contain;
}

.ems-brand-name {
	font-weight: 400;
}

.ems-search {
	display: flex;
	flex: 1 1 auto;
	gap: 10px;
	align-items: center;
	max-width: 690px;
	height: 46px;
	padding: 0 16px;
	margin: 0 auto;
	background: var(--ems-panel-2);
	border-radius: 24px;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ems-search:focus-within {
	background: var(--ems-panel);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.ems-search .ems-svg,
.ems-search-tune .ems-svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: var(--ems-muted);
}

.ems-showcase .ems-search-input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 15px !important;
	color: var(--ems-text);
	outline: none;
}

.ems-search-input::placeholder {
	color: var(--ems-muted);
}

.ems-search-input::-webkit-search-cancel-button {
	display: none;
}

.ems-search-spacer {
	flex: 1 1 auto;
}

.ems-topbar-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 2px;
	align-items: center;
}

.ems-showcase .ems-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--ems-muted);
	cursor: pointer;
	border-radius: 50% !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.ems-icon-btn .ems-svg {
	width: 20px;
	height: 20px;
}

.ems-showcase button.ems-icon-btn:hover,
.ems-showcase a.ems-icon-btn:hover {
	color: var(--ems-text);
	background: var(--ems-hover) !important;
}

.ems-static {
	cursor: default;
}

/* The toggle shows the theme it will switch *to*: a sun while dark, a moon
   while light. */
.ems-theme-toggle .ems-svg-moon,
.ems-theme-light .ems-theme-toggle .ems-svg-sun {
	display: none;
}

.ems-theme-light .ems-theme-toggle .ems-svg-moon {
	display: block;
}

.ems-account {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-left: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ems-text);
	background: var(--ems-avatar);
	border-radius: 50%;
}

/* -------------------------------------------------------------- layout */

.ems-body {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	gap: 10px;
	min-height: 0;
	padding: 0 10px 10px;
}

/* ------------------------------------------------------------- sidebar */

.ems-sidebar {
	display: flex;
	flex: 0 0 200px;
	flex-direction: column;
	gap: 6px;
	width: 200px;
	padding-right: 4px;
	overflow-y: auto;
}

.ems-showcase button.ems-compose {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	align-self: flex-start;
	padding: 14px 22px 14px 16px;
	margin-bottom: 10px;
	font-weight: 500 !important;
	color: var(--ems-accent);
	cursor: default;
	background: var(--ems-panel-2) !important;
	border-radius: 16px !important;
}

.ems-showcase button.ems-compose:hover,
.ems-showcase button.ems-compose:focus {
	background: var(--ems-panel-2) !important;
}

.ems-compose .ems-svg {
	width: 20px;
	height: 20px;
}

.ems-folders {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.ems-folder {
	display: flex;
	gap: 14px;
	align-items: center;
	height: 34px;
	padding: 0 12px 0 14px;
	font-size: 14px;
	color: var(--ems-text);
	border-radius: 0 17px 17px 0;
}

.ems-folder .ems-svg {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	color: var(--ems-muted);
}

.ems-folder.is-active {
	font-weight: 600;
	color: var(--ems-accent);
	background: var(--ems-selected);
}

.ems-folder.is-active .ems-svg {
	color: var(--ems-accent);
}

.ems-folder-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ems-folder-count {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 600;
	color: inherit;
}

.ems-sidebar-labels {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 12px 0 14px;
	margin-top: 8px;
	font-size: 14px;
	border-top: 1px solid var(--ems-border);
}

.ems-sidebar-labels .ems-svg {
	width: 18px;
	height: 18px;
	color: var(--ems-muted);
}

/* ---------------------------------------------------------- inbox list */

.ems-main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--ems-panel);
	border-radius: 16px;
}

.ems-toolbar {
	display: flex;
	flex: 0 0 auto;
	gap: 4px;
	align-items: center;
	padding: 8px 12px;
	color: var(--ems-muted);
}

.ems-tool {
	display: inline-flex;
	gap: 2px;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	border-radius: 50%;
}

.ems-tool .ems-svg {
	width: 19px;
	height: 19px;
}

.ems-tool-check {
	width: auto;
	padding: 0 4px;
	border-radius: 17px;
}

.ems-tool-check .ems-svg {
	width: 15px;
	height: 15px;
}

.ems-box {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid var(--ems-muted);
	border-radius: 2px;
}

.ems-tool-spacer {
	flex: 1 1 auto;
}

.ems-count {
	padding-right: 6px;
	font-size: 12px;
	white-space: nowrap;
}

.ems-tabs {
	display: flex;
	flex: 0 0 auto;
	gap: 0;
	padding: 0 8px;
	overflow-x: auto;
	border-bottom: 1px solid var(--ems-border);
	scrollbar-width: none;
}

.ems-tabs::-webkit-scrollbar {
	display: none;
}

/* Tabs are underline-only: no pill, no border, no fill — just the accent rule
   along the bottom edge of the active one. */
.ems-showcase .ems-tab {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	flex: 0 0 auto;
	padding: 0 22px;
	height: 48px;
	color: var(--ems-muted);
	white-space: nowrap;
	cursor: pointer;
	border-bottom: 3px solid transparent !important;
}

.ems-tab .ems-svg {
	width: 19px;
	height: 19px;
}

.ems-showcase .ems-tab:hover {
	color: var(--ems-text);
}

.ems-showcase .ems-tab.is-active {
	font-weight: 600 !important;
	color: var(--ems-accent);
	border-bottom-color: var(--ems-accent) !important;
}

/* While a search is running the results come from every tab, so the tab bar
   is hidden rather than left showing a selection that no longer applies. */
.ems-showcase.is-searching .ems-tabs {
	display: none;
}

.ems-list-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ems-list {
	padding: 0;
	margin: 0;
	list-style: none;
}

/* Themes that put markers back on every li would bullet the inbox. */
.ems-showcase .ems-list > li {
	list-style: none;
}

.ems-row {
	display: grid;
	grid-template-columns: 30px 30px minmax(0, 1fr);
	align-items: center;
	padding: 0 12px 0 8px;
	margin: 0;
	border-bottom: 1px solid var(--ems-border);
	transition: background 0.12s ease, box-shadow 0.12s ease;
}

.ems-row:hover {
	background: var(--ems-hover);
	box-shadow: inset 1px 0 0 var(--ems-border), 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ems-row.is-open {
	background: var(--ems-selected);
}

.ems-row.is-hidden {
	display: none;
}

.ems-row-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ems-row.is-open .ems-row-check .ems-box {
	background: var(--ems-accent);
	border-color: var(--ems-accent);
}

.ems-showcase .ems-row-star {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	color: var(--ems-muted);
	cursor: pointer;
	border-radius: 50% !important;
}

.ems-row-star .ems-svg {
	width: 18px;
	height: 18px;
}

.ems-row-star:hover {
	color: var(--ems-text);
}

.ems-row.is-starred .ems-row-star,
.ems-row-star[aria-pressed="true"] {
	color: #f4b400;
}

.ems-row.is-starred .ems-row-star .ems-svg,
.ems-row-star[aria-pressed="true"] .ems-svg {
	fill: currentColor;
}

.ems-row-open {
	display: grid;
	grid-template-columns: 148px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	width: 100%;
	min-width: 0;
	padding: 11px 4px 11px 8px;
	color: var(--ems-muted);
	text-align: left;
	cursor: pointer;
}

.ems-row-from,
.ems-row-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ems-row-from {
	font-size: 14px;
}

.ems-row-subject {
	color: var(--ems-text);
}

.ems-row-date {
	flex: 0 0 auto;
	font-size: 12px;
	white-space: nowrap;
}

.ems-row.is-unread .ems-row-from,
.ems-row.is-unread .ems-row-subject,
.ems-row.is-unread .ems-row-date {
	font-weight: 700;
	color: var(--ems-strong);
}

.ems-row.is-read .ems-row-from,
.ems-row.is-read .ems-row-subject {
	font-weight: 400;
}

.ems-row-chips {
	display: flex;
	flex-wrap: wrap;
	grid-column: 3;
	gap: 6px;
	padding: 0 4px 10px 8px;
	margin-top: -4px;
}

.ems-chip {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	max-width: 190px;
	padding: 3px 10px 3px 6px;
	overflow: hidden;
	font-size: 12px;
	color: var(--ems-text);
	text-overflow: ellipsis;
	white-space: nowrap;
	background: var(--ems-chip);
	border: 1px solid var(--ems-border);
	border-radius: 6px;
}

.ems-chip-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	color: #e8695a;
}

.ems-chip-ico .ems-svg {
	width: 14px;
	height: 14px;
}

.ems-chip-more {
	padding: 3px 8px;
	color: var(--ems-muted);
}

.ems-no-results {
	padding: 28px 20px;
	margin: 0;
	color: var(--ems-muted);
	text-align: center;
}

/* -------------------------------------------------------- reading pane */

.ems-pane {
	position: relative;
	display: flex;
	flex: 0 0 var(--ems-pane-w, 42%);
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--ems-panel);
	border-radius: 16px;
}

.ems-no-pane .ems-pane,
.ems-showcase.is-overlay .ems-pane {
	position: absolute;
	inset: 0 10px 10px 10px;
	z-index: 3;
	display: none;
}

.ems-no-pane.is-reading .ems-pane,
.ems-showcase.is-overlay.is-reading .ems-pane {
	display: flex;
}

.ems-pane-empty {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	justify-content: center;
	padding: 24px;
	color: var(--ems-muted);
	text-align: center;
}

.ems-pane-empty .ems-svg {
	width: 42px;
	height: 42px;
	opacity: 0.6;
}

.ems-pane-empty p {
	margin: 0;
}

.ems-message {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.ems-message[hidden] {
	display: none;
}

.ems-msg-top {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	align-items: center;
	padding: 12px 8px 12px 16px;
}

.ems-msg-back {
	display: none;
}

.ems-msg-subject {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	font-size: 16px;
	font-weight: 500;
	color: var(--ems-text);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ems-msg-tools {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
}

.ems-msg-meta {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 4px 12px;
	align-items: center;
	padding: 0 12px 12px 16px;
}

.ems-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	color: var(--ems-text);
	background: var(--ems-avatar);
	border-radius: 50%;
}

.ems-avatar img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

.ems-msg-who {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.ems-msg-sender {
	overflow: hidden;
	font-weight: 600;
	color: var(--ems-text);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ems-msg-to {
	font-size: 12px;
	color: var(--ems-muted);
}

.ems-msg-date {
	font-size: 12px;
	color: var(--ems-muted);
	white-space: nowrap;
}

.ems-msg-actions {
	display: flex;
	grid-column: 3;
	align-items: center;
}

.ems-msg-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 0 16px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ems-msg-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.ems-msg-missing {
	padding: 30px 0;
	color: var(--ems-muted);
	text-align: center;
}

.ems-msg-cta {
	margin: 18px 0 0;
	text-align: center;
}

.ems-showcase .ems-msg-cta a {
	display: inline-block;
	padding: 11px 26px;
	font-weight: 600 !important;
	color: var(--ems-accent-ink);
	background: var(--ems-accent) !important;
	border-radius: 22px !important;
}

.ems-showcase .ems-msg-cta a:hover,
.ems-showcase .ems-msg-cta a:focus {
	background: var(--ems-accent) !important;
	filter: brightness(1.08);
}

/* ------------------------------------------------------ compose window */

.ems-has-compose .ems-app {
	position: relative;
}

.ems-showcase button.ems-compose {
	cursor: default;
}

.ems-has-compose button.ems-compose {
	cursor: pointer;
}

.ems-has-compose button.ems-compose:hover {
	background: var(--ems-hover) !important;
}

.ems-compose-window {
	position: absolute;
	right: 18px;
	bottom: 0;
	z-index: 6;
	display: flex;
	flex-direction: column;
	width: 470px;
	max-width: calc(100% - 36px);
	max-height: calc(100% - 60px);
	overflow: hidden;
	background: var(--ems-panel);
	border: 1px solid var(--ems-border);
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.45);
}

.ems-compose-form {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.ems-compose-head {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	padding: 8px 6px 8px 16px;
	background: var(--ems-panel-2);
}

.ems-compose-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--ems-text);
}

.ems-compose-head-actions {
	display: flex;
	gap: 2px;
	align-items: center;
}

.ems-showcase .ems-compose-head-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	color: var(--ems-muted);
	cursor: pointer;
	border-radius: 50% !important;
}

.ems-showcase .ems-compose-head-actions button:hover {
	color: var(--ems-text);
	background: var(--ems-hover) !important;
}

.ems-compose-head-actions .ems-svg {
	width: 17px;
	height: 17px;
}

.ems-compose-fields {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	padding: 0 16px;
	overflow-y: auto;
}

.ems-compose-to {
	display: flex;
	gap: 10px;
	padding: 10px 0;
	margin: 0;
	font-size: 13px;
	border-bottom: 1px solid var(--ems-border);
}

.ems-compose-key {
	color: var(--ems-muted);
}

.ems-compose-value {
	color: var(--ems-text);
}

.ems-showcase .ems-compose-input,
.ems-showcase .ems-compose-body {
	width: 100%;
	padding: 10px 0;
	color: var(--ems-text);
	outline: none;
	border-bottom: 1px solid var(--ems-border) !important;
}

.ems-showcase .ems-compose-body {
	flex: 1 1 auto;
	min-height: 140px;
	padding: 14px 0 16px;
	resize: none;
	border-bottom: 0 !important;
}

.ems-showcase .ems-compose-input::placeholder,
.ems-showcase .ems-compose-body::placeholder {
	color: var(--ems-muted);
}

.ems-showcase .ems-compose-input:focus,
.ems-showcase .ems-compose-body:focus {
	outline: none;
}

.ems-showcase .ems-compose-input.has-error {
	border-bottom-color: #e8695a !important;
}

/* Off-screen rather than display:none — bots skip hidden fields. */
.ems-compose-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ems-compose-status {
	flex: 0 0 auto;
	padding: 10px 16px;
	margin: 0;
	font-size: 13px;
	color: var(--ems-text);
	background: var(--ems-panel-2);
}

.ems-compose-status.is-error {
	color: #ffb4a8;
	background: rgba(232, 105, 90, 0.16);
}

.ems-theme-light .ems-compose-status.is-error {
	color: #a4271a;
}

.ems-compose-foot {
	display: flex;
	flex: 0 0 auto;
	gap: 6px;
	align-items: center;
	padding: 10px 12px 12px;
}

.ems-showcase button.ems-compose-send {
	padding: 10px 26px !important;
	font-weight: 600 !important;
	color: var(--ems-accent-ink);
	cursor: pointer;
	background: var(--ems-accent) !important;
	border-radius: 20px !important;
}

.ems-showcase button.ems-compose-send:hover {
	background: var(--ems-accent) !important;
	filter: brightness(1.08);
}

.ems-showcase button.ems-compose-send[disabled] {
	cursor: progress;
	opacity: 0.65;
}

.ems-compose-tools {
	display: flex;
	flex: 1 1 auto;
	gap: 2px;
	align-items: center;
	padding-left: 6px;
	overflow: hidden;
}

.ems-compose-tool {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	color: var(--ems-muted);
	border-radius: 50% !important;
}

.ems-compose-aa {
	font-size: 13px;
	font-weight: 600;
}

.ems-compose-tool .ems-svg {
	width: 18px;
	height: 18px;
}

.ems-showcase button.ems-compose-discard {
	cursor: pointer;
}

.ems-showcase button.ems-compose-discard:hover {
	color: var(--ems-text);
	background: var(--ems-hover) !important;
}

/* Minimised: only the title bar stays. */
.ems-compose-window.is-min .ems-compose-fields,
.ems-compose-window.is-min .ems-compose-foot,
.ems-compose-window.is-min .ems-compose-status {
	display: none;
}

/* --------------------------------------------------------- scrollbars */

.ems-showcase ::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

.ems-showcase ::-webkit-scrollbar-thumb {
	background: var(--ems-border);
	border: 3px solid transparent;
	border-radius: 8px;
	background-clip: content-box;
}

.ems-showcase ::-webkit-scrollbar-thumb:hover {
	background: var(--ems-muted);
	background-clip: content-box;
}

/* -------------------------------------------------------- responsive */

@media (max-width: 1100px) {
	.ems-row-open {
		grid-template-columns: 120px minmax(0, 1fr) auto;
	}
}

@media (max-width: 900px) {
	.ems-showcase .ems-sidebar {
		position: absolute;
		inset: 0 auto 0 0;
		z-index: 4;
		padding: 10px;
		background: var(--ems-bg);
		border-right: 1px solid var(--ems-border);
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
		transform: translateX(-105%);
		transition: transform 0.22s ease;
	}

	.ems-showcase.is-sidebar-open .ems-sidebar {
		transform: none;
	}

	/* Only the decorative icons go — the theme toggle is real, so it stays. */
	.ems-brand-name,
	.ems-topbar-actions .ems-static {
		display: none;
	}

	.ems-msg-back {
		display: inline-flex;
	}
}

@media (max-width: 780px) {
	.ems-topbar {
		padding: 8px;
	}

	.ems-body {
		padding: 0 8px 8px;
	}

	.ems-row-open {
		grid-template-columns: 100px minmax(0, 1fr) auto;
		gap: 8px;
	}

	.ems-row-snippet,
	.ems-row-chips {
		display: none;
	}

	.ems-tab {
		padding: 0 14px;
	}

	.ems-compose-window {
		inset: 0;
		width: auto;
		max-width: none;
		max-height: none;
		border: 0;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ems-showcase * {
		transition: none !important;
	}
}
