/*
Theme Name:     Making Sense of Cents
Theme URI:      n/a
Template:       kadence
Author:         Katy Boykin
Author URI:     https://katyboykin.com
Description:    A child theme for Making Sense of Cents - by Katy Boykin
Version:        1.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/

/* Header */

/* Search */

body.footer-on-bottom[class*="showing-popup-drawer-"] {
  overflow: auto;
}

#search-drawer.popup-drawer,
#search-drawer.popup-drawer .drawer-overlay {
  bottom: auto;
}

#search-drawer.popup-drawer .drawer-header .drawer-toggle {
  padding: 0.7em 0.15em;
}

#search-drawer .drawer-inner {
  flex-direction: row-reverse;
  flex-wrap: wrap;
}

body #search-drawer .drawer-inner .drawer-content {
  width: calc(100vw - 100px);
  padding: 0 0 0 1.5rem;
}

#search-drawer .drawer-inner .drawer-header {
  width: 100px;
  min-height: 0;
  padding: 0 2.2em;
}

#search-drawer.popup-drawer .drawer-inner {
  bottom: auto;
  height: 60px;
}

body #search-drawer .drawer-inner form {
  max-width: 400px;
  margin: 0 0 0 auto;
}

body #search-drawer .drawer-inner input.search-field {
  padding: 0.4em 80px 0.4em 0.8em;
  font-size: 17px;
  border: 1px solid var(--global-palette8);
  border-radius: 0;
}

body #search-drawer .drawer-inner input.search-field:focus {
  box-shadow: none;
}

/* Footer */

.kb-footer-menu li.wp-block-navigation-item:hover a {
  color: var(--global-palette-btn-bg-hover);
}

/* Inputs */

.kb-form input::placeholder {
  color: var(--global-palette4);
  opacity: 0.7;
}

/* Heading styles */

:is(h1, h2, h3, h4, h5, h6):is(.kb-text-line, .kb-text-line-center) {
  overflow: hidden;
}

:is(h1, h2, h3, h4, h5, h6):is(.kb-text-line, .kb-text-line-center):after {
  content: "";
  display: inline-block;
  height: 0.5em;
  vertical-align: middle;
  width: 100%;
  margin-right: -100%;
  margin-left: 15px;
  border-top: 2px solid var(--global-palette2);
  margin-top: 0.9em;
}

:is(h1, h2, h3, h4, h5, h6):is(.kb-text-line.light, .kb-text-line-center.light):after,
:is(h1, h2, h3, h4, h5, h6).kb-text-line-center.light:before {
  border-top: 2px solid var(--global-palette9);
}

:is(h1, h2, h3, h4, h5, h6).kb-text-line-center:before {
  content: "";
  display: inline-block;
  height: 0.5em;
  vertical-align: middle;
  width: 100%;
  margin-left: -100%;
  margin-right: 15px;
  border-top: 2px solid var(--global-palette2);
  margin-top: 0.4em;
}
@media all and (max-width: 600px) {
  :is(h1, h2).kb-text-line-center:before,
  :is(h1, h2).kb-text-line-center:after {
    display: none;
  }
}

:is(h1, h2, h3, h4, h5, h6).kb-text-line-center:after {
  margin-top: 0.4em;
}

/* Heading Icons */

.kb-icon-text .kb-svg-icon-wrap {
  background: var(--global-palette2);
  border-radius: 50%;
  padding: 0.3em;
}

.kb-icon-text.light .kb-svg-icon-wrap {
  background: var(--global-palette9);
}

/* Custom highlights */

.kb-custom-highlight .kt-highlight:nth-child(3n + 1) {
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 10%,
    var(--global-palette5) 10%,
    var(--global-palette5) 40%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 100%
  );
}

.kb-custom-highlight .kt-highlight:nth-child(3n + 2) {
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 10%,
    var(--global-palette6) 10%,
    var(--global-palette6) 40%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 100%
  );
}

