/**
* Theme Name: Creote Child
* Description: This is a child theme of Creote, generated by Merlin WP.
* Author: <a href="http://steelthemes.com/">Steelthemes</a>
* Template: creote
* Version: 2.8.6
* Text Domain:  creote-child
*/

/* ===== CF7 checkbox ΜΟΝΟ για το πεδίο 'checkbox-agree' (pop-ups) ===== */
.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item{
  position: relative;
  display: inline-block;
}

.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item input[type="checkbox"]{
  position: absolute;
  inset: 0;                /* top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;              /* αόρατο */
  cursor: pointer;
  z-index: 2;              /* πάνω από τα pseudo-elements */
}

.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item .wpcf7-list-item-label{
  position: relative;
  display: inline-block;
  padding-left: 28px;      /* χώρος για το κουτάκι */
  line-height: 1.4;
}

.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item .wpcf7-list-item-label::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #3359fe;
  border-radius: 4px;
  background: #fff;
  pointer-events: none;    /* να μην τρώει το click */
}

.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item input[type="checkbox"]:checked + .wpcf7-list-item-label::before{
  background: #3359fe;
}
.wpcf7-form-control-wrap[data-name="checkbox-agree"] .wpcf7-list-item input[type="checkbox"]:checked + .wpcf7-list-item-label::after{
  content: "✓";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-58%);
  font-size: 16px;
  line-height: 18px;
  color: #fff;
  pointer-events: none;
}

/* ===== Custom checkbox για τη φόρμα με <label class="custom-checkbox"> ===== */
.custom-checkbox{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  z-index: 1;
}

/* ορατό κουτάκι */
.custom-checkbox .checkmark{
  width: 18px; height: 18px;
  border: 2px solid #3359fe;
  border-radius: 4px;
  background: #fff;
  position: relative;
  flex: 0 0 18px;
  pointer-events: none;
}

/* το πραγματικό input: ΜΟΝΟ πάνω από το κουτάκι */
.custom-checkbox input[type="checkbox"]{
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

/* σβήσε το global pseudo-element που βλέπεις στο DevTools */
.custom-checkbox input[type="checkbox"]::after{
  content: none !important;
  display: none !important;
}

/* ΧΡΗΣΙΜΟ: με ~ για να δουλεύει ακόμη κι αν υπάρχει <br> ανάμεσα */
.custom-checkbox input[type="checkbox"]:checked ~ .checkmark{
  background: #3359fe;
}
.custom-checkbox input[type="checkbox"]:checked ~ .checkmark::after{
  content: "";
  position: absolute;
  left: 4px; top: 0px;
  width: 6px; height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* βεβαιώνουμε ότι το link είναι κλικάμπλ */
.custom-checkbox a{
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
