/*
 Theme Name:   Daily Insights
 Theme URI:    https://generatepress.com
 Description:  dailyinsights Theme
 Author:       Yasir
 Author URI:   https://dailyinsights.info
 Template:     generatepress
 Version:      0.1
*/

/*
Theme Name:  generatepress (Child)
Template: generatepress
*/

/*** 1) SEARCH TWEAKS ***/

/* Clears the 'X' from Chrome search inputs */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  filter: grayscale(100) opacity(0.3);
  cursor: pointer;
}

/* Search Block */
.wp-block-search {
  border-radius: 4px;
  overflow: hidden;
  outline: 1px solid var(--surface-30);
  box-shadow: 0px 0px 0px #00000010;
  transition: all 250ms ease-in;
}

.wp-block-search:focus-within {
  outline: 1px solid var(--surface-30);
  box-shadow: 0px 4px 10px #00000010;
}

.wp-block-search input {
  border: none;
  padding: 0px 1em;
  border-radius: 4px;
}

/* Search title styling */
.search-title {
  font-size: var(--fs-body);
  text-transform: capitalize;
  margin-left: 0.4em;
  line-height: 1.4;
}

/*** 2) NAVIGATION ***/

/* Hamburger Menu */
.mobile-menu-control-wrapper .menu-toggle,
.mobile-menu-control-wrapper .menu-toggle:hover,
.mobile-menu-control-wrapper .menu-toggle:focus,
.has-inline-mobile-toggle #site-navigation.toggled {
  background-color: transparent;
  margin-right: -1rem;
  font-size: 1em;
  line-height: 8px;
}

/* CTA menu item spacing on mobile */
@media (max-width: 1024px) {
  .main-navigation .main-nav ul li.nav-cta a {
    margin-left: 0px;
  }
}

/* Primary Menu Button Styles (Desktop) */
@media (min-width: 1025px) {
  .main-navigation .main-nav ul li.nav-cta a {
    background: var(--contrast) !important;
    color: var(--surface-10) !important;
    padding: 1em 1.5em;
    margin-left: 16px;
    border-radius: 4px;
    line-height: 1;
    font-weight: 600;
  }

  .main-navigation .main-nav ul li.nav-cta a:hover {
    background: var(--contrast-alt) !important;
    color: var(--surface-0) !important;
  }
}

/*** 3) BACKEND / EDITOR WIDTH ***/

/* Post editor width + post title width */
body .editor-styles-wrapper .post-type-post .block-editor-block-list__layout,
body .editor-styles-wrapper .post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title {
  max-width: 768px !important;
  margin-inline: auto !important;
}

/* Password protected pages */
.post-password-form {
  max-width: 768px;
  padding: 8rem 0px;
  margin-inline: auto;
  text-align: center;
}

/*** 4) UTILITIES ***/

/* Visually Hidden */
.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Line Limits */
.line-limit-3,
.line-limit-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-limit-3 {
  -webkit-line-clamp: 3;
}

.line-limit-2 {
  -webkit-line-clamp: 2;
}

/* No Underline */
.no-ul,
.no-ul a {
  text-decoration: none;
}


/*** 5) SPACING FIXES ***/

/* Remove bottom margin on last paragraph */
.gb-container p:last-child:last-of-type {
  margin-bottom: 0px;
}

/* Block editor: prevent extra margin on second-last paragraph */
.block-editor-block-list__layout .gb-container p:nth-last-child(2) {
  margin-bottom: 0px;
}

/*** 6) SECTIONS ***/

.gb-container-section-xs {
  padding: 1rem clamp(1rem, 0.848rem + 0.758vw, 1.5rem) 1rem
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

.gb-container-section-s {
  padding: clamp(1.5rem, 1.5rem + 0vw, 1.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem)
    clamp(1.5rem, 1.5rem + 0vw, 1.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

.gb-container-section-m {
  padding: clamp(1.5rem, 1.197rem + 1.515vw, 2.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem)
    clamp(1.5rem, 1.197rem + 1.515vw, 2.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

.gb-container-section-d {
  padding: clamp(3rem, 2.394rem + 3.03vw, 5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem)
    clamp(3rem, 2.394rem + 3.03vw, 5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

.gb-container-section-l {
  padding: clamp(4.5rem, 3.591rem + 4.545vw, 7.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem)
    clamp(4.5rem, 3.591rem + 4.545vw, 7.5rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

.gb-container-section-xl {
  padding: clamp(6rem, 4.788rem + 6.061vw, 10rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem)
    clamp(6rem, 4.788rem + 6.061vw, 10rem)
    clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

/*** 7) CONTAINER WIDTHS ***/

:root {
  --width-m: 64rem;
  --width-s: 43rem;
  --width-xs: 40rem;
}

.Right-Grid > div:not(:last-child){
  border-bottom: 2px solid var(--contrast-5);
	padding-bottom: 10px;
}
.Right-Grid > div:not(:first-child){ padding-top: 15px;}

/* Make left media fill the column height (removes empty space under image) */
.card-media{
  height:100%;
  align-self:stretch;
}

.card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.simpletoc ul {list-style-type: none; margin-left: 0;}
.simpletoc li {margin-top: 10px;}

/* More specific: include block class and descendant chain */
div.wp-block-simpletoc.simpletoc .simpletoc-list a,
div.wp-block-simpletoc.simpletoc .simpletoc-list a:visited {
  color: #111111 !important;
}

