/*
Theme Name:   Dark Grey
Theme URI:    https://example.com
Author:       Your Site
Author URI:   https://example.com
Description:  A simple, minimal dark-grey theme built to pair with the Crypto Donation Page plugin. Clean typography, no external font/script requests, and an accent color that matches the plugin's default "Midnight" theme so your donate page and the rest of your site feel like one design.
Version:      1.2.0
Requires at least: 5.5
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  dark-grey
*/

/* ==========================================================================
   1. CSS variables / design tokens
   ========================================================================== */

:root {
	--dg-bg:            #17181a;
	--dg-bg-elevated:   #1f2023;
	--dg-card:          #232427;
	--dg-border:        #35363a;
	--dg-text:          #e9e9ec;
	--dg-text-muted:    #9a9ba1;
	--dg-accent:        #ff9500;
	--dg-accent-hover:  #ffab33;
	--dg-accent-text:   #17181a;
	--dg-radius:        12px;
	--dg-max-width:     760px;
	--dg-font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. Reset-ish basics
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background: var(--dg-bg);
	color: var(--dg-text);
	font-family: var(--dg-font);
	font-size: 16px;
	line-height: 1.65;
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--dg-accent);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--dg-accent-hover);
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.25;
	font-weight: 700;
	color: var(--dg-text);
	margin: 1.4em 0 0.6em;
}

h1:first-child, h2:first-child, h3:first-child {
	margin-top: 0;
}

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

blockquote {
	margin: 1.5em 0;
	padding: 0.6em 1.2em;
	border-left: 3px solid var(--dg-accent);
	background: var(--dg-bg-elevated);
	color: var(--dg-text-muted);
	border-radius: 0 8px 8px 0;
}

code, pre {
	font-family: Consolas, Menlo, "Liberation Mono", monospace;
	background: var(--dg-bg-elevated);
	border-radius: 6px;
}

code {
	padding: 2px 6px;
	font-size: 0.9em;
}

pre {
	padding: 14px 16px;
	overflow-x: auto;
	border: 1px solid var(--dg-border);
}

pre code {
	background: none;
	padding: 0;
}

hr {
	border: none;
	border-top: 1px solid var(--dg-border);
	margin: 2.5em 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
}

th, td {
	border: 1px solid var(--dg-border);
	padding: 8px 12px;
	text-align: left;
}

th {
	background: var(--dg-bg-elevated);
}

::selection {
	background: var(--dg-accent);
	color: var(--dg-accent-text);
}

/* ==========================================================================
   3. Layout: site wrapper, header, footer
   ========================================================================== */

.dg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--dg-accent);
	color: var(--dg-accent-text);
	padding: 10px 16px;
	z-index: 999;
	border-radius: 0 0 8px 0;
}

.dg-skip-link:focus {
	left: 0;
}

.dg-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.dg-site-content {
	flex: 1 0 auto;
}

.dg-header {
	border-bottom: 1px solid var(--dg-border);
	background: var(--dg-bg-elevated);
}

.dg-header-inner {
	max-width: 1040px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.dg-site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
}

.dg-custom-logo {
	max-height: 44px;
	width: auto;
	border-radius: 8px;
}

.dg-site-title {
	font-size: 19px;
	font-weight: 700;
	margin: 0;
	line-height: 1;
}

.dg-site-title a {
	color: var(--dg-text);
	text-decoration: none;
}

.dg-site-description {
	font-size: 13px;
	color: var(--dg-text-muted);
	margin: 4px 0 0;
}

.dg-primary-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.dg-primary-nav a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 8px;
	color: var(--dg-text);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
}

.dg-primary-nav a:hover,
.dg-primary-nav a:focus {
	background: var(--dg-card);
	color: var(--dg-accent);
}

.dg-primary-nav .current-menu-item > a {
	color: var(--dg-accent);
}

.dg-menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--dg-border);
	color: var(--dg-text);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 14px;
	cursor: pointer;
}

/* ==========================================================================
   4. Content container (used by page.php / single.php / archive.php)
   ========================================================================== */

.dg-container {
	max-width: var(--dg-max-width);
	margin: 0 auto;
	padding: 48px 24px;
}

.dg-container--wide {
	max-width: 1040px;
}

.dg-entry-header {
	margin-bottom: 1.5em;
}

.dg-entry-title {
	font-size: 30px;
	margin: 0 0 0.3em;
}

.dg-entry-meta {
	font-size: 13.5px;
	color: var(--dg-text-muted);
}

.dg-entry-meta a {
	color: var(--dg-text-muted);
}

.dg-entry-thumbnail {
	margin: 0 0 1.5em;
	border-radius: var(--dg-radius);
	overflow: hidden;
	border: 1px solid var(--dg-border);
}

.dg-card {
	background: var(--dg-card);
	border: 1px solid var(--dg-border);
	border-radius: var(--dg-radius);
	padding: 24px 26px;
	margin-bottom: 24px;
}

