/*
 Theme Name:   GPTX Child
 Template:     generatepress
 Author: Tiziano Fogliata
 Version:      0.1
*/

/* SPACING */

/* @link https://utopia.fyi/space/calculator?c=360,16,1.2,1280,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,&g=s,l,xl,12 */

:root {
  --space-3xs: clamp(0.25rem, 0.2255rem + 0.1087vw, 0.3125rem);
  --space-2xs: clamp(0.5rem, 0.4511rem + 0.2174vw, 0.625rem);
  --space-xs: clamp(0.75rem, 0.6766rem + 0.3261vw, 0.9375rem);
  --space-s: clamp(1rem, 0.9022rem + 0.4348vw, 1.25rem);
  --space-m: clamp(1.5rem, 1.3533rem + 0.6522vw, 1.875rem);
  --space-l: clamp(2rem, 1.8043rem + 0.8696vw, 2.5rem);
  --space-xl: clamp(3rem, 2.7065rem + 1.3043vw, 3.75rem);
  --space-2xl: clamp(4rem, 3.6087rem + 1.7391vw, 5rem);
  --space-3xl: clamp(6rem, 5.413rem + 2.6087vw, 7.5rem);

  /* One-up pairs */
  --space-3xs-2xs: clamp(0.25rem, 0.1033rem + 0.6522vw, 0.625rem);
  --space-2xs-xs: clamp(0.5rem, 0.3288rem + 0.7609vw, 0.9375rem);
  --space-xs-s: clamp(0.75rem, 0.5543rem + 0.8696vw, 1.25rem);
  --space-s-m: clamp(1rem, 0.6576rem + 1.5217vw, 1.875rem);
  --space-m-l: clamp(1.5rem, 1.1087rem + 1.7391vw, 2.5rem);
  --space-l-xl: clamp(2rem, 1.3152rem + 3.0435vw, 3.75rem);
  --space-xl-2xl: clamp(3rem, 2.2174rem + 3.4783vw, 5rem);
  --space-2xl-3xl: clamp(4rem, 2.6304rem + 6.087vw, 7.5rem);
}

/* Body background color (extra site wrapper globale) */
body {
  background-color: var(--base-light);
}

/* Site Wrapper Globale */
.site-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  background-color: var(--base-light);
}

/* Altezza minima contenuto principale */
#main {
  min-height: 65vh;
}

/* Container Padding Overrides */

.site-content,
#content {
  padding: 0px;
}

/* Post Editor Width (BACKEND) */
.post-type-post .block-editor-block-list__layout {
  max-width: 728px !important;
  margin-inline: auto !important;
  padding-inline: 200px !important;
}

.post-type-post
  .edit-post-visual-editor__post-title-wrapper
  .editor-post-title {
  max-width: 728px !important;
  margin-inline: auto !important;
  padding-inline: 200px !important;
}

/* -- Modifiche aspetto funzione di ricerca -- */

/* Clears the ‘X’ from Chrome */
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;
  outline: none;
}

.wp-block-search button {
  background: var(--surface-20);
  color: var(--surface-70);
  padding: 10px 12px;
  border-left: 1px solid var(--surface-30);
}

.wp-block-search button:hover {
  background: var(--surface-30);
  color: var(--surface-80);
}

/* Search in Navigation */
/* #site-navigation .menu-bar-item a {
  padding-right: 0;
} */

/* Modal */
.search-modal-fields button {
  background: var(--surface-20) !important;
  color: var(--surface-70) !important;
  line-height: 1;
  font-weight: 600;
  border-left: 1px solid var(--surface-30);
  padding: 10px 12px;
}

.search-modal-fields button:hover {
  background: var(--surface-30) !important;
  color: var(--surface-90) !important;
}

.search-modal-fields input {
  background-color: white !important;
  border-radius: 4px;
  border: none;
  padding: 0px 1em;
  outline: none;
}

.search-modal-form {
  color: var(--surface-80);
}

.search-modal-fields {
  border-radius: 4px;
  overflow: hidden;
  outline: 1px solid var(--surface-30);
  box-shadow: 0px 0px 0px #00000010;
  transition: all 250ms ease-in;
  background-color: var(--surface-0);
}

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

.gp-search-modal .gp-modal__overlay {
  background-color: #1f293399;
}

/* Search Results / No Search Results template */
.search-title-wrapper {
  display: flex;
  align-items: flex-start;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--surface-30);
}

.search-for {
  line-height: 1.4;
}

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

/* 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;
} */

/* Primary Menu Button Styles */
@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;
  }
}

@media (max-width: 1024px) {
  .main-navigation .main-nav ul li.nav-cta a {
    margin-left: 0px;
  }
}

/* Post Editor Width & Title */
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;
}

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

/*** TIPOGRAFIA ***/

:is(h1, h2, h3, h4, h5, h6),
.balance {
  text-wrap: balance;
}

p,
div,
blockquote,
li {
  text-wrap: pretty;
}

