/*
 * Página do documento (post mdocs-posts, shortcode [mdocs_post_page]).
 * Escopo .mdocs.mdocs-doc; !important só onde os estilos legados do plugin/tema conflitam.
 */
.mdocs.mdocs-doc {
	--doc-border: #e2e8f0;
	--doc-muted: #64748b;
	--doc-text: #1e293b;
	--doc-bg: #fff;
	--doc-soft: #f8fafc;
	--doc-accent: var(--bs-primary, #0d47a1);
	--doc-accent-contrast: #fff;
	--doc-radius: 12px;
	max-width: 100%;
	margin: 0 0 32px;
	color: var(--doc-text);
	font-size: 16px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}
.mdocs.mdocs-doc *, .mdocs.mdocs-doc *::before, .mdocs.mdocs-doc *::after { box-sizing: border-box; }

/* Cartão de resumo */
.mdocs-doc .mdocs-doc-summary {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 20px 24px;
	align-items: center;
	margin: 0 0 24px;
	padding: 24px;
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	background: var(--doc-bg);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.mdocs-doc .mdocs-doc-icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 12px;
	background: var(--doc-soft);
}
.mdocs-doc .mdocs-doc-icon img { width: 48px; height: auto; margin: 0; border: 0; box-shadow: none; }
.mdocs-doc .mdocs-doc-info { min-width: 0; }
.mdocs-doc .mdocs-doc-badge {
	display: inline-block;
	margin: 0 0 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: #dcfce7;
	color: #166534;
	font-size: 12px;
	font-weight: 600;
}
.mdocs-doc .mdocs-doc-filename { margin: 0 0 10px !important; color: var(--doc-muted); font-size: 14px; word-break: break-all; }
.mdocs-doc .mdocs-doc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
}
.mdocs-doc .mdocs-doc-meta div { min-width: 0; }
.mdocs-doc .mdocs-doc-meta dt {
	margin: 0;
	color: var(--doc-muted);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.mdocs-doc .mdocs-doc-meta dd { margin: 0; font-size: 15px; font-weight: 600; }

/* Ações */
.mdocs-doc .mdocs-doc-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 220px; }
.mdocs-doc a.mdocs-doc-download {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 8px;
	padding: 14px 22px;
	border: 0;
	border-radius: 10px;
	background: var(--doc-accent) !important;
	color: var(--doc-accent-contrast) !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(13, 71, 161, .25);
	transition: transform .1s, box-shadow .15s, filter .15s;
}
.mdocs-doc a.mdocs-doc-download:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(13, 71, 161, .3); }
.mdocs-doc a.mdocs-doc-download:active { transform: translateY(1px); }
.mdocs-doc a.mdocs-doc-download:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.mdocs-doc a.mdocs-doc-download small { flex-basis: 100%; font-size: 12px; font-weight: 400; opacity: .85; }
.mdocs-doc a.mdocs-doc-download.is-login { background: var(--doc-text) !important; }
.mdocs-doc .mdocs-doc-btn-icon { display: inline-flex; }
.mdocs-doc .mdocs-doc-unavailable { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--doc-soft); color: var(--doc-muted); font-size: 14px; text-align: center; }
.mdocs-doc .mdocs-doc-actions [id^="mdocs-social-"] { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; text-align: center !important; }
.mdocs-doc .mdocs-doc-actions .mdocs-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 10px 16px !important;
	border: 1px solid var(--doc-border) !important;
	border-radius: 10px !important;
	background: var(--doc-bg) !important;
	color: var(--doc-text) !important;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.2 !important;
	cursor: pointer;
}
.mdocs-doc .mdocs-doc-actions .mdocs-share-btn:hover { border-color: var(--doc-accent) !important; color: var(--doc-accent) !important; }
.mdocs-doc .mdocs-doc-rating { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--doc-muted); font-size: 13px; }
.mdocs-doc .mdocs-doc-rating .mdocs-my-rating { cursor: pointer; font-size: 16px; }

