/* Scoped styles for the New Contact Form block */

/* Subtitle uses Caveat font; override global h3 font from gutenberg-blocks.css */
.balco-contact-subtitle {
  font-family: "Caveat", cursive !important;
}

/* Underline links in subdescription */
.balco-subdescription a {
  text-decoration: underline;
}

.balco-cf7 {
  --balco-blue-600: #2563eb; /* tailwind blue-600 */
  --balco-blue-400: #60a5fa; /* tailwind blue-400 */
  --balco-black: #111827;
  --balco-white: #ffffff;
  --balco-red-500: #ef4444; /* tailwind red-500 */
}

.column-one div {
  min-height: 75px;
}

.column-one div:last-child {
  min-height: 40px !important;
}

/* Grid layout matching: grid grid-cols-1 md:grid-cols-2 gap-x-4 items-start */
.balco-cf7 .balco-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 1rem; 
  align-items: start;
}
@media (min-width: 768px) {
  .balco-cf7 .balco-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Columns spacing similar to flex-col gap-4 */
.balco-cf7 .balco-form-col {
  display: flex;
  flex-direction: column;
 /* Reduced from 1rem to 0.5rem (8px) */
}

/* Base input styles (maps from multiple tailwind utility classes) */
.balco-cf7 .balco-input,
.balco-cf7 .balco-textarea {
  width: 100%;
  background-color: var(--balco-white);
  color: var(--balco-black);
  font-size: 1rem; /* text-base */
  font-weight: 500; /* font-medium */
  line-height: 28px; /* leading-[28px] */
  border-radius: 30px; /* rounded-full */
  border: 1px solid transparent;
  outline: none;
  transition: box-shadow 150ms ease, border-color 150ms ease;
  margin-bottom: 20px;
}



/* Placeholder styling (italic & black) */
.balco-cf7 .balco-input::placeholder,
.balco-cf7 .balco-textarea::placeholder {
  font-style: italic; /* italic */
  color: var(--balco-black); /* placeholder-black */
  opacity: 1; /* ensure visible across browsers */
}



/* Privacy policy radio group */

.balco-cf7 .balco-privacy .balco-privacy-row {
  display: flex;
  align-items: center; /* vertical center */
  gap: 0.5rem; /* 8px spacing between radio and text */
  font-size: 1rem; /* text-base */
  color: var(--balco-black);
}



/* Custom radio appearance approximating Tailwind utilities */
.balco-cf7 .balco-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 25px; /* w-[25px] */
  height: 25px; /* h-[25px] */
  border-radius: 9999px; /* rounded-full */
  background-color: var(--balco-white);
  border: 1px solid #d1d5db; /* border-gray-300 */
  display: inline-block;
  position: relative;
  outline: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
}
/* Focus styling removed - no blue focus colors */
/* Black circle with proper padding when checked */
.balco-cf7 .balco-radio input[type="radio"]:checked {
  background-color: var(--balco-white);
  border-color: #d1d5db;
  background-image: radial-gradient(circle, #000 0, #000 8px, transparent 8px);
  /* background-size: 16px 16px; */
  background-position: center;
  background-repeat: no-repeat;
}



/* Contact Form 7 default error messages - override for 12px font size */
.balco-cf7 .wpcf7-not-valid-tip {
  font-size: 12px !important;
  color: #ef4444;
  font-style: italic;
  padding-left: 20px;
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Special handling for radio button error messages to prevent text flow break */
.balco-cf7 .custom-cf7-form .checkbox-input .wpcf7-not-valid-tip {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.25rem;
  margin-left: 1.2rem;
  padding-left: 0;
  z-index: 10;
}


/* Ensure radio button container has relative positioning for error messages */
.balco-cf7 .custom-cf7-form .checkbox-input {
  position: relative;
}

/* Submit row alignment and spacing */
.balco-cf7 .balco-submit-row {
  grid-column: 1 / -1; /* span both columns */
  display: flex;
  justify-content: flex-end; /* justify-end */
  margin-top: 1rem; /* mt-4 */
}

/* Submit button style */
.balco-cf7 .balco-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 145px; /* w-[145px] */
  height: 52px; /* h-[52px] */
  padding-left: 1.5rem; /* px-6 */
  padding-right: 1.5rem; /* px-6 */
  padding-top: 0.75rem; /* py-3 */
  padding-bottom: 0.75rem; /* py-3 */
  border-radius: 10px; /* rounded-10 */
  background-color: var(--balco-blue-600);
  color: #fff; /* text-white */
  font-size: 1rem; /* text-base */
  font-weight: 600; /* semi */
  text-decoration: none;
  transition: opacity 150ms ease, transform 150ms ease;
}
.balco-cf7 .balco-submit:hover {
  opacity: 0.95;
}
.balco-cf7 .balco-submit:active {
  transform: translateY(1px);
}

/* Utilities mapping (optional font hooks if present in theme) */
.balco-cf7 .font-barlow {
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
.balco-cf7 .font-barlow-semi {
  font-family: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}


@media (min-width: 768px) {
  .balco-cf7 .custom-cf7-form .mobile-privacy {
    display: none;
  }
}

/* Desktop privacy radio - show in first column */
.balco-cf7 .custom-cf7-form .desktop-privacy {
  display: none;
}
@media (min-width: 768px) {
  .balco-cf7 .custom-cf7-form .desktop-privacy {
    display: block; /* Show on desktop */
  }
}

/* CF7 success/error: keep in normal flow so it stays inside the blue (bg-lightblue) section */
.balco-cf7 .wpcf7-response-output {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 1rem 0 0 !important;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.balco-cf7 form.init .wpcf7-response-output,
.balco-cf7 form.resetting .wpcf7-response-output,
.balco-cf7 form.submitting .wpcf7-response-output {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Error message styling */
.balco-cf7 .wpcf7-validation-errors,
.balco-cf7 .wpcf7-mail-sent-ng,
.balco-cf7 .wpcf7-spam-blocked,
.balco-cf7 .wpcf7-aborted {
  background-color: #fef2f2 !important; /* Light red background */
  border: 1px solid #fecaca !important; /* Light red border */
  color: #dc2626 !important; /* Red text */
  border-left: 4px solid #ef4444 !important; /* Red left border accent */
}

/* Success message styling */
.balco-cf7 .wpcf7-mail-sent-ok {
  background-color: #f0fdf4 !important; /* Light green background */
  border: 1px solid #22c55e !important; /* Green border */
  color: #16a34a !important; /* Green text */
  border-left: 4px solid #22c55e !important; /* Green left border accent */
}

/* ==========================
   Support for minimal CF7 markup as requested
   Structure: .custom-cf7-form with two column children
   ========================== */
.balco-cf7 .custom-cf7-form {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 1rem;
 /* Reduced from 1rem to 0.5rem (8px) */
  align-items: start;
}
@media (min-width: 768px) {
  .balco-cf7 .custom-cf7-form {
    grid-template-columns: 1fr 1fr; /* two columns on md+ */
  }
}

/* Inner columns that may use flex in CF7 markup */
.balco-cf7 .custom-cf7-form > div {
  display: flex;
  flex-direction: column;
/* Reduced from 1rem to 0.5rem (8px) */
}

/* Inputs without custom classes */
.balco-cf7 .custom-cf7-form input[type="text"],
.balco-cf7 .custom-cf7-form input[type="email"],
.balco-cf7 .custom-cf7-form input[type="tel"],
.balco-cf7 .custom-cf7-form select,
.balco-cf7 .custom-cf7-form textarea {
  width: 100%;
  background-color: var(--balco-white);
  color: var(--balco-black);
  padding: 0.75rem 1rem; /* py-3 px-6 */
  font-size: 1rem;
  font-weight: 500;
  line-height: 28px;
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  border-radius: 9999px; /* pill */
  border: 1px solid transparent;
  outline: none;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.balco-cf7 .custom-cf7-form textarea {
  border-radius: 20px;
  height: 193px;
  resize: none;
  padding: 0.5rem 1rem;
}
.balco-cf7 .custom-cf7-form ::placeholder {
  font-style: italic;
  color: var(--balco-black);
  opacity: 1;
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Ensure placeholders for text, email, and textarea are medium weight */
.balco-cf7 .custom-cf7-form input[type="text"]::placeholder,
.balco-cf7 .custom-cf7-form input[type="email"]::placeholder,
.balco-cf7 .custom-cf7-form textarea::placeholder {
  font-weight: 500;
  font-size: 15px;
}
/* Focus styles removed - no blue focus colors */

/* Checkbox/Radio row */
.balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input,
.balco-cf7 .custom-cf7-form .custom-block-input {
  display: inline;
  font-size: 1rem;
  color: var(--balco-black);
}

/* Ensure radio button and link text flow together inline */
.balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .wpcf7-list-item,
.balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .wpcf7-list-item-label,
.balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .parent {
  display: inline;
}

/* Style checkboxes similar to radios */
.balco-cf7 .custom-cf7-form input[type="checkbox"],
.balco-cf7 .custom-cf7-form input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 6px; /* checkbox shape */
  background-color: var(--balco-white);
  border: 1px solid #d1d5db;
  position: relative;
  outline: none;
  cursor: pointer;
}
.balco-cf7 .custom-cf7-form input[type="radio"] {
  border-radius: 9999px; /* radios are round */
}
/* Focus styling removed - no blue focus colors */
.balco-cf7 .custom-cf7-form input[type="checkbox"]:checked {
  background-color: var(--balco-blue-600);
  border-color: var(--balco-blue-600);
}
.balco-cf7 .custom-cf7-form input[type="radio"]:checked {
  background-color: var(--balco-white);
  border-color: #d1d5db;
  background-image: radial-gradient(circle, #000 0, #000 8px, transparent 8px);
  background-size: 16px 16px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Submit row centered under the form */
.balco-cf7 .custom-cf7-form .form-submit-row {
    display: flex;
    justify-content: flex-end;
    height: 52px;
    margin-bottom: 10px;
    position: relative;
  }

/* Loading spinner: overlay centered on the submit button, not below it */
.balco-cf7 .custom-cf7-form .form-submit-row .wpcf7-spinner {
    position: absolute !important;
    top: 50% !important;
    /* Button is 145px wide, right-aligned; center of button = 72.5px from right edge */
    right: calc(145px / 2) !important;
    transform: translate(50%, -50%) !important;
    margin: 0 !important;
    pointer-events: none;
    z-index: 2;
  }



.balco-cf7 .custom-cf7-form input[type="submit"],
.balco-cf7 .custom-cf7-form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 145px;
  height: 52px;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background-color: #005674;/* base like bg-blue */
  color: #fff;
  font-size: 1rem;
  font-weight: 500; /* medium */
  font-family: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  border: none;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}
.balco-cf7 .custom-cf7-form input[type="submit"]:hover,
.balco-cf7 .custom-cf7-form button[type="submit"]:hover {
  background-color: #013e54;
  color: #fff;
  border: none;
  opacity: 0.95; /* subtle hover feedback */
}
.balco-cf7 .custom-cf7-form input[type="submit"]:active,
.balco-cf7 .custom-cf7-form button[type="submit"]:active {
  transform: translateY(1px);
}

  .balco-cf7 .wpcf7-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 9999px;
    background-color: var(--balco-white);
    border: 1px solid #d1d5db;
    position: relative;
    outline: none;
    cursor: pointer;
    vertical-align: top;
    margin-bottom: 5px;
    margin-right: 8px;
  }
  /* Focus styling removed - no blue focus colors */
  .balco-cf7 .wpcf7-radio input[type="radio"]:checked {
    background-color: var(--balco-white);
    border-color: #d1d5db;
    background-image: radial-gradient(circle, #000 0, #000 8px, transparent 8px);
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* Mobile: remove extra right spacing next to the radio dot */
  @media (max-width: 767px) {
    .balco-cf7 .wpcf7-radio input[type="radio"] {
      margin-right: 2px;
    }
  }

  .parent {
    text-decoration: underline;
    padding-bottom: 7px;
  }

  /* Add spacing after CF7 radio default label text (not before the link) */
  .balco-cf7 .wpcf7-radio .wpcf7-list-item-label {
    display: inline-block;
    margin-right: 2px; /* 8px gap before the following link */
    font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  }

  /* Mobile: 12px font size for radio button text and link */
  @media (max-width: 767px) {
    .balco-cf7 .wpcf7-radio .wpcf7-list-item-label,
    .balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .parent,
    .balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .parent a {
      font-size: 14px;
    }
  }

  /* Ensure radio container and link use Barlow as well */
  .balco-cf7 .custom-cf7-form .checkbox-input,
  .balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input,
  .balco-cf7 .custom-cf7-form .checkbox-input .custom-block-input .parent a {
    font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  }


/*Conatct block*/
.contact-block {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.button-submit {
  margin-top: 28px !important;
}
@media (min-width: 768px) {
  .contact-block {
    flex-direction: row !important;
    align-items: center !important;
  }
  
}