/* For browsers that support clamp  */
@supports (font-size: clamp(1rem, 1vi, 1rem)) {
  :root {
    --fs-xs: clamp(0.69rem, 0.12vi + 0.66rem, 0.76rem);
    --fs-sm: clamp(0.83rem, 0.21vi + 0.78rem, 0.95rem);
    --fs-base: clamp(1rem, 0.34vi + 0.91rem, 1.19rem);
    --fs-md: clamp(1.2rem, 0.52vi + 1.07rem, 1.48rem);
    --fs-lg: clamp(1.44rem, 0.76vi + 1.25rem, 1.86rem);
    --fs-xl: clamp(1.73rem, 1.08vi + 1.46rem, 2.32rem);
    --fs-xxl: clamp(2.07rem, 1.5vi + 1.7rem, 2.9rem);
    --fs-xxxl: clamp(2.49rem, 2.06vi + 1.97rem, 3.62rem);
    --fs-xxxxl: clamp(2.99rem, 2.81vi + 2.28rem, 4.53rem);
  }
}
/* For browsers that don't support clamp */
@supports not (font-size: clamp(1rem, 1vi, 1rem)) {
  :root {
    --fs-xs: 0.69rem;
    --fs-sm: 0.83rem;
    --fs-base: 1rem;
    --fs-md: 1.2rem;
    --fs-lg: 1.44rem;
    --fs-xl: 1.73rem;
    --fs-xxl: 2.07rem;
    --fs-xxxl: 2.49rem;
    --fs-xxxxl: 2.99rem;
  }
  @media screen and (min-width: 1280px) {
    :root {
      --fs-xs: 0.76rem;
      --fs-sm: 0.95rem;
      --fs-base: 1.19rem;
      --fs-md: 1.48rem;
      --fs-lg: 1.86rem;
      --fs-xl: 2.32rem;
      --fs-xxl: 2.9rem;
      --fs-xxxl: 3.62rem;
      --fs-xxxxl: 4.53rem;
    }
  }
}

.ff-body {
  font-family: var(--gp-font--body);
}

.ff-heading {
  font-family: var(--gp-font--body);
}

/* Default Body / p font settings */
body {
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.5;
}

p:last-child:last-of-type {
  margin-bottom: 0px;
}

/* Heading font-size and line-height */

h1,
.fs-h1 {
  font-size: var(--fs-xxxxl);
  line-height: 1.1;
}

h2,
.fs-h2 {
  font-size: var(--fs-xxxl);
  line-height: 1.2;
}

h3,
.fs-h3 {
  font-size: var(--fs-xxl);
  line-height: 1.2;
}

h4,
.fs-h4 {
  font-size: var(--fs-xl);
  line-height: 1.2;
}

h5,
.fs-h5 {
  font-size: 1.375rem;
  font-size: var(--fs-lg);
  line-height: 1.2;
}

h6,
.fs-h6 {
  font-size: 1.25rem;
  font-size: var(--fs-md);
  line-height: 1.3;
}

/* Additional Body font-size */

.body-xl {
  font-size: var(--fs-lg);
}

.body-l {
  font-size: var(--fs-md);
}

.body-s {
  font-size: var(--fs-sm);
}

.body-xs {
  font-size: var(--fs-xs);
}

/* Single Post */

.single-post .entry-content :is(h2, h3, h4, h5, h6) {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.single-post :is(h2, h3, h4, h5, h6) strong {
  font-weight: normal;
}

.single-post .entry-content h2 {
  font-size: var(--fs-xxl);
  font-weight: normal;
}

.single-post .entry-content h3 {
  font-size: var(--fs-xl);
  font-weight: normal;
}

.single-post .entry-content h4 {
  font-size: var(--fs-lg);
  font-weight: normal;
}

/* Button Global Line Height */
.gb-button {
  line-height: 1em;
}

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

.block-editor-block-list__layout .gb-container p:nth-last-child(2) {
  margin-bottom: 0px;
}

/*** LISTE ***/
.list-flex {
  margin: 0 0 1.5em 1em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  row-gap: var(--space-2xs);
}

/*** FOOTER ***/
.separatore .gb-text:not(:last-child)::after {
  content: "•";
  margin: 0 4px 0px 8px;
  font-size: 10px;
  vertical-align: middle;
}

/*** 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;
}

/* Limitatori di linee */
.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;
}

/* Transition */
.transition {
  transition: all 0.25s ease-in-out;
}

/* Migliora accessibilità GeneratePress SubMenu Clic Freccia */
#site-navigation ul.sub-menu {
  display: block;
}
#site-navigation li:hover .gp-icon svg {
  transform: rotate(180deg);
}
#site-navigation li:hover .sub-menu {
  visibility: visible;
}

/* Gravity Forms */
body .gform-theme--foundation .gform_fields {
  row-gap: 16px;
}
body .gform_wrapper .gform-button--width-full {
  text-transform: uppercase !important;
  letter-spacing: 0.025em !important;
  font-weight: 700 !important;
  font-size: 1.125rem !important;
  line-height: 2em !important;
  min-height: 48px !important;
}

.gform-theme--framework .gform_footer input[type="submit"].gform_button,
.gform-theme--framework .gform_page_footer input[type="submit"].gform_button {
  --gf-ctrl-btn-bg-color-primary: var(--button-primary-bg);
  --gf-ctrl-btn-bg-color-hover-primary: var(--button-primary-bg-hover);
  --gf-ctrl-btn-color-primary: var(--text);
  --gf-ctrl-btn-shadow: 0;
  --gf-ctrl-btn-radius: 0px;
  --gf-ctrl-btn-font-size: 1.125rem;
  --gf-ctrl-btn-padding-x: 20px;
}
/* 
.gform-theme--framework .gform_footer input[type="submit"].gform_button,
.gform-theme--framework .gform_page_footer input[type="submit"].gform_button {
  --gf-ctrl-btn-bg-color-hover-primary: var(--button-primary-bg-hover);
  --gf-ctrl-btn-border-color-hover-primary: transparent;
  --gf-ctrl-btn-shadow-hover: 0;
} */
