/*
Theme Name: Magecart Dark
Theme URI: https://www.magecart.co.uk/
Author: Andrew Mason
Description: Dark, technical block theme for security research and web-skimming threat reporting. System fonts only - no third-party font requests.
Version: 1.1.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: magecart-dark
Tags: blog, news, one-column, block-patterns, full-site-editing, dark
*/

/* Block themes are styled via theme.json. Only genuine extras live here. */

/* Keep raw <img> in post content inside its container (classic-editor content). */
.wp-block-post-content img,
.entry-content img { max-width: 100%; height: auto; }

/* Subtle top rule on cards when they stack on small screens */
@media (max-width: 781px) {
  .mc-card + .mc-card { margin-block-start: var(--wp--preset--spacing--30); }
}

/* Respect reduced-motion for the accent underline transition */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Hero text shares the grid's left edge but keeps a readable measure. */
.mc-hero-measure { max-width: 54rem; }

/* ---- Forms -------------------------------------------------------------
   Core ships unstyled inputs, which render white-on-dark. Bring them into
   the palette and give focus a visible, non-colour-only indicator.        */
input[type="text"], input[type="email"], input[type="url"],
input[type="search"], input[type="password"], input[type="number"],
textarea, select {
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--contrast);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  max-width: 100%;
}
textarea { width: 100%; }
input::placeholder, textarea::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}
input[type="checkbox"] { accent-color: var(--wp--preset--color--accent); }

/* Search block sits inside a bordered shell; avoid a double border. */
.wp-block-search__inside-wrapper input { border: 0; background: transparent; }
.wp-block-search__inside-wrapper {
  background-color: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 3px;
}

/* ---- Comments ---------------------------------------------------------- */
.wp-block-comment-template li + li {
  margin-block-start: var(--wp--preset--spacing--40);
  padding-block-start: var(--wp--preset--spacing--30);
  border-block-start: 1px solid var(--wp--preset--color--border);
}
.wp-block-comment-author-name a { text-decoration: none; }
.wp-block-comment-date a { text-decoration: none; }

/* Post content images from the classic editor */
.wp-block-post-content table { display: block; overflow-x: auto; }

/* ---- Sidebar ------------------------------------------------------------ */
.mc-widget-title {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  padding-block-end: 0.5rem;
  border-block-end: 1px solid var(--wp--preset--color--border);
}
.wp-block-categories, .wp-block-archives, .mc-links { list-style: none; padding: 0; }
.wp-block-categories li, .wp-block-archives li, .mc-links li {
  padding: 0.35rem 0; font-size: var(--wp--preset--font-size--small);
  border-block-end: 1px solid color-mix(in srgb, var(--wp--preset--color--border) 55%, transparent);
}
.wp-block-categories a, .wp-block-archives a, .mc-links a {
  color: var(--wp--preset--color--contrast); text-decoration: none;
}
.wp-block-categories a:hover, .wp-block-archives a:hover, .mc-links a:hover { color: var(--wp--preset--color--accent); }
/* post counts in mono, muted */
.wp-block-categories li, .wp-block-archives li { color: var(--wp--preset--color--muted); font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); }
.wp-block-categories li a, .wp-block-archives li a { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--small); }
/* sidebar stacks under content on narrow screens (columns block handles the break) */
@media (max-width: 781px) { .mc-widget { margin-block-start: var(--wp--preset--spacing--30); } }
