/*
Theme Name: Cyberpop
Theme URI: https://themeshaper.com/cyberpop/
Author: Automattic
Author URI: https://automattic.com/
Description: Cyberpop is a contemporary Y2K revival blogging theme for bloggers who want fun and personality. Glass cards, glowing gradients and futuristic type give your words a screen-lit, turn-of-the-millennium feel.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cyberpop
Tags: blog, entertainment, two-columns, featured-images, full-site-editing, block-patterns, block-styles, wide-blocks, translation-ready

/* Crossfade page transition */

@view-transition {
	navigation: auto;
}

/* Font smoothing */
body {
	text-rendering: geometricprecision;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

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

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Tighten margin when a heading follows another heading in post content.
 * The doubled top-margin in theme.json signals a section break above; when
 * two headings are adjacent the subordinate one should sit closer to its
 * parent rather than read as a new section. The class is unwrapped from
 * :where() so we beat the theme.json-generated `:root :where(...)` rule
 * (which is 0,1,0 specificity from :root).
 */
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {
	margin-top: var(--wp--style--block-gap);
}

/*
 * Make sure footers have no margin.
 * https://github.com/WordPress/gutenberg/issues/47637
 */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

/* Utility classes for removing text decoration from link. */
.no-underline a {
	text-decoration: none;
}

/* Utility classes for custom ordering. */
.order-0 {
	order: 0;
}

.order-1 {
	order: 1;
}

.grow-0 {
	flex-grow: 0;
}

.grow {
	flex-grow: 1;
}

@media (min-width: 600px) {
	.md\:order-0 {
		order: 0;
	}

	.md\:order-1 {
		order: 1;
	}

	.md\:grow-0 {
		flex-grow: 0;
	}

	.md\:grow {
		flex-grow: 1;
	}
}

/*
 * Post card hover effect (glass shine, lift, highlighted edges, image zoom).
 * Applies to the group block wrapping each post in the query loop. Its resting
 * border colors come from the Glass Card block style.
 */
.wp-block-post-template .wp-block-post > .wp-block-group {
	position: relative;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Shine sweep */
.wp-block-post-template .wp-block-post > .wp-block-group::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 50%;
	height: 100%;
	background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
	transform: skewX(-20deg);
	transition: left 0.7s;
	pointer-events: none;
	z-index: 1;
}

.wp-block-post-template .wp-block-post > .wp-block-group:hover {
	transform: translateY(-4px);
	border-top-color: #fff;
	border-left-color: #fff;
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.wp-block-post-template .wp-block-post > .wp-block-group:hover::before {
	left: 200%;
}

/* Featured image: slight grow on card hover (the whole figure scales, so the border and radius stay intact) */
.wp-block-post-template .wp-block-post .wp-block-post-featured-image {
	transition: transform 0.5s;
}

.wp-block-post-template .wp-block-post > .wp-block-group:hover .wp-block-post-featured-image {
	transform: scale(1.05);
}

/* Post date: always wrapped in dimmed square brackets */
.wp-block-post-date::before,
.wp-block-post-date::after {
	opacity: 0.5;
}

.wp-block-post-date::before {
	content: "[";
	margin-inline-end: 0.75em;
}

.wp-block-post-date::after {
	content: "]";
	margin-inline-start: 0.75em;
}

/* Navigation links, Menu/Close buttons and pagination links: glass pill on hover (the Overlay Close and Previous/Next Page boxes and the hover underline live in theme.json) */
.wp-block-navigation .wp-block-navigation-item a.wp-block-navigation-item__content.wp-block-navigation-item__content,
.wp-block-navigation button.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open,
.wp-block-navigation button.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close,
.wp-block-query-pagination-numbers .page-numbers.page-numbers {
	padding: 0.75rem 1.25rem;
	border: 1px solid transparent;
	border-radius: 12px;
	transition: all 0.2s;
}

.wp-block-query-pagination-next,
.wp-block-query-pagination-previous {
	transition: all 0.2s;
}

.wp-block-navigation .wp-block-navigation-item a.wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.wp-block-navigation button.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation button.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close:hover,
.wp-block-navigation button.wp-block-navigation-overlay-close.wp-block-navigation-overlay-close:hover,
.wp-block-navigation .wp-block-navigation-item a.wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible,
.wp-block-navigation button.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open:focus-visible,
.wp-block-navigation button.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close:focus-visible,
.wp-block-navigation button.wp-block-navigation-overlay-close.wp-block-navigation-overlay-close:focus-visible,
.wp-block-query-pagination a.wp-block-query-pagination-next.wp-block-query-pagination-next:hover,
.wp-block-query-pagination a.wp-block-query-pagination-previous.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-numbers a.page-numbers.page-numbers:hover,
.wp-block-query-pagination a.wp-block-query-pagination-next.wp-block-query-pagination-next:focus-visible,
.wp-block-query-pagination a.wp-block-query-pagination-previous.wp-block-query-pagination-previous:focus-visible,
.wp-block-query-pagination-numbers a.page-numbers.page-numbers:focus-visible,
.wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--wp--preset--color--theme-5);
	border-color: rgba(255, 255, 255, 0.15);
	border-top-color: rgba(255, 255, 255, 0.4);
	border-left-color: rgba(255, 255, 255, 0.4);
	box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Navigation links and Menu/Close buttons: clear keyboard focus indicator */
.wp-block-navigation .wp-block-navigation-item a.wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible,
.wp-block-navigation button.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open:focus-visible,
.wp-block-navigation button.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close:focus-visible,
.wp-block-navigation button.wp-block-navigation-overlay-close.wp-block-navigation-overlay-close:focus-visible,
.wp-block-query-pagination a.wp-block-query-pagination-next.wp-block-query-pagination-next:focus-visible,
.wp-block-query-pagination a.wp-block-query-pagination-previous.wp-block-query-pagination-previous:focus-visible,
.wp-block-query-pagination-numbers a.page-numbers.page-numbers:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Site title: outlined text, reading bottom to top when it is vertical (the sidebar) */
.wp-block-site-title[style*="writing-mode"]:where([style*="vertical"]) {
	transform: rotate(180deg);
}

/* Navigation overlay: smooth fade in and out */
.wp-block-navigation__responsive-container.hidden-by-default {
	opacity: 0;
	animation: none;
	transition: opacity 0.4s ease, display 0.4s allow-discrete, overlay 0.4s allow-discrete;
}

.wp-block-navigation__responsive-container.hidden-by-default.is-menu-open {
	opacity: 1;
}

@starting-style {
	.wp-block-navigation__responsive-container.hidden-by-default.is-menu-open {
		opacity: 0;
	}
}

/* Buttons: smooth state changes (the glass hover colors live in theme.json) */
:is(.wp-element-button, .wp-block-button__link) {
	transition: all 0.2s;
}

:is(.wp-element-button, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--theme-1);
	outline-offset: 2px;
}

/* Site title: no rotation when it is horizontal (tablet and mobile) */
@media (max-width: 782px) {
	.wp-block-site-title[style*="writing-mode"]:where([style*="vertical"]) {
		transform: none;
	}
}

/* Post Author avatar: same diagonal stroke as the cards (the Image, Featured Image and Avatar blocks set it in theme.json) */
.wp-block-post-author img.avatar {
	border-style: solid;
	border-width: 1px;
	border-color: rgba(255, 255, 255, 0.15);
	border-top-color: rgba(255, 255, 255, 0.4);
	border-left-color: rgba(255, 255, 255, 0.4);
}

/*
 * Jetpack Sharing Buttons: give the Icon & Text and Text styles the default Button colors.
 * https://github.com/Automattic/jetpack/issues/55253
 */
.jetpack-sharing-button__button:not(.style-icon) {
	background-color: var(--wp--preset--color--theme-2);
	color: var(--wp--preset--color--theme-1);
}
