/* Mammoth Forms — admin */

.mammoth-wrap .mammoth-shortcode {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
}

.mammoth-empty {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 48px 32px;
	text-align: center;
	margin-top: 24px;
}

.mammoth-empty h2 {
	margin-top: 0;
}

.mammoth-entries-filter {
	margin: 12px 0;
	display: flex;
	gap: 8px;
}

.mammoth-entry-table .mammoth-entry-calc td {
	background: #f6f7f7;
}

/* ------------------------------------------------------------------ builder */

.mammoth-builder-wrap {
	margin-right: 0;
}

/* The builder wants the whole screen. */
.mammoth-builder-wrap #wpcontent,
.mammoth-builder-wrap .wrap {
	padding-left: 0;
}

.mammoth-builder {
	--mammoth-b-border: #dcdcde;
	--mammoth-b-accent: #2271b1;
	--mammoth-b-bg: #f0f0f1;
	background: var(--mammoth-b-bg);
	border: 1px solid var(--mammoth-b-border);
	border-radius: 8px;
	overflow: hidden;
	margin: 16px 20px 0 0;
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 130px);
}

.mammoth-b-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: #fff;
	border-bottom: 1px solid var(--mammoth-b-border);
	flex-wrap: wrap;
}

.mammoth-b-back {
	text-decoration: none;
	font-size: 20px;
	line-height: 1;
	color: #50575e;
}

.mammoth-b-title {
	font-size: 16px;
	font-weight: 600;
	padding: 6px 10px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: #f6f7f7;
	min-width: 220px;
	flex: 0 1 280px;
}

.mammoth-b-title:focus {
	border-color: var(--mammoth-b-accent);
	background: #fff;
}

.mammoth-b-tabs {
	display: flex;
	gap: 2px;
	margin-left: 8px;
}

.mammoth-b-tab {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
	color: #50575e;
}

.mammoth-b-tab.is-active {
	color: var(--mammoth-b-accent);
	border-bottom-color: var(--mammoth-b-accent);
	font-weight: 600;
}

.mammoth-b-topbar-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.mammoth-b-shortcode {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	background: #f0f0f1;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 4px;
	padding: 5px 8px;
	cursor: pointer;
}

.mammoth-b-preview.is-active {
	background: #f0f6fc;
	border-color: var(--mammoth-b-accent);
}

.mammoth-b-save-dirty::after {
	content: ' •';
}

.mammoth-b-body {
	display: flex;
	align-items: stretch;
	flex: 1 1 auto;
	min-height: 0;
}

/* Palette */

.mammoth-b-palette {
	flex: 0 0 190px;
	background: #fff;
	border-right: 1px solid var(--mammoth-b-border);
	padding: 12px;
	overflow-y: auto;
}

.mammoth-b-palette-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #787c82;
	margin: 14px 0 6px;
}

.mammoth-b-palette-title:first-child {
	margin-top: 0;
}

.mammoth-b-palette-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mammoth-b-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	text-align: left;
	background: #f6f7f7;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 5px;
	padding: 7px 9px;
	cursor: grab;
	font-size: 13px;
}

.mammoth-b-chip:hover {
	border-color: var(--mammoth-b-accent);
	background: #f0f6fc;
}

.mammoth-b-chip-icon,
.mammoth-b-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: #fff;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 4px;
	font-size: 11px;
	flex: 0 0 auto;
}

.mammoth-b-pro {
	margin-left: auto;
	font-size: 10px;
	text-transform: uppercase;
	background: #8c5e00;
	color: #fff;
	border-radius: 3px;
	padding: 1px 5px;
}

/* Canvas */

.mammoth-b-canvas {
	flex: 1 1 auto;
	padding: 18px;
	overflow-y: auto;
	min-width: 0;
}

.mammoth-b-cards {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -6px;
	min-height: 120px;
	align-content: flex-start;
}

