/*
Theme Name: Nouvelle
Theme URI: https://themeshaper.com/nouvelle/
Author: Automattic
Author URI: https://automattic.com
Description: Nouvelle is a blog theme inspired by the flowing lines and floral elegance of Art Nouveau. It combines ornamental detail with modern readability, making it ideal for cultural enthusiasts: poetic, decorative, and timeless.
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nouvelle
Tags: block-styles, blog, featured-images, full-site-editing, rtl-language-support, sticky-post, style-variations, threaded-comments, translation-ready

Nouvelle WordPress Theme, (C) 2022 Automattic, Inc.
Nouvelle is distributed under the terms of the GNU GPL.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/

/* Progresive enhancement to reduce widows and orphans.
/* https://github.com/WordPress/gutenberg/issues/55190
*/

h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption {
    text-wrap: balance;
}
p {
    text-wrap: pretty;
}

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--secondary);
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: .0225em !important;
	text-underline-offset: .125em;
}

/* Scope only this layout */
.frame-columns > .wp-block-column {
  flex: 0 0 auto !important;  /* stop equal thirds */
}

/* Middle column: grow into remaining space */
.frame-columns > .wp-block-column.central-column {
  flex: 1 1 auto !important;
  min-width: 0;
  overflow: visible;
  z-index: 10; /* Ensure content always stacks above side frames */
}

/* Bleed inside middle */

/* Default desktop */
.frame-columns .central-bleed {
  width: calc(100% + 20%);
  margin-left: -10%;
  margin-right: -10%;
  max-width: none;
}

/* Tablets (<=1080px) */
@media (max-width: 1080px) {
  .frame-columns .central-bleed {
    width: calc(100% + 10%);
    margin-left: -5%;
    margin-right: -5%;
  }
}

/* Small tablets / large phones (<=820px) */
@media (max-width: 820px) {
  .frame-columns .central-bleed {
    width: calc(100% + 20%);
    margin-left: -10%;
    margin-right: -10%;
  }
}

/* Phones (<=520px) */
@media (max-width: 520px) {
  .frame-columns .central-bleed {
    width: calc(100% + 50%);
    margin-left: -25%;
    margin-right: -25%;
  }
}

/* Prevent bleed from pushing frames off screen */
.frame-columns {
  overflow-x: hidden;
}

/* Base: template corner images */
.corner-frame {
  width: 240px;
  height: auto;
}

/* Responsive sizes: smaller on mobile */
@media (max-width: 1080px) {
  .corner-frame {
    width: 80px;
  }
}

/* Base: portrait corner images */
.portrait-corner-frame {
  width: 48px;
  height: auto;
}

/* Image flips */
.portrait-corner-frame.top-right {
  transform: scaleX(-1);
}
.portrait-corner-frame.bottom-left {
  transform: scaleY(-1);
}
.portrait-corner-frame.bottom-right {
  transform: scale(-1, -1);
}

.corner-frame.top-right {
  transform: scaleX(-1);
}
.corner-frame.bottom-left {
  transform: scaleY(-1);
}
.corner-frame.bottom-right {
  transform: scale(-1, -1);
}

/* Ornamental Quote Block */
.wp-block-quote.is-style-nouvelle-ornament {
  text-align: center;
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
  padding: var(--wp--preset--spacing--60) 0;
  margin: 0 auto;
  max-width: 42rem; /* keeps it readable */
  position: relative;
}

/* Ornamental Quote text sizing */
.wp-block-quote.is-style-nouvelle-ornament p {
  font-size: var(--wp--preset--font-size--x-large);
}

/* On smaller screens, reduce to large */
@media (max-width: 782px) { /* WP's default mobile breakpoint */
  .wp-block-quote.is-style-nouvelle-ornament p {
    font-size: var(--wp--preset--font-size--large);
  }
}

.wp-block-quote.is-style-nouvelle-ornament cite {
  display: block;
  margin-top: var(--wp--preset--spacing--30);
  font-size: var(--wp--preset--font-size--small);
}

/* Decorative star before the quote */
.wp-block-quote.is-style-nouvelle-ornament::before {
  content: "✸";
  display: block;
  font-size: var(--wp--preset--font-size--large);
  line-height: 1;
  color: var(--wp--preset--color--secondary);
  margin-bottom: var(--wp--preset--spacing--20);
  text-align: center;
  width: 100%;              /* ensure it spans full width */
  position: relative;       /* establish positioning */
}

/* Make the comment form submit button full width */
.comment-form input[type="submit"],
.wp-block-post-comments-form .wp-block-button__link {
  display: block;
  width: 100%;
  box-sizing: border-box; /* so padding doesn’t overflow */
}