/* Abas e painel */
.mdocs-doc .mdocs-doc-body { border: 1px solid var(--doc-border); border-radius: var(--doc-radius); background: var(--doc-bg); overflow: hidden; }
.mdocs-doc .mdocs-doc-tabs {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0 16px;
	border-bottom: 1px solid var(--doc-border);
	background: var(--doc-soft);
	overflow-x: auto;
	scrollbar-width: thin;
}
.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab {
	position: relative;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	display: inline-block;
	margin: 0 !important;
	padding: 14px 16px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--doc-muted) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	text-shadow: none !important;
	white-space: nowrap;
	cursor: pointer;
}
.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab:hover { color: var(--doc-text) !important; }
.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab.mdocs-nav-tab-active { color: var(--doc-accent) !important; font-weight: 600 !important; }
.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab.mdocs-nav-tab-active::after {
	content: "";
	position: absolute;
	right: 12px;
	bottom: -1px;
	left: 12px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--doc-accent);
}
.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab:focus-visible { outline: 2px solid var(--doc-accent); outline-offset: -2px; }
.mdocs-doc .mdocs-doc-panel {
	min-height: 120px;
	padding: 24px !important;
	border: 0 !important;
	background: var(--doc-bg);
	font-size: 16px;
	overflow-x: auto;
}
.mdocs-doc .mdocs-doc-panel .mdoc-desc, .mdocs-doc .mdocs-doc-panel .mdoc-desc p { margin: 0 0 12px; font-size: 16px !important; line-height: 1.7; }
.mdocs-doc .mdocs-doc-panel .mdoc-desc { border: 0 !important; }
.mdocs-doc .mdocs-doc-panel img, .mdocs-doc .mdocs-doc-panel iframe { max-width: 100%; }
.mdocs-doc .mdocs-doc-panel iframe { width: 100%; min-height: 70vh; border: 1px solid var(--doc-border); border-radius: 8px; }
.mdocs-doc .mdocs-doc-panel table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mdocs-doc .mdocs-doc-panel th, .mdocs-doc .mdocs-doc-panel td { padding: 10px 8px; border-bottom: 1px solid var(--doc-border); text-align: left; }
.mdocs-doc .mdocs-doc-panel .fa-spin, .mdocs-doc .mdocs-doc-panel .fa-circle-o-notch { color: var(--doc-muted); }
.mdocs-doc .mdocs-doc-notice, .mdocs-doc-notice { padding: 16px; border-radius: 10px; background: #f1f5f9; color: #334155; text-align: center; }

@media (max-width: 720px) {
	.mdocs-doc .mdocs-doc-summary { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
	.mdocs-doc .mdocs-doc-icon { width: 56px; height: 56px; }
	.mdocs-doc .mdocs-doc-icon img { width: 36px; }
	.mdocs-doc .mdocs-doc-actions { grid-column: 1 / -1; min-width: 0; }
	.mdocs-doc .mdocs-doc-meta { gap: 8px 20px; }
	.mdocs-doc .mdocs-doc-tabs { padding: 0 6px; }
	.mdocs-doc .mdocs-doc-panel { padding: 18px !important; }
}
@media (prefers-reduced-motion: reduce) { .mdocs-doc a.mdocs-doc-download { transition: none; } }

/* Neutraliza estilos legados (tema/integração) que vazam para dentro do cartão */
.mdocs.mdocs-doc .mdocs-doc-summary p.mdocs-doc-filename { padding: 0 !important; border: 0 !important; background: none !important; }
.mdocs.mdocs-doc .mdocs-doc-actions a.mdocs-doc-download { padding: 14px 22px !important; border-radius: 10px !important; line-height: 1.2 !important; }
.mdocs.mdocs-doc .mdocs-doc-actions a.mdocs-share-btn.btn { min-height: 42px; padding: 10px 16px !important; }
.mdocs.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab,
.mdocs.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab:hover,
.mdocs.mdocs-doc .mdocs-doc-tabs .mdocs-nav-tab.mdocs-nav-tab-active {
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
.mdocs.mdocs-doc .mdocs-doc-panel > *:first-child { margin-top: 0 !important; }
.mdocs.mdocs-doc .mdocs-doc-panel .mdoc-desc { padding: 0 !important; border: 0 !important; }
.mdocs.mdocs-doc .mdocs-doc-actions [id^="mdocs-social-"] > div { float: none !important; padding: 0 !important; }
.mdocs.mdocs-doc iframe[title*="Facebook"] { max-width: 100%; }

/* Compartilhar */
.mdocs.mdocs-doc .mdocs-doc-share-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid var(--doc-border);
	border-radius: 10px;
	background: var(--doc-bg);
	color: var(--doc-text);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}
.mdocs.mdocs-doc .mdocs-doc-share-toggle:hover,
.mdocs.mdocs-doc .mdocs-doc-share-toggle[aria-expanded="true"] { border-color: var(--doc-accent); color: var(--doc-accent); }
.mdocs.mdocs-doc .mdocs-doc-share-toggle:focus-visible,
.mdocs.mdocs-doc .mdocs-doc-copy:focus-visible,
.mdocs.mdocs-doc .mdocs-doc-native-share:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.mdocs.mdocs-doc .mdocs-doc-share {
	gap: 12px 16px;
	padding: 14px;
	border: 1px solid var(--doc-border);
	border-radius: 10px;
	background: var(--doc-soft);
	text-align: left;
}
.mdocs.mdocs-doc .mdocs-doc-share[hidden] { display: none; }
.mdocs.mdocs-doc .mdocs-doc-share-row label {
	display: block;
	margin: 0 0 4px;
	color: var(--doc-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
}
.mdocs.mdocs-doc .mdocs-doc-share-copy { display: flex; gap: 6px; }
.mdocs.mdocs-doc .mdocs-doc-share-copy input {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--doc-border);
	border-radius: 8px;
	background: var(--doc-bg);
	color: var(--doc-text);
	font-size: 13px;
	text-overflow: ellipsis;
}
.mdocs.mdocs-doc .mdocs-doc-copy,
.mdocs.mdocs-doc .mdocs-doc-native-share {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 6px 14px;
	border: 1px solid var(--doc-accent);
	border-radius: 8px;
	background: var(--doc-bg);
	color: var(--doc-accent);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.mdocs.mdocs-doc .mdocs-doc-copy.is-copied { border-color: #15803d; background: #dcfce7; color: #166534; }
.mdocs.mdocs-doc .mdocs-doc-native-share[hidden] { display: none; }
.mdocs.mdocs-doc .mdocs-doc-summary > .mdocs-doc-share { grid-column: 1 / -1; }
.mdocs.mdocs-doc .mdocs-doc-share:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: end; }