.kb-custom-highlight .kt-highlight:nth-child(3n + 3) {
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 10%,
    var(--global-palette7) 10%,
    var(--global-palette7) 40%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Info box icons */

@media all and (max-width: 767px) {
.kb-info-icons .wp-block-kadence-infobox .kt-blocks-info-box-media .kt-info-box-image {
  width: 75px;
  margin: 0 auto;
  }
	
.kb-info-icons .wp-block-kadence-infobox .kt-blocks-info-box-media-container {
  margin-bottom: 10px;
  }
.kb-info-icons .wp-block-kadence-infobox .kt-blocks-info-box-link-wrap {
  padding: var(--global-xs-spacing);
 }
}

/* Logo gallery */

.kb-logo-gallery .kb-gallery-ul {
  justify-content: center;
}

/* Home */

.kb-posts-latest-section .kt-inside-inner-col {
  display: flex;
  flex-direction: column;
}

@media all and (min-width: 600px) {
  :is(.kb-latest-post, .kb-editor-faves),
  :is(.kb-latest-post, .kb-editor-faves)
    :is(.kt-blocks-post-grid-item, .kt-blocks-post-grid-item-inner-wrap, .kadence-post-image, .kadence-post-image-intrisic, .kt-post-grid-wrap) {
    height: 100%;
    position: relative;
  }
}

.kb-latest-post-list
  :is(.kt-blocks-post-grid-item-inner-wrap, .kadence-post-image, .kadence-post-image-intrisic) {
  height: 100%;
}

:is(.kb-latest-post, .kb-editor-faves, .kb-silo-large)
  .kt-blocks-post-readmore-wrap {
  text-align: right;
}

.kb-latest-post-list .kt-blocks-post-grid-item-inner {
  display: flex;
  align-items: center;
}

.kb-latest-post-list.kt-blocks-post-grid-item-inner-wrap {
  align-items: center;
}

@media all and (min-width: 992px) and (max-width: 1024px) {
  .kb-latest-post-list .kt-post-grid-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

@media all and (min-width: 680px) and (max-width: 1024px) {
  .kb-latest-post-list.wp-block-kadence-postgrid
    .kt-post-grid-wrap
    .kt-blocks-post-grid-item-inner-wrap {
    grid-template-columns: 1fr 3fr;
  }
}

/* Latest Ribbon */

.kb-ribbon {
  overflow: hidden;
  position: absolute;
  height: 150px;
  width: 150px;
  z-index: 5;
  top: -10px;
  left: -10px;
  pointer-events: none;
}

.kb-ribbon::before,
.kb-ribbon::after {
  position: absolute;
  z-index: -1;
  content: "";
  display: block;
  border: 5px solid var(--global-palette1);
  border-top-color: transparent;
  border-left-color: transparent;
}

.kb-ribbon::before {
  top: 0;
  left: 134px;
}
.kb-ribbon::after {
  top: 134px;
  left: 0;
}

.kb-ribbon-text {
  position: absolute;
  display: block;
  width: 225px;
  padding: 15px 0;
  right: -25px;
  top: 30px;
  transform: rotate(-45deg);
}

@media all and (max-width: 1024px) {
  .kb-ribbon::before {
    top: 0;
    left: 131px;
  }
  .kb-ribbon::after {
    top: 131px;
    left: 0;
  }
}

@media all and (max-width: 767px) {
  .kb-ribbon::before {
    top: 0;
    left: 129px;
  }
  .kb-ribbon::after {
    top: 129px;
    left: 0;
  }
}

/* Hover Shake */

.kb-get-started
  .wp-block-kadence-infobox:hover
  .kt-blocks-info-box-media-container,
.kb-aff-link:hover img {
  animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

@media all and (min-width: 768px) {
  .kb-aff-link .wp-block-kadence-column {
    height: 100%;
  }
}

.kb-aff-link .kt-inside-inner-col {
  flex: 1;
}

.kb-aff-link h3.wp-block-kadence-advancedheading {
  transition: color 0.2s ease;
}

.kb-aff-link:hover h3.wp-block-kadence-advancedheading {
  color: var(--global-palette2);
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Editor Faves */

.kb-editor-faves .kt-blocks-post-grid-item-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Must Reads */

.kb-must-reads .kt-blocks-post-grid-item-inner-wrap {
  align-items: center;
}

.kb-must-reads
  :is(.kt-blocks-post-grid-item-inner-wrap, .kadence-post-image, .kadence-post-image-intrisic) {
  height: 100%;
}

/* Custom Subscribe & Optin */

:is(.kb-custom-subscribe, .kb-custom-email-course-optin) .formkit-form {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin)
  .formkit-form
  [data-style="minimal"] {
  padding: 0 !important;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin) .formkit-header {
  display: none;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin) p {
  color: var(--global-palette4) !important;
}

.kb-custom-subscribe .formkit-subheader {
  font-size: inherit !important;
}

.kb-custom-subscribe .formkit-guarantee > p strong {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: var(--global-kb-font-size-md);
}

.kb-custom-subscribe .formkit-guarantee > p {
  line-height: 1.4em !important;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin, .kb-custom-freebie)
  .formkit-input {
  border-radius: 0 !important;
  border-color: var(--global-palette6) !important;
}

.kb-custom-subscribe.sidebar .seva-form.formkit-form * {
  text-align: center;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin, .kb-custom-freebie)
  .formkit-submit {
  background: var(--global-palette-btn-bg) !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin, .kb-custom-freebie)
  .formkit-submit:hover {
  background: var(--global-palette-btn-bg-hover) !important;
}

:is(.kb-custom-subscribe, .kb-custom-email-course-optin, .kb-custom-freebie)
  .formkit-submit
  span,
:is(.kb-custom-subscribe, .kb-custom-email-course-optin, .kb-custom-freebie)
  .formkit-submit:hover
  span {
  background: transparent !important;
}

.kb-custom-freebie .formkit-background {
  display: none;
}

.kb-custom-freebie .seva-form.formkit-form {
  box-shadow: none;
}

#inner-wrap .formkit-submit {
  text-align: center !important;
}

.kb-custom-freebie h1,
.kb-custom-freebie .formkit-powered-by {
  display: none !important;
}

#wrapper .kb-custom-freebie .formkit-column {
  padding: 0;
}

.kb-custom-freebie .seva-fields.formkit-fields {
  display: flex;
  gap: 10px;
}

#wrapper .kb-custom-freebie .formkit-submit {
  margin: 0;
  flex: 0 0 235px;
}

#wrapper .kb-custom-freebie .formkit-field:nth-of-type(1) {
  display: none;
}

