/*
Theme Name: Plumas Imprevistas Blocksy Child Theme
Theme URI: https://plumasimprevistas.com
Description: Child theme for Blocksy
Author: Emiliano Lucero
Author URI: https://plumasimprevistas.com
Template: blocksy
Version: 1.1.0
Text Domain: blocksy-child-pi
*/

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link,
a.button,
a.wp-block-button__link {
  background-color: #0055ff;  /* Default primary */
  color: #ffffff;
  border: none;
  border-radius: 8px;         /* Rounded corners */
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
a.button:hover,
a.wp-block-button__link:hover {
  background-color: #003bb3; /* Darker shade */
  color: #ffffff;
}
/* --- PI: Sticky shrink per il titolo del sito --- */

/* Preparazione: permetti scaling fluido del testo titolo */
.ct-header .site-branding .site-title,
.ct-header .site-branding .site-title a {
  display: inline-block;                  /* per far funzionare transform */
  transform-origin: left center;          /* si “ancora” a sinistra */
  transition: transform .25s ease;        /* animazione fluida */
  will-change: transform;
  -webkit-font-smoothing: antialiased;
}

/* Stato sticky (copre più varianti usate da Blocksy) */
.ct-header.ct-sticky .site-branding .site-title,
.ct-header.ct-sticky .site-branding .site-title a,
.ct-header.is-sticky .site-branding .site-title,
.ct-header.is-sticky .site-branding .site-title a,
.ct-header-sticky .site-branding .site-title,
.ct-header-sticky .site-branding .site-title a {
  transform: scale(var(--pi-sticky-title-scale, .82)); /* ~82% di default */
}

/* (Opzionale) Mobile header */
.ct-header-mobile.ct-sticky .site-branding .site-title,
.ct-header-mobile.ct-sticky .site-branding .site-title a,
.ct-header-mobile.is-sticky .site-branding .site-title,
.ct-header-mobile.is-sticky .site-branding .site-title a {
  transform: scale(var(--pi-sticky-title-scale, .82));
}
:root { --pi-sticky-title-scale: .85; } /* 85% */
.job-meta-grid .ct-badge {
  margin: 0;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .85em;
  line-height: 1;
  background: var(--paletteColor2, #eef2f6);
  color: var(--color, #223);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.job-meta-grid .wp-block-group {
  align-items: baseline;
}



/* Prevent wide/full blocks from bleeding into sidebar layouts */
[data-sidebar] .entry-content .alignwide,
[data-sidebar] .entry-content .alignfull {
  max-width: var(--contentWidth);
  margin-left: auto;
  margin-right: auto;

}
[data-sidebar] .entry-content .wp-block-columns {max-width:100%; margin-left:auto; margin-right:auto;}
[data-sidebar] .entry-content .wp-block-column {min-width:0;}

.pi-area-icon-wrap { display:inline-flex; align-items:center; margin-right:.5rem; }
.pi-area-icon      { display:inline-block; line-height:1; }
.pi-area-icon svg  { width:1.25em; height:1.25em; }
 

/* --- Frontend edit job: Sezione B in 2 colonne --- */

/* Add top and bottom lines to the main grid wrapper */
.pi-grid-wrap { 
  display: flex !important; 
  flex-wrap: wrap;
  gap: 2px; /* Keep vertical spacing between rows minimal */
  column-gap: 32px; /* INCREASED the gap between the left and right columns */
  background: transparent !important; 
  border-top: 1px solid #ddd;         
  border-bottom: 1px solid #ddd;      
  padding-top: 16px;                  
  padding-bottom: 8px;                
}

/* Adjust general section padding to flow better with the new borders */
.pi-sec { padding:12px 0; margin:0 0 16px; background:transparent; }
.pi-head h3, .pi-content h3, .pi-grid-wrap h3 { margin:0 0 8px; }


.pi-field-full { margin: 0 0 16px; }
.pi-field-full input,
.pi-field-full textarea { width: 100%; }

/* Make the individual field container use flexbox to put label and input side-by-side */
.pi-grid-wrap > .acf-field { 
  box-sizing: border-box;
  width: 100% !important;     /* 1 colonna on mobile */
  display: flex;              /* Use flexbox for horizontal alignment */
  align-items: center;        /* Vertically align label and input field */
}

@media (min-width: 800px) {
  .pi-grid-wrap > .acf-field { 
    /* Adjust width calculation for the new column-gap (32px / 2 = 16px) */
    width: calc(50% - 16px) !important;   /* 2 columns */
  }
}

/* Move the label margin to the right side of the label, closer to the input */
.pi-grid-wrap > .acf-field .acf-label { 
    margin-bottom: 0; /* Remove bottom margin */
    margin-right: 6px; /* REDUCED space to the right of the label to 6px */
    flex-basis: 20%; /* Give the label space, adjust as needed */
    flex-shrink: 0;
}

/* Ensure the input area takes up the remaining space */
.pi-grid-wrap .acf-input {
    flex-grow: 1;
    min-width: 0; /* Prevents flex overflow issues with some input types */
}


.pi-grid-wrap .acf-field-true-false .acf-input { display: flex; align-items: center; gap: 8px; }

.pi-grid-wrap .acf-input input,
.pi-grid-wrap .acf-input input[type="email"],
.pi-grid-wrap .acf-input input[type="url"],
.pi-grid-wrap .acf-input select,
.pi-grid-wrap .acf-input textarea { width: 100%; }

/*    Label lunghe / overflow Se qualche label è più lunga, evita “salti” del layout.  */ 
.page-template-page-edit-job .pi-grid-wrap > .acf-field .acf-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/*Focus/accessibilità sui campi */
.page-template-page-edit-job .pi-grid-wrap .acf-input :where(input,select,textarea):focus {
  outline: 2px solid #0055ff;
  outline-offset: 1px;
}

/* barra “Save Job” sticky in basso per moduli lunghi:*/
.page-template-page-edit-job .acf-form-submit {
  position: sticky; bottom: 0; z-index: 5;
  background: #fff; padding: 12px; border-top: 1px solid #e4e6eb;
}

/* Pill per tassonomie */
.pi-pills .pi-pill{
  display:inline-block; margin:.2rem .35rem .2rem 0; padding:.25rem .6rem;
  border-radius:999px; text-decoration:none; font-size:.9em;
  background:var(--paletteColor2, #eef2f6); color:var(--contrast-3, #111);
}
.pi-pills .pi-pill:hover{ background:var(--paletteColor1, #dbe7ff); }

/* Stato (Opened/Closed) */
.pi-status{ display:inline-flex; align-items:center; padding:.2rem .6rem; border-radius:999px; font-weight:600; font-size:.9em; }
.pi-status.is-open{  background:#e6faec; color:#126b3b; }
.pi-status.is-closed{background:#fde8e8; color:#a61b1b; }
