/*
Theme Name: Pixl
Theme URI: https://wordpress.com/theme/pixl/
Author: Automattic
Author URI: https://automattic.com/
Description: Pixl is a simple yet opinionated blogging theme inspired by websites of the nineties.
Requires at least: 6.0
Tested up to: 6.0
Requires PHP: 5.7
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
Template:
Text Domain: pixl
Tags: custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, one-column, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks, style-variations
*/

/*
 * Custom class to add shadow to blocks
 * Need this until box shadow support added to Gutenberg here: https://github.com/WordPress/gutenberg/pull/43184
 */
.pixl-shadow {
    box-shadow: var(--wp--custom--shadow);
}

/* Links */
a:where(:not(.wp-element-button)) {
    text-underline-offset: .3em;
    /* text-decoration-thickness: 2px; */
}

/*
 * Form elements
 */
:is(textarea, input:not([type="submit"])) {
    color: var(--wp--preset--color--foreground);
    background-color: var(--wp--preset--color--background);
    border: 2px solid var(--wp--preset--color--primary) !important;
    outline: none;
    font-size: 0.875rem;
    font-family: inherit;
}

:is(textarea, input:not([type="submit"]))::placeholder {
    color: var(--wp--preset--color--foreground);
    font-weight: 300;
}

.wp-block-search :is(textarea, input:not([type="submit"])) {
    box-shadow: var(--wp--custom--shadow);
    margin-right: var(--wp--preset--spacing--20);
}

input[type="checkbox"] {
    appearance: none;
    min-width: 0.75rem;
    height: 0.75rem;
    position: relative;
    margin-left: 0;
}

input[type="checkbox"]:checked::after {
    background-color: var(--wp--preset--color--foreground);
    content: "";
    position: absolute;
    width: 75%;
    height: 75%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
}

/*
 * Navigation styles
 */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
    background-color: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
    border-color: var(--wp--preset--color--primary);
}

.wp-block-pullquote cite {
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 300;
    line-height: 1.6;
}

/* Necessary so the header containing the navigation fills the entire remaining horizontal space, since it is positioned in a flex group with the site logo. */
.pixl-header {
    flex-grow: 1;
}

/* Hover state for outline style button */
.wp-block-button.is-style-outline .wp-element-button:hover {
    background-color: var(--wp--preset--color--foreground);
    border-color: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
}

.custom-book-quote {
    position: relative;
    /* 使用略微偏灰的米色，与博客背景区分但保持协调 */
    background: #f4f1ea;
    padding: 35px 45px 55px;
    margin: 3em 2em 3em 3em;
    /* 添加伪3D视角效果 */
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
    transform-style: preserve-3d;
    /* 微妙的阴影效果 */
    box-shadow: 
        0 15px 25px -8px rgba(0,0,0,0.15),
        0 5px 15px -5px rgba(0,0,0,0.1);
    border-radius: 2px;
    border-left: none;
    transition: transform 0.3s ease;
    padding-bottom: 45px;
}

/* 书脊效果 */
.custom-book-quote:before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right,
        #d4cfc7 0%,
        #e6e0d4 40%,
        #d4cfc7 100%
    );
    transform: rotateY(15deg) translateZ(-5px);
    transform-origin: left;
    border-left: 1px solid rgba(0,0,0,0.2);
    box-shadow: 
        inset -2px 0 5px rgba(0,0,0,0.1),
        1px 0 2px rgba(0,0,0,0.05);
}

/* 纸张纹理和装饰 */
.custom-book-quote:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to right,
            rgba(0,0,0,0.03) 0%,
            transparent 20%,
            transparent 80%,
            rgba(0,0,0,0.03) 100%
        );
    pointer-events: none;
}

/* 内容区域样式 */
.custom-book-quote p {
    position: relative;
    margin: 0;
    padding: 10px;
    font-size: 1.0em;
    line-height: 2.5;
    color: #2f2f2f;
    /* 移除背景图案 */
    background: none;
    /* 使用伪元素创建横线 */
    display: inline-block;
}

/* 创建横线效果 */
.custom-book-quote p span {
    border-bottom: 1px solid #ccc; /* 默认添加横线 */
}

.custom-book-quote p span:last-child {
    border-bottom: none; /* 移除最后一个元素的横线 */
}

/* 移除最后一个横线 */
.custom-book-quote p span:last-child:after {
    display: none;
}

/* 左侧装饰线 */
.custom-book-quote p:before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom,
        rgba(255,107,107,0.4),
        rgba(255,107,107,0.2)
    );
}

/* 右下角翻页效果 */
.custom-book-quote p:after {
    content: '';
    position: absolute;
    right: -25px;
    bottom: -15px;
    width: 30px;
    height: 30px;
    background: #f4f1ea;
    transform: rotate(5deg) skewX(-5deg);
    box-shadow: 
        -2px 2px 5px rgba(0,0,0,0.08),
        inset -1px 1px 3px rgba(255,255,255,0.8);
    border-radius: 0 0 0 5px;
}

/* 悬停效果 */
.custom-book-quote:hover {
    transform: perspective(1000px) rotateY(-3deg) rotateX(1deg) translateY(-5px);
    box-shadow: 
        0 20px 30px -10px rgba(0,0,0,0.2),
        0 8px 20px -6px rgba(0,0,0,0.1);
}