#wrapper .kb-custom-freebie .formkit-field {
  flex: 1 1 auto;
  margin: 0;
}

#wrapper .formkit-field {
  min-width: auto;
}

#wrapper .kb-custom-freebie .formkit-field input {
  border: 1px solid var(--global-palette7);
  padding: 12px;
  color: var(--global-palette3);
}

#wrapper .kb-custom-freebie .formkit-field input::placeholder {
  color: var(--global-palette3);
}

#wrapper .kb-custom-freebie .formkit-disclaimer {
  margin-top: 20px;
  color: var(--global-palette3) !important;
}

@media all and (max-width: 1024px) {
  .kb-custom-freebie .seva-fields.formkit-fields {
    flex-direction: column;
  }
  #wrapper .kb-custom-freebie .formkit-submit {
    flex: 1 1 auto;
  }
}

@media all and (max-width: 767px) {
  .kb-custom-subscribe .seva-form.formkit-form * {
    text-align: center;
  }
  .kb-custom-freebie .kt-inside-inner-col * {
    text-align: center;
  }
  .kb-custom-freebie .seva-fields.formkit-fields {
    flex-direction: column;
  }
  #wrapper .kb-custom-freebie .formkit-submit {
    flex: 100%;
  }
}

/* Archives */
.search .grid-cols,
.archive .grid-cols {
  grid-gap: 1em;
}

