/*!
Theme Name: Nelson Books Theme
Theme URI: https://www.citydockdigital.com
Template: kadence
Author: City Dock Digital
Author URI: https://www.citydockdigital.com/
Description: A custom theme developed for Nelson Books dependent on the Kadence parent theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

.bring-front {position: relative; z-index:1;}
ul.fl-loop-grid {margin:0;}

@media screen and (min-width: 768px) {
.cd-sticky {position: sticky; top: 150px;}
}
.site-header-item-main-navigation .nav--toggle-sub .dropdown-nav-toggle {right:auto; margin: 0 0 0 10px;}

.custom-logo {opacity: 1;
transition: all 1s;}
.custom-logo.scrolled {opacity: 0;}

.custom-logo.kadence-sticky-logo {opacity: 0;
transition: all .5s;}
.custom-logo.kadence-sticky-logo.scrolled {opacity: 1;}

.footer-logo {padding-bottom: 25px;}

/* Zoom in on photo hover */
.hover-zoom-in .fl-photo-content {
  overflow: hidden;
}
.hover-zoom-in .fl-photo-content .fl-photo-img {
  -webkit-transition: 0.3s ease-in-out;
  transition: 0.3s ease-in-out;
  will-change: transform;
}
.hover-zoom-in .fl-photo-content .fl-photo-img:hover {
  -webkit-transition: 0.3s ease-in-out;
  transition: 0.3s ease-in-out;
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

/* heading see more */
/*.heading-see-more a.fl-button {display: inline-block; background: url('images/ArrowThinRight.svg') no-repeat 60px center; 
  transition: background-position 0.3s ease;}
.heading-see-more a.fl-button:hover {background-position: 67px center;}*/

.heading-see-more a.fl-button {
  display: inline-block;
  position: relative;
  padding-right: 35px !important;
}

.heading-see-more a.fl-button::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  width: 32px;
  height: 32px;
  background: url('images/ArrowThinRight.svg') no-repeat center / contain;
  /*transition: transform 0.3s ease;*/
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.heading-see-more a.fl-button:hover::after {
  transform: translateY(-50%) translateX(7px);
}

/* Single Author + Single Book
-------------------------------------------------------------- */

.photo-credit {
	color: var(--global-palette5);
}
.heading-small {
	font-size: 14px;
	font-weight: bold;
	margin-bottom: 1em;
}
ul.pill-list {
	margin-left: -5px
}
ul.pill-list li {
	display: inline-block; 
	padding: 0 15px;	
	border-radius: 25px;
	margin: 8px 5px;
	font-size: 14px;
}
ul.pill-list li a {text-decoration: none;}
ul.pill-list li:hover {
	background: var(--global-palette1);
}
ul.pill-list li:hover a {
	color: #fff;
}
/* light */
ul.pill-list-light li {background: #e9e8e4;}
ul.pill-list-light li a{color: var(--global-palette3);}
ul.pill-list-light li a {color: var(--global-palette3);}

/* dark */
ul.pill-list-dark li {background: var(--global-palette3);}
ul.pill-list-dark li a {color: var(--global-palette7);}

.fl-theme-builder-singular-single-author #inner-wrap, 
.fl-theme-builder-singular-single-book #inner-wrap, 
.fl-theme-builder-archive #inner-wrap {background: var(--global-palette9);}

.about-the-author-excerpt {height: 150px; 
-webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  height:  150px;}

/* Accordion
-------------------------------------------------------------- */
button.accordion h2 {
	text-transform: uppercase;
	font-size: 1.2em;
	/* color: var(--global-palette5); */
    color: rgba(80,79,76,.75);
    letter-spacing: 1px;
}
button.accordion, button.accordion:visited, button.accordion:hover, button.accordion:focus, button.accordion:active {
    background: none; padding: 25px 0; margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid #d9d7d1}
button.accordion {
    cursor: pointer;
    width: 100%;
    text-align: left;
    outline: none;
    transition: 0.4s;
    position: relative;
  }
  .accordion.active, .accordion:hover {

  }
  .panel {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  /* Positions the plus sign 5px from the right. Centers it using the transform property. */
  .accordion h2::before {
    content: '+';
    color: #7f7e7c;
    position: absolute;
    top: 50%;
    right: -5px;
    font-size: 30px;
    transform: translateY(-50%);
  }

  /* Changes from plus sign to negative sign once active */
  
  .accordion.active h2::before {
    content: '-';
    font-size: 30px;
  }

/* Bestseller Badges
-------------------------------------------------------------- */
.book-cover-grid-item {position: relative;}
.book-cover-grid-item .bestseller::before {
	content: "Bestseller";
	position: absolute;
	top: 5px;
	right: 5px;
	font-size: 0.8rem;
	letter-spacing: 0.05rem;
	color: #fff;
	text-transform: uppercase;
	background-color: var(--global-palette-highlight);
	padding: 4px 15px;
	border-radius: 100px;
}

/* Home page scrolling book covers
-------------------------------------------------------------- */

/*Scroll Grid - PP Posts */
	.scroll-grid .pp-content-post-grid {
		grid-template-columns:none;
		grid-auto-flow: column;
		grid-auto-columns: 220px;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
	}
	.scroll-grid .pp-content-post-grid > div {
		scroll-snap-align: start;
	}
@media (max-width: 1024px) {	
	.scroll-grid-mobile .pp-content-post-grid {
		grid-template-columns:none;
		grid-auto-flow: column;
		grid-auto-columns: 200px;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
	}
	.scroll-grid-mobile .pp-content-post-grid > div {
		scroll-snap-align: start;
	}
}

/*Scroll Grid - Loop */
.scroll-loop .fl-loop-grid {
	grid-template-columns:none !important;
		grid-auto-flow: column;
		grid-auto-columns: 220px;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
	justify-content: left;
}
.scroll-loop .fl-loop-grid > li {scroll-snap-align: start;} 

@media (max-width: 1024px) {	
	.scroll-loop-mobile fl-loop-grid {
	grid-template-columns:none !important;
		grid-auto-flow: column;
		grid-auto-columns: 220px;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
	justify-content: left;
}
	.scroll-loop-mobile .fl-loop-grid > li {scroll-snap-align: start;} 
}

/* Books by this Author - Grid
-------------------------------------------------------------- */
.book-posts .fl-post-grid ul { display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 25px;
}
.book-posts .fl-post-grid ul h3 {line-height:1.3;}
.book-posts .fl-post-grid ul .fl-post-column {  
	flex: 0 1 140px;   
  max-width: 140px;
  width: 140px;
  box-sizing: border-box;
	padding: 0;
}
@media (min-width: 769px) {
.book-posts .fl-post-grid ul .fl-post-column {  
	flex: 0 1 200px;   
  max-width: 200px;
  width: 200px;
}
}

/* Buy Now Drop Down
-------------------------------------------------------------- */

/* 1. Container */
.buy-dropdown {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

/* 2. Toggle button */
.buy-dropdown__toggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 1em;
  background: #333;
  color: #fff;
  border-radius: 2em;
  font-size: 1rem;
  cursor: pointer;
}

/* 3. Dropdown menu (hidden by default) */
.buy-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  /* margin-top: 0.25em; */
  padding: 0.5em 0;
  list-style: none;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 0.5em;
  min-width: 200px;
  max-height: 15em;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

/* 4. Show on desktop hover */
@media (hover: hover) and (pointer: fine) {
  .buy-dropdown:hover .buy-dropdown__menu {
    display: block;
  }
}

/* 5. Show when toggled via JS */
.buy-dropdown__menu.show {
  display: block;
}

/* 6. Menu items reset */
.buy-dropdown__menu li {
  margin: 0;
}

/* 7. Links styles */
.buy-dropdown__menu li a {
  display: block;
  padding: 0.5em 1em;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

/* 8. Hover, focus & keyboard “current” state */
.buy-dropdown__menu li a:hover,
.buy-dropdown__menu li a:focus,
.buy-dropdown__menu li a.current {
  background: #e6e6e6;
  outline: none;
}