.mammoth-b-empty {
	flex: 0 0 100%;
	border: 2px dashed var(--mammoth-b-border);
	border-radius: 8px;
	padding: 48px;
	text-align: center;
	color: #787c82;
	margin: 0 6px;
}

.mammoth-b-card {
	box-sizing: border-box;
	margin: 0 6px 12px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 6px;
	cursor: pointer;
	position: relative;
	flex: 0 0 calc(100% - 12px);
	max-width: calc(100% - 12px);
}

.mammoth-b-w-75 { flex-basis: calc(75% - 12px); max-width: calc(75% - 12px); }
.mammoth-b-w-66 { flex-basis: calc(66.6666% - 12px); max-width: calc(66.6666% - 12px); }
.mammoth-b-w-50 { flex-basis: calc(50% - 12px); max-width: calc(50% - 12px); }
.mammoth-b-w-33 { flex-basis: calc(33.3333% - 12px); max-width: calc(33.3333% - 12px); }
.mammoth-b-w-25 { flex-basis: calc(25% - 12px); max-width: calc(25% - 12px); }

.mammoth-b-card.is-selected {
	border-color: var(--mammoth-b-accent);
	box-shadow: 0 0 0 1px var(--mammoth-b-accent);
}

.mammoth-b-card.is-dragging {
	opacity: 0.4;
}

.mammoth-b-card-head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.mammoth-b-card-label {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mammoth-b-card-meta {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding-right: 46px;
}

.mammoth-b-key {
	font-size: 11px;
	color: #787c82;
	background: #f6f7f7;
	padding: 1px 5px;
	border-radius: 3px;
}

.mammoth-b-tag {
	font-size: 11px;
	color: #b32d2e;
}

.mammoth-b-formula {
	display: block;
	margin-top: 8px;
	padding: 6px 8px;
	background: #f6f7f7;
	border-radius: 4px;
	font-size: 12px;
	word-break: break-word;
}

.mammoth-b-formula.is-broken {
	background: #fcf0f1;
	color: #b32d2e;
}

.mammoth-b-card-error {
	margin-top: 4px;
	font-size: 12px;
	color: #b32d2e;
}

.mammoth-b-card-actions {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	gap: 2px;
	opacity: 0;
	transition: opacity 0.12s;
}

.mammoth-b-card:hover .mammoth-b-card-actions,
.mammoth-b-card.is-selected .mammoth-b-card-actions {
	opacity: 1;
}

.mammoth-b-icon-button {
	background: #fff;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 4px;
	width: 22px;
	height: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.mammoth-b-icon-button.mammoth-b-danger:hover {
	border-color: #b32d2e;
	color: #b32d2e;
}

.mammoth-b-placeholder {
	flex: 0 0 6px;
	height: 44px;
	margin: 0 3px 12px;
	background: var(--mammoth-b-accent);
	border-radius: 3px;
}

.mammoth-b-preview-pane:not(:empty) {
	margin-top: 24px;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 8px;
}

/* Inspector */

.mammoth-b-inspector {
	flex: 0 0 320px;
	background: #fff;
	border-left: 1px solid var(--mammoth-b-border);
	padding: 14px;
	overflow-y: auto;
}

.mammoth-b-inspector-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 14px;
}

.mammoth-b-hint {
	color: #787c82;
	font-size: 13px;
}

.mammoth-b-control {
	margin-bottom: 14px;
}

.mammoth-b-control-label {
	display: block;
	font-weight: 600;
	font-size: 12px;
	margin-bottom: 4px;
}

.mammoth-b-input {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 13px;
}

textarea.mammoth-b-input {
	font-family: Consolas, Monaco, monospace;
	line-height: 1.5;
}

.mammoth-b-help {
	color: #787c82;
	font-size: 12px;
	margin: 4px 0 0;
}

.mammoth-b-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.mammoth-b-option-row,
.mammoth-b-rule,
.mammoth-b-condition-head {
	display: flex;
	gap: 4px;
	margin-bottom: 6px;
	align-items: center;
}

.mammoth-b-option-value {
	max-width: 80px;
}

.mammoth-b-option-default {
	flex: 0 0 auto;
}

.mammoth-b-add {
	margin-top: 4px;
}

/* Formula editor */

.mammoth-b-formula-input {
	min-height: 70px;
}

.mammoth-b-formula-tools {
	margin-top: 8px;
}

.mammoth-b-op-row {
	display: flex;
	gap: 4px;
	margin-bottom: 8px;
}

.mammoth-b-op {
	flex: 1 1 auto;
	background: #f6f7f7;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 4px;
	padding: 4px 0;
	cursor: pointer;
	font-family: Consolas, Monaco, monospace;
}

.mammoth-b-op:hover {
	background: #f0f6fc;
	border-color: var(--mammoth-b-accent);
}

.mammoth-b-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 8px;
}

.mammoth-b-chip-small {
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 3px;
	font-family: Consolas, Monaco, monospace;
	font-size: 11px;
	padding: 2px 6px;
	cursor: pointer;
}

.mammoth-b-chip-small.is-pro {
	background: #fdf6e6;
	border-color: #e6d5a8;
	color: #8c5e00;
}

.mammoth-b-formula-error {
	color: #b32d2e;
	font-size: 12px;
	margin: 4px 0 0;
}

.mammoth-b-formula-warn {
	color: #8c5e00;
	font-size: 12px;
	margin: 4px 0 0;
}

.mammoth-b-formula-ok {
	font-size: 12px;
	margin: 4px 0 0;
	color: #1d6a35;
}

/* Settings panels */

.mammoth-b-panel {
	flex: 1 1 auto;
	padding: 20px;
	overflow-y: auto;
	background: #fff;
}

.mammoth-b-section {
	max-width: 620px;
	margin-bottom: 32px;
}

.mammoth-b-section h2 {
	font-size: 15px;
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--mammoth-b-border);
}

/* Toast */

.mammoth-b-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #1d2327;
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	z-index: 100000;
	transition: opacity 0.35s, transform 0.35s;
}

.mammoth-b-toast.is-out {
	opacity: 0;
	transform: translateY(8px);
}

/* Pro page */

.mammoth-pro-lead {
	font-size: 15px;
	max-width: 620px;
}

.mammoth-pro-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin-top: 20px;
	max-width: 1000px;
}

.mammoth-pro-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px 18px;
}

.mammoth-pro-card h3 {
	margin-top: 0;
}

.mammoth-pro-card code {
	display: block;
	margin-top: 8px;
	font-size: 12px;
}

/* ---------------------------------------------------------- Add New: templates */

.mammoth-templates-intro {
	font-size: 14px;
	color: #50575e;
	max-width: 640px;
}

.mammoth-templates-heading {
	margin: 28px 0 12px;
	font-size: 15px;
	color: #1d2327;
}

.mammoth-templates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 14px;
	max-width: 1200px;
}

.mammoth-template {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px 18px;
	color: #1d2327;
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}

.mammoth-template:hover,
.mammoth-template:focus {
	border-color: #a9512a;
	box-shadow: 0 2px 10px rgba(43, 23, 16, .08);
	color: #1d2327;
	outline: none;
}

.mammoth-template:focus-visible {
	box-shadow: 0 0 0 2px #a9512a;
}

.mammoth-template-icon {
	width: 36px;
	height: 36px;
	font-size: 20px;
	line-height: 36px;
	text-align: center;
	border-radius: 8px;
	background: #f6f0e6;
	color: #a9512a;
}

.mammoth-template-title {
	font-size: 14px;
	font-weight: 600;
	margin-top: 4px;
}

.mammoth-template-desc {
	color: #50575e;
	line-height: 1.45;
}

.mammoth-template-fields {
	color: #8a7564;
	font-size: 12px;
	line-height: 1.45;
}

.mammoth-template-use {
	margin-top: auto;
	padding-top: 8px;
	color: #a9512a;
	font-weight: 600;
}

