/*
Theme Name: Crafted
Theme URI: https://themeshaper.com/crafted/
Author: Automattic
Author URI: https://automattic.com
Description: Crafted is a theme designed for creators who want to share more than just their work. Whether you’re an author, coach, or creative guide, it helps you publish stories, promote your publications, and offer tools or services that support your audience.
Requires at least: 6.8
Tested up to: 6.8
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: crafted
Tags: blog, two-columns, wide-blocks, rtl-language-support, style-variations, threaded-comments, translation-ready

Crafted WordPress Theme, (C) 2022 Automattic, Inc.
Crafted 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.
*/

/*
 * 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: .1em;
}

/* Remove the Core gap after header and before footer at the site root */
:where(.wp-site-blocks) > .wp-block-template-part + * { margin-block-start: 0 !important; }
:where(.wp-site-blocks) > * + .wp-block-template-part { margin-block-start: 0 !important; }

/* Also neutralize any stray first/last margins inside the parts */
.wp-block-template-part[aria-label*="Header"] > *:last-child { margin-bottom: 0 !important; }
.wp-block-template-part[aria-label*="Footer"] > *:first-child { margin-top: 0 !important; }

/* Latest Posts: remove underline from post titles */
.wp-block-latest-posts__post-title {
  text-decoration: none;
}

/* Optional: keep underline on hover/focus */
.wp-block-latest-posts__post-title:hover,
.wp-block-latest-posts__post-title:focus {
  text-decoration: underline;
}

/* Smooth shadow for card blocks */
.has-shadow-natural {
  box-shadow: 0px 4px 12px rgba(0,0,0,0.025) !important;
}

/* Dropcap for content blocks */
.has-dropcap:first-letter {
  font-size: 4.25rem;
  float: left;
  margin: 0.1rem 0.1rem 0.2rem 0;
  line-height: 0.65;
  padding: 0.5rem;
}

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

/* Remove widows */
* {
    text-wrap: pretty;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Newsletter line style */
:root { --nl-primary: var(--wp--preset--color--primary); }

/* Underline under the input element */
.wp-block-jetpack-contact-form.nl-line input[type="email"],
.wp-block-jetpack-contact-form.nl-line input[type="text"],
.wp-block-jetpack-contact-form.nl-line textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--nl-primary);
  border-radius: 0;
}

/* Zero left/right padding on email input */
.wp-block-jetpack-contact-form.nl-line input[type="email"],
.wp-block-jetpack-contact-form.nl-line input[type="text"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-inline: 0 !important;
}

/* Zero left/right padding on submit button */
.wp-block-jetpack-contact-form.nl-line button[type="submit"],
.wp-block-jetpack-contact-form.nl-line input[type="submit"],
.wp-block-jetpack-contact-form.nl-line .wp-block-button__link {
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left; /* optional: align text left instead of center */
}

/* Neutralize Jetpack’s animated left offset */
.wp-block-jetpack-contact-form.nl-line .wp-block-jetpack-field-email,
.wp-block-jetpack-contact-form.nl-line .contact-form__inset-label-wrap,
.wp-block-jetpack-contact-form.nl-line .wp-block-jetpack-input-wrap {
  --jetpack--contact-form--animated-left-offset: 0 !important;
}

/* Zero *all* horizontal padding/margin inside this form only */
.wp-block-jetpack-contact-form.nl-line * {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Add accessible text to the arrow button */
.arrow-button::before {
  content: "Subscribe";
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Make the email field grow; ignore the 75% utility */
.wp-block-jetpack-contact-form.nl-line { 
  display: flex; 
  align-items: center; 
  gap: .5rem;           /* optional; remove if you want zero gap */
}

.wp-block-jetpack-contact-form.nl-line .grunion-field-width-75-wrap {
  width: auto !important;      /* beat the 75% rule */
  max-width: none !important;
  flex: 1 1 auto !important;   /* grow/shrink with space */
  min-width: 0;                /* prevent overflow */
}

/* Clear ANY filter/duotone on hover for this block */
.duo-clear-on-hover:hover,
.duo-clear-on-hover:hover * {
  filter: none !important;
}

/* Only images inside a block with this class will animate */
.hover-zoom-tilt img {
  transition: transform 0.35s ease;
  transform-origin: center center;
}

.hover-zoom-tilt:hover img {
  transform: scale(1.05) rotate(-2deg);
}
