/*
Theme Name: Red Lion Books
Author: Ian Coldwell
Author URI: https://3-Ls.com
Description: Red Lion Books 2026 Theme emphasizes simplicity and adaptability. It offers flexible design options, adapted specifically for an independent Bookseller.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: red-lion-books
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, news
*/

/*
 * Link styles
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
*/
.more-link {
	display: block;
}

.page-count {
border:1px solid purple;
padding:6px;
}

.orderby {
padding:6px;
border-radius:8px;}

.prefix {
font-weight:700;
}

/*
 * Apply this class to any element (e.g., a button, a card, or an image)
 * to give it a gentle lift effect on hover.
 */

.nudge-on-hover {
    /* 1. Setup for smooth movement */
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: transform; /* Hint for browser performance */

    /* Optional: Add a subtle shadow for depth, which also lifts */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

/* 2. State when the mouse is over the element */
.nudge-on-hover:hover {
    /* Moves the element up 3 pixels (negative Y-axis) */
    transform: translateY(-3px); 
    
    /* Optional: Deepen the shadow to enhance the "lifted" look */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); 
}


/* 1. Define the Container and Base State */
.image-sprite-swap {
    /* Set dimensions to the size of a SINGLE image */
    position: relative;
    width: 200px;
    height: 165px; 
    display: block;
    z-index:0; 
    
    /* Load the combined sprite sheet */
    background-image: url('https://3lsinnovation.com/rlb/wp-content/uploads/wave.png');
    background-size: 100% 200%; 
    background-repeat: no-repeat;
    
    /* Initial position: Show the top image (Image 1) */
    background-position: 0 0; 
    
/* transition: background-position 0.2s ease-out; */ 
}

/* Existing CSS for Desktop Hover */
.image-sprite-swap:hover {
    background-position: 0 -166px; 
}

/* NEW CSS for Mobile Touch/Focus */
.mobile-focus-swap:focus .image-sprite-swap {
    /* When the wrapper link is focused (tapped), apply the swap */
    background-position: 0 -166px;
}

.lion-tail{
position: relative;
  right: 50px;
  top: 0px;
  z-index: 999;
}



.is-style-section-4 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);

/* 1. Define the base color */
    background-color: #a1b6cc;

    /* 2. Apply the linear gradient for the curve effect */
    background-image: linear-gradient(
        to bottom,              /* Direction: Top-down */
        #a1b6cc 0%,             /* Start: Your darker color at the top */
        #d8e0e8 50%,            /* Middle: A significantly lighter shade for the "curve peak" */
        #a1b6cc 100%            /* End: Back to your darker color at the bottom */
    );

}


.wp-block-categories-dropdown {
    position: relative;
    width: fit-content; 
    display: inline-block;
}

.wp-block-categories-dropdown::after {
    content: '▼'; 
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #555; 
    pointer-events: none; 
}

select.postform {
    -webkit-appearance: none;
    -moz-appearance: none;    
    appearance: none;
    font-size: 1rem;
    padding: 10px 40px 10px 15px;
    height: 50px;
    width: initial;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f8f8;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select.postform:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}


/* Change mobile menu background color */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #a1b6cc !important;
}

/* Center the link item containers (using flexbox) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 1. Remove margin spacing between mobile menu list items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Style links, CENTER TEXT, and reduce vertical padding */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    color: white !important;
    font-size: 1.3rem !important;
    /* REDUCED VERTICAL PADDING HERE (was 10px 15px) */
    padding: 5px 15px !important; 
    text-align: center !important;
    width: 100%;
}



/* --- 1. BASE FORM CONTAINER STYLES --- */
.rlb-request-form-container {
    max-width: 650px; /* Constrain width for readability */
    margin: 40px auto; /* Center the form and add vertical space */
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Rounded corners */
    background-color: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Subtle lift */
}

/* --- 2. TITLES & SUBTITLES --- */
.rlb-form-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 5px;
    border-bottom: 2px solid #555; /* Subtle separator */
    padding-bottom: 10px;
}

.rlb-form-subtitle {
    font-size: 1em;
    color: #666;
    margin-bottom: 25px;
}

/* --- 3. ROW STYLES (for spacing) --- */
.form-row {
    margin-bottom: 20px;
}

/* --- 4. INPUT FIELD STYLES (text, email, textarea) --- */
.rlb-cf7-input {
    display: block; /* Make input take up full width of its container */
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 1em;
    line-height: 1.5;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Focus state for a nicer user experience */
.rlb-cf7-input:focus {
    border-color: #0073aa; /* WordPress default primary color or your brand color */
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.2);
    outline: none; /* Remove default focus border */
}

/* Style for the Textarea */
textarea.rlb-cf7-input {
    resize: vertical;
    min-height: 120px;
}

/* --- 5. SUBMIT BUTTON STYLES --- */
.rlb-cf7-submit {
    /* Use the !important flag only if your theme is overriding the button styles */
    background-color: #1a7f5a; /* A nice bookshop green/blue */
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto; /* Allow the button to size based on text */
}

.rlb-cf7-submit:hover {
    background-color: #156649; /* Darker green on hover */
}


/* Filled stars */
span.rating::before,
.star-rating span:before, 
.star-rating::before {
    color: #d27d00 !important; /* Your desired color */
}

/* Empty stars */
.star-rating 
.star-rating-filled {
    color: #d27d00 !important;
}


/* Change color for selected stars */
.stars button.is-selected svg path {
  stroke: #d27d00;
  fill: #d27d00;
}
.stars button.is-hovered svg path {
  stroke: #d27d00;
  fill: #d27d00;
}

/* Change color for stars on hover */
.stars button:hover svg path {
  stroke: #d27d00;
  fill: #d27d00;
}

.stars button svg path {
  stroke: black; 
}

/* 1. Define the 'lifting' animation */
@keyframes lift-header {
  from {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  to {
    /* The deepening shadow you wanted */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  }
}

/* 2. Apply it to your sticky header */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 9999;
  
  /* Link the animation to the scroll progress */
  animation: lift-header linear both;
  animation-timeline: scroll();
  
  /* Define the range: animation starts at 0px and finishes after 150px of scroll */
  animation-range: 0px 150px;
}


/* Full Page Bibliotherapy Container */
.rlb-full-page-wrapper {
    background-color: #f5f5f5; /* Light grey background */
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.rlb-form-container {
    background: #ffffff;
    max-width: 800px;
    width: 100%;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: 'Roboto', sans-serif;
}

/* Typography from the PDF [cite: 1, 2, 3, 4] */
.rlb-form-container h2 {
    color: #d32f2f; /* Red Lion Red */
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.rlb-form-container h3 {
    margin-top: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #333;
}

/* Material Design Input Fields */
.rlb-row {
    margin-bottom: 25px;
}

.rlb-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.rlb-form-container input[type="text"],
.rlb-form-container input[type="email"],
.rlb-form-container select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.rlb-form-container input:focus {
    border-color: #d32f2f;
    outline: none;
    background: #fff;
}

/* Grid for Emotions  */
.emotions-grid .wpcf7-checkbox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.wpcf7-list-item {
    margin: 0;
    display: block;
}

/* Submit Button */
.wpcf7-submit {
    background-color: #d32f2f;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.wpcf7-submit:hover {
    background-color: #b71c1c;
}

@media (max-width: 600px) {
    .rlb-form-container { padding: 20px; }
}