/*
Theme Name: Nook
Theme URI: https://wordpress.com/themes/nook/
Description: Nook is a classic blogging theme offering a delightful canvas for your DIY projects, delicious recipes, and creative inspirations.
Version: 1.0.2
Author: Automattic
Author URI: https://automattic.com/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nook
*/

/*
 * 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--background);
	border-color: var(--wp--preset--color--secondary);
}

.wp-block-table figcaption {
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

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

/*
 * Navigation Block
 * Reset the padding from List block
 * https://github.com/WordPress/gutenberg/issues/50486
 */
.wp-block-navigation ul {
	padding: unset;
}

/* === LINKS DE CATEGORIA/TAG (100% CSS, prioridade máxima) === */

body.single-post .entry-content a[href*="/category/"],
body.single-post .entry-content a[rel~="tag"],
body.single-post .entry-footer a[href*="/category/"],
body.single-post .entry-footer a[rel~="tag"],
body.blog .entry-content a[href*="/category/"],
body.blog .entry-footer a[href*="/category/"],
body.archive .entry-content a[href*="/category/"],
body.archive .entry-footer a[href*="/category/"],
body .cat-links a,
body .tag-links a,
body .tags-links a,
body .post-meta a[href*="/category/"],
body .post-meta a[rel~="tag"],
body .wp-block-post-terms a,
body .wp-block-post-terms__separator + a {
  text-decoration: none !important;
  background-color: #4EAC31 !important;
  color: #fff !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  display: inline-block !important;
  margin: 2px 3px !important;
  font-size: 0.9em !important;
  line-height: 1.2 !important;
  transition: background-color 0.2s ease-in-out !important;
}

/* Hover */
body.single-post .entry-content a[href*="/category/"]:hover,
body.single-post .entry-content a[rel~="tag"]:hover,
body.single-post .entry-footer a[href*="/category/"]:hover,
body.single-post .entry-footer a[rel~="tag"]:hover,
body.blog .entry-content a[href*="/category/"]:hover,
body.blog .entry-footer a[href*="/category/"]:hover,
body.archive .entry-content a[href*="/category/"]:hover,
body.archive .entry-footer a[href*="/category/"]:hover,
body .cat-links a:hover,
body .tag-links a:hover,
body .tags-links a:hover,
body .post-meta a[href*="/category/"]:hover,
body .post-meta a[rel~="tag"]:hover,
body .wp-block-post-terms a:hover,
body .wp-block-post-terms__separator + a:hover {
  background-color: #000 !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Sublinhado animado que acompanha o texto do título */
.wp-block-post-title a {
    color: inherit;
    text-decoration: none;
    display: inline; /* inline para seguir o tamanho do texto */
    background: linear-gradient(to right, #4EAC31 0%, #4EAC31 100%);
    background-size: 0% 3px;
    background-repeat: no-repeat;
    background-position: bottom left; /* linha inicia do começo do texto */
    transition: background-size 0.4s ease;
}

.wp-block-post-title a:hover {
    background-size: 100% 3px; /* a linha cresce do início ao fim do texto */
}