/**
 * Typography and layout for WDI legal pages (Privacy, Terms, Refund, DMCA,
 * Data Protection). Enqueued from includes/wdi-legal-pages.php for the
 * specific legal post IDs.
 *
 * Goals:
 *   - Full-width, readable container (up to 1100px on desktop).
 *   - Clear hierarchy (heading sizes, anchored sections).
 *   - Tables that render full-width and wrap on mobile.
 *   - Inline code, italic, and links styled consistently.
 */

/* -------------------------------------------------------------------------- */
/* Container: widen the post body and add breathing room.                     */
/* -------------------------------------------------------------------------- */

body.wdi-legal-page #main-content,
body.wdi-legal-page #main-content > .container,
body.wdi-legal-page .et_pb_section,
body.wdi-legal-page article.et_pb_post,
body.wdi-legal-page .entry-content {
	width: 100%;
	max-width: 100%;
}

body.wdi-legal-page #main-content > .container {
	max-width: 1180px;
	padding-top: 2rem;
	padding-bottom: 3rem;
}

.wdi-legal-document {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 3rem;
	font-size: 1.05rem;
	line-height: 1.7;
	color: #2b2f33;
	background: #ffffff;
}

@media (min-width: 768px) {
	.wdi-legal-document {
		padding: 3rem 2.5rem 3.5rem;
	}
}

/* -------------------------------------------------------------------------- */
/* Headings                                                                   */
/* -------------------------------------------------------------------------- */

.wdi-legal-document h1 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.2;
	margin: 0 0 1rem;
	color: #111418;
	letter-spacing: -0.01em;
}

.wdi-legal-document h2 {
	font-size: clamp(1.25rem, 2vw, 1.65rem);
	line-height: 1.3;
	margin: 2.5rem 0 1rem;
	padding-top: 0.5rem;
	color: #111418;
	border-top: 1px solid #e5e8eb;
}

.wdi-legal-document h2:first-of-type {
	border-top: 0;
	margin-top: 1.5rem;
	padding-top: 0;
}

.wdi-legal-document h3 {
	font-size: 1.15rem;
	line-height: 1.35;
	margin: 1.75rem 0 0.5rem;
	color: #1d2125;
}

/* Anchored section deep-link affordance */
.wdi-legal-document h2[id],
.wdi-legal-document h3[id] {
	scroll-margin-top: 6rem;
}

/* -------------------------------------------------------------------------- */
/* Paragraphs, links, lists                                                   */
/* -------------------------------------------------------------------------- */

.wdi-legal-document p {
	margin: 0 0 1rem;
}

.wdi-legal-document a {
	color: #0b5fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wdi-legal-document a:hover,
.wdi-legal-document a:focus {
	color: #093db8;
}

.wdi-legal-document ul {
	margin: 0 0 1.25rem;
	padding-left: 1.5rem;
}

.wdi-legal-document li {
	margin-bottom: 0.4rem;
}

.wdi-legal-document hr {
	border: 0;
	border-top: 1px solid #e5e8eb;
	margin: 2rem 0;
}

.wdi-legal-document strong {
	color: #111418;
}

.wdi-legal-document em {
	font-style: italic;
	color: #4a5159;
}

.wdi-legal-document code {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.92em;
	background: #f4f6f8;
	border: 1px solid #e5e8eb;
	border-radius: 4px;
	padding: 1px 6px;
	color: #1d2125;
	word-break: break-word;
}

/* -------------------------------------------------------------------------- */
/* Tables                                                                     */
/* -------------------------------------------------------------------------- */

.wdi-legal-table-wrap {
	margin: 0 0 1.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e5e8eb;
	border-radius: 6px;
}

table.wdi-legal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.96rem;
	background: #ffffff;
}

table.wdi-legal-table th,
table.wdi-legal-table td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #eef0f2;
	border-right: 1px solid #f4f6f8;
}

table.wdi-legal-table th:last-child,
table.wdi-legal-table td:last-child {
	border-right: 0;
}

table.wdi-legal-table tr:last-child td {
	border-bottom: 0;
}

table.wdi-legal-table th {
	background: #f7f9fa;
	font-weight: 600;
	color: #111418;
	border-bottom: 1px solid #d8dde2;
}

table.wdi-legal-table tr:nth-child(even) td {
	background: #fafbfc;
}

/* Long-URL break inside cells */
table.wdi-legal-table td a,
table.wdi-legal-table td code {
	word-break: break-word;
}

/* -------------------------------------------------------------------------- */
/* Effective date / meta block on first paragraphs                            */
/* -------------------------------------------------------------------------- */

.wdi-legal-document h1 + p,
.wdi-legal-document h1 + p + p,
.wdi-legal-document h1 + p + p + p,
.wdi-legal-document h1 + p + p + p + p {
	margin-bottom: 0.25rem;
	color: #4a5159;
	font-size: 0.95rem;
}

.wdi-legal-document h1 ~ hr:first-of-type {
	margin-top: 1.5rem;
}
