/*
Theme Name: Best SilentNight Mattress
Theme URI: https://bestsilentnightmattress.co.uk
Author: EMGI Group
Description: A midnight-and-brass editorial block theme for independent Silentnight mattress reviews. Full Site Editing, core blocks only, no plugins, no external assets. Built for long-form review content, comparison tables and Core Web Vitals.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestsilentnight
Tags: blog, news, full-site-editing, block-patterns, one-column, wide-blocks, custom-colors, editor-style
*/

/* =========================================================
   Best SilentNight Mattress — supplementary styles
   (theme.json carries the design tokens; this file adds the
   detail theme.json cannot express: table styling, button
   style variations, small polish.)
   ========================================================= */

/* --- Comparison tables (heavily used in reviews) --- */

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--wp--preset--color--border, #E3DACA);
}

.wp-block-table th {
  background: var(--wp--preset--color--midnight, #131C31);
  color: var(--wp--preset--color--moon, #F2E8D5);
  font-family: var(--wp--preset--font-family--sans, Arial, sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--wp--preset--color--midnight, #131C31);
}

.wp-block-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--wp--preset--color--border, #E3DACA);
  vertical-align: top;
}

.wp-block-table tbody tr:nth-child(even) td {
  background: var(--wp--preset--color--surface, #F2EADB);
}

.wp-block-table figcaption {
  font-family: var(--wp--preset--font-family--sans, Arial, sans-serif);
  font-size: 0.8125rem;
  color: var(--wp--preset--color--muted, #6E6455);
  text-align: left;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Blockquote polish --- */

.wp-block-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--wp--preset--font-family--sans, Arial, sans-serif);
  font-size: 0.8125rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted, #6E6455);
}

/* --- Button style variations --- */

/* CTA: oversized brass call-to-action for review verdict boxes.
   Apply via "Styles" on any core Button block (is-style-cta). */
.wp-block-button.is-style-cta .wp-block-button__link {
  background: var(--wp--preset--color--brass, #C99B3F);
  color: var(--wp--preset--color--midnight-deep, #0C1322);
  border: 2px solid var(--wp--preset--color--midnight-deep, #0C1322);
  box-shadow: 4px 4px 0 var(--wp--preset--color--midnight-deep, #0C1322);
  border-radius: 0;
  padding: 1.1rem 2.5rem;
  font-size: 1.0625rem;
}

.wp-block-button.is-style-cta .wp-block-button__link:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--wp--preset--color--midnight-deep, #0C1322);
  background: var(--wp--preset--color--brass-dark, #A97F2C);
  color: var(--wp--preset--color--base, #FAF5EC);
}

/* Outline-on-dark: for buttons sitting on midnight sections. */
.wp-block-button.is-style-moon-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--moon, #F2E8D5);
  border: 2px solid var(--wp--preset--color--brass, #C99B3F);
  border-radius: 0;
}

.wp-block-button.is-style-moon-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--brass, #C99B3F);
  color: var(--wp--preset--color--midnight-deep, #0C1322);
}

/* --- Review card geometry: sharp, flat, brass top rule --- */

.snm-review-card {
  border: 1px solid var(--wp--preset--color--border, #E3DACA);
  border-top: 4px solid var(--wp--preset--color--brass, #C99B3F);
  background: var(--wp--preset--color--base, #FAF5EC);
}

/* --- Long-form reading polish --- */

.entry-content > p:first-of-type::first-letter,
.snm-lede::first-letter {
  font-family: var(--wp--preset--font-family--display, Georgia, serif);
}

/* Post meta labels */
.snm-kicker {
  font-family: var(--wp--preset--font-family--sans, Arial, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Never let images overflow */
img {
  max-width: 100%;
  height: auto;
}