@media all and (min-width: 768px) and (max-width: 1024px) {
  .search .grid-cols,
  .archive .grid-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.custom-archive-loop-item .wp-block-kadence-column {
  height: 100%;
}

.custom-archive-loop-item .kt-inside-inner-col {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Pagination */

.kt-blocks-page-nav .nav-links > a,
.navigation.pagination .page-numbers {
  border: none;
  border-radius: 0;
  background: var(--global-palette-btn-bg);
  color: var(--global-palette-btn);
  min-width: 40px;
  min-height: 40px;
  padding: 4px;
}

.kt-blocks-page-nav .nav-links > a:hover,
.navigation.pagination .page-numbers:hover {
  background: var(--global-palette-btn-bg-hover);
  color: var(--global-palette-btn-hover);
}

.kt-blocks-page-nav .nav-links > .current,
.navigation.pagination .page-numbers.current {
  background: var(--global-palette-btn-bg-hover);
  border: none;
  border-radius: 0;
  min-width: 40px;
  min-height: 40px;
  padding: 4px;
}

.navigation.pagination .nav-links {
  text-align: center;
}

.navigation.pagination .page-numbers {
  font-size: 14px;
  font-weight: 700;
}

.navigation.pagination .current {
  border-radius: 0;
}

/* Single Posts */

.single-post :is(h2, h3) {
  margin-bottom: 1.5em;
}

.single-post .wp-element-caption {
  color: var(--global-palette4);
  margin-top: -10px;
  margin-bottom: 1.5em;
}

.single-post #main .entry-content a {
  text-decoration: underline;
}

.single-post .content-wrap img:not(first-of-type) {
  margin-bottom: 20px;
}

.kb-single-post-excerpt {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Comments */

.kb-comments .wp-block-comment-template {
	margin-left: 0;
}

.kb-comments .wp-block-comment-template li {
  background: var(--global-palette8);
  padding: var(--global-md-spacing);
  margin-bottom: var(--global-md-spacing);
}

.kb-comments .wp-block-comment-template li ol li {
  background: var(--global-palette9);
  margin-top:  var(--global-md-spacing);
}

.kb-comments .wp-block-comment-template li > .wp-block-columns {
  margin-bottom: 0;
}
.kb-comments .comment-reply-link {
  color: var(--global-palette-btn);
  background: var(--global-palette-btn-bg);
  border: none;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  padding: .5em 1em;
  font-size: 85%;
  text-decoration: none;
}

.kb-comments .comment-reply-link:hover {
  color: var(--global-palette-btn-hover);
  background: var(--global-palette-btn-bg-hover);
}

#commentform :is(input, textarea) {
  border-color: var(--global-palette6);
  border-radius: 0;
}
#commentform :is(input, textarea)::placeholder {
  color: var(--global-palette4);
  opacity: .5;
}

#commentform .float-label {
  display: none !important;
}

#commentform p.comment-form-cookies-consent {
  align-items: flex-start;
}

.kb-comments .comment-form .comment-notes {
  margin-top: 1em;
}

@media all and (max-width: 767px) {
.kb-comments .wp-block-comment-template ol {
  padding-left: 0;
  margin-left: 0;
}

.kb-comments .wp-block-comment-template li {
  padding: var(--global-xs-spacing);
}
}

/* Social Share */
.kb-social-share-bottom .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-label {
  letter-spacing: 0;
  font-size: 12px;
}

/* Related Posts */

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1em;
}

.related-post {
  background: var(--global-palette9);
}

.related-posts-grid .thumbnail-container {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
}

.related-posts-grid .related-post .related-posts-title {
  margin-top: 0;
  padding: 0.6em 1em 1em;
  font-size: var(--global-kb-font-size-lg);
}

@media all and (max-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media all and (max-width: 600px) {
  .related-posts-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Silos */
.kb-post-list .kt-blocks-post-grid-item-inner {
  display: flex;
  justify-content: space-between;
}

.kb-post-list .kt-blocks-post-grid-item-inner header {
  flex: 1 1 auto;
}

@media all and (min-width: 768px) {
  .kb-post-list .kt-blocks-post-grid-item:nth-of-type(19),
  .kb-post-list .kt-blocks-post-grid-item:nth-of-type(20) {
    border: none;
  }
  .kb-post-list.six .kt-blocks-post-grid-item:nth-of-type(11),
  .kb-post-list.six .kt-blocks-post-grid-item:nth-of-type(12) {
    border: none;
  }
}

@media all and (max-width: 767px) {
  .kb-post-list .kt-blocks-post-grid-item:nth-of-type(20) {
    border: none;
  }
  .kb-post-list.six .kt-blocks-post-grid-item:nth-of-type(12) {
    border: none;
  }
}

/* 404 Search */

.kb-search-box.wp-block-search .wp-block-search__inside-wrapper {
  padding: 0;
}

.kb-search-box.wp-block-search button {
  padding: v.7em;
}

.kb-search-box.wp-block-search button svg {
  transform: scaleX(-1);
}

.kb-search-box.wp-block-search input[type="search"] {
  padding: 0.4em 1em;
}

.kb-search-box.wp-block-search .wp-block-search__inside-wrapper,
.kb-search-box.wp-block-search input[type="search"] {
  border: none;
  border-radius: 0;
}

.kb-search-box.wp-block-search input[type="search"]:focus,
.kb-search-box.wp-block-search button:hover {
  box-shadow: none;
}