.dg-post-list-item {
	padding: 22px 0;
	border-bottom: 1px solid var(--dg-border);
}

.dg-post-list-item:first-child {
	padding-top: 0;
}

.dg-post-list-item:last-child {
	border-bottom: none;
}

.dg-read-more {
	display: inline-block;
	margin-top: 6px;
	font-weight: 700;
}

.dg-pagination {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.dg-pagination a,
.dg-pagination span.current {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--dg-border);
	border-radius: 8px;
	color: var(--dg-text);
	text-decoration: none;
	font-size: 14px;
}

.dg-pagination a:hover {
	border-color: var(--dg-accent);
	color: var(--dg-accent);
}

.dg-pagination span.current {
	background: var(--dg-accent);
	border-color: var(--dg-accent);
	color: var(--dg-accent-text);
	font-weight: 700;
}

/* Buttons / form elements, styled to match the plugin's copy-button accent */

.dg-button,
input[type="submit"],
button {
	display: inline-block;
	background: var(--dg-accent);
	color: var(--dg-accent-text) !important;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none !important;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.dg-button:hover,
input[type="submit"]:hover,
button:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
	background: var(--dg-bg-elevated);
	border: 1px solid var(--dg-border);
	color: var(--dg-text);
	border-radius: 8px;
	padding: 10px 12px;
	font-family: var(--dg-font);
	font-size: 14.5px;
}

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--dg-accent);
	outline-offset: 1px;
}

/* ==========================================================================
   5. Footer
   ========================================================================== */

.dg-footer {
	border-top: 1px solid var(--dg-border);
	background: var(--dg-bg-elevated);
	margin-top: auto;
}

.dg-footer-widgets {
	max-width: 1040px;
	margin: 0 auto;
	padding: 40px 24px 10px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
}

.dg-footer-widgets .widget-title {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--dg-text-muted);
	margin: 0 0 12px;
}

.dg-footer-bottom {
	max-width: 1040px;
	margin: 0 auto;
	padding: 18px 24px 28px;
	font-size: 13px;
	color: var(--dg-text-muted);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.dg-footer-bottom a {
	color: var(--dg-text-muted);
}

/* Full-width page template: strip the max-width constraint so a page like
   the plugin's donation shortcode can render edge-to-edge. */
.dg-template-fullwidth .dg-container {
	max-width: none;
	padding: 0;
}

/* Homepage donation section: the plugin's shortcode is designed to be a
   full standalone page (min-height: 100vh), which is too tall when it's
   just one section of the homepage. Let it size to its content instead,
   and add a top divider so it reads as a distinct section. */
.dg-front-donate {
	border-top: 1px solid var(--dg-border);
}

.dg-front-donate--flush {
	border-top: none;
}

.dg-front-donate .cdp-wrap {
	min-height: 0;
	padding-top: 40px;
	padding-bottom: 56px;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */

/* ==========================================================================
   7. Comments
   ========================================================================== */

.dg-comments-area {
	margin-top: 2.5em;
}

.dg-comments-title {
	font-size: 20px;
	margin-bottom: 0.8em;
}

.dg-comment-list {
	list-style: none;
	margin: 0 0 2em;
	padding: 0;
}

.dg-comment-list .comment-body {
	background: var(--dg-card);
	border: 1px solid var(--dg-border);
	border-radius: var(--dg-radius);
	padding: 16px 18px;
	margin-bottom: 14px;
}

.dg-comment-list .children {
	list-style: none;
	padding-left: 22px;
}

.comment-meta .fn {
	font-weight: 700;
	font-style: normal;
	color: var(--dg-text);
}

.comment-metadata {
	font-size: 12.5px;
	color: var(--dg-text-muted);
	margin-bottom: 8px;
}

.comment-metadata a {
	color: var(--dg-text-muted);
}

.comment-reply-link {
	font-size: 12.5px;
	font-weight: 700;
}

.comment-form label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	margin-bottom: 6px;
}

.comment-form p {
	margin-bottom: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
}

/* ==========================================================================
   8. Widgets / accessibility helpers
   ========================================================================== */

.widget {
	font-size: 14px;
	color: var(--dg-text-muted);
}

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

.widget li {
	padding: 6px 0;
	border-bottom: 1px solid var(--dg-border);
}

.widget li:last-child {
	border-bottom: none;
}

.widget a {
	color: var(--dg-text);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.dg-search-form {
	display: flex;
	gap: 8px;
	justify-content: center;
}

@media (max-width: 680px) {
	.dg-menu-toggle {
		display: inline-block;
	}
	.dg-primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.dg-primary-nav.is-open {
		display: block;
	}
	.dg-primary-nav ul {
		flex-direction: column;
		gap: 2px;
	}
	.dg-entry-title {
		font-size: 24px;
	}
	.dg-container {
		padding: 32px 18px;
	}
}