.mammoth-template.is-blank {
	border-style: dashed;
}

/* ------------------------------------------------- builder: image & table */

.mammoth-b-card-image {
	display: block;
	max-width: 100%;
	max-height: 90px;
	margin-top: 8px;
	border-radius: 4px;
}

.mammoth-b-card-table {
	margin-top: 8px;
	font-size: 12px;
	border-top: 1px solid var(--mammoth-b-border);
}

.mammoth-b-card-table-row {
	display: flex;
	gap: 8px;
	padding: 3px 0;
	border-bottom: 1px solid var(--mammoth-b-border);
}

.mammoth-b-card-table-row span {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #50575e;
}

.mammoth-b-image-preview {
	display: block;
	max-width: 100%;
	max-height: 160px;
	border-radius: 4px;
	margin-bottom: 8px;
}

.mammoth-b-image-empty {
	border: 1px dashed var(--mammoth-b-border);
	border-radius: 4px;
	padding: 24px 8px;
	text-align: center;
	color: #8c8f94;
	margin-bottom: 8px;
}

.mammoth-b-image-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}

.mammoth-b-link-danger {
	color: #b32d2e;
}

.mammoth-b-table-scroll {
	overflow-x: auto;
	margin-bottom: 8px;
}

.mammoth-b-table-grid {
	border-collapse: collapse;
}

.mammoth-b-table-grid td {
	padding: 1px;
	text-align: center;
}

.mammoth-b-table-cell {
	width: 120px;
	min-height: 28px;
	font-size: 12px;
	padding: 2px 6px;
	border: 1px solid var(--mammoth-b-border);
	border-radius: 3px;
}

.mammoth-b-table-cell.is-formula {
	font-family: Consolas, Monaco, monospace;
	background: #f6f0e6;
}

.mammoth-b-table-x {
	border: 0;
	background: none;
	color: #8c8f94;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 2px 4px;
}

.mammoth-b-table-x:hover {
	color: #b32d2e;
}

.mammoth-b-table-actions {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
}

.mammoth-b-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	margin-top: 6px;
}

.mammoth-b-tags .mammoth-b-help {
	margin: 0 4px 0 0;
}

textarea.mammoth-b-code {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
}

/* Export / import */
.mammoth-transfer-columns {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 6px 16px;
	max-width: 1000px;
}
.mammoth-transfer-columns code { font-size: 11px; color: #646970; }
.mammoth-import-map { max-width: 1000px; }
.mammoth-import-map td.description { color: #646970; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mammoth-import-skipped { list-style: disc; margin-left: 2em; }
.mammoth-import-progress { display: flex; align-items: center; gap: 12px; margin: 16px 0; max-width: 700px; }
.mammoth-import-progress[hidden] { display: none; }
.mammoth-import-progress progress { flex: 1 1 auto; height: 16px; accent-color: #a9512a; }
.mammoth-import-help { list-style: disc; margin-left: 2em; color: #50575e; }

.mammoth-b-color { display: flex; align-items: center; gap: 10px; }
.mammoth-b-color input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--mammoth-b-border); border-radius: 4px; background: none; }


/* Entries list */
.mammoth-entries-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; clear: both; }
.mammoth-entries-search { min-width: 260px; }
.mammoth-entries-table .mammoth-col-star { width: 36px; text-align: center; }
.mammoth-star { color: #c3c4c7; text-decoration: none; }
.mammoth-star.is-on, .mammoth-star:hover { color: #dba617; }
.mammoth-unread td, .mammoth-unread td a.mammoth-entry-summary { font-weight: 600; }
.mammoth-entry-summary { color: inherit; text-decoration: none; }
.mammoth-new-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: #a9512a; color: #fff; font-size: 11px; line-height: 18px; font-weight: 600; }
.mammoth-has-note { color: #8c8f94; font-size: 16px; vertical-align: middle; }
.mammoth-entry-notes { max-width: 760px; margin-top: 16px; }
