/* ============================================================
   ЕВРОПЪТ — Contact Form 7 styling
   One stylesheet for all forms (careers / franchise / homepage)
   Scope: forms output with html_class="europat-form"
   ============================================================ */

/* --- Font -----------------------------------------------------
   Prefer SELF-HOSTING Onest (see notes in chat: GDPR/EU + speed).
   Quick start via Google Fonts is below; remove once self-hosted. */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800&display=swap');

/* --- Brand tokens (single source of truth) ------------------- */
:root {
  --eu-blue:        #103683; /* primary — trust/stability   */
  --eu-blue-dark:   #0B245C; /* hover / depth               */
  --eu-red:         #A80504; /* accent / CTA — action       */
  --eu-red-dark:    #8a0403; /* CTA hover                   */
  --eu-blue-50:     #EEF3FC; /* light fills / focus ring    */
  --eu-ink:         #14213D; /* primary text                */
  --eu-gray:        #5A667E; /* secondary text / borders    */
  --eu-success:     #16A46B; /* valid / success             */
  --eu-white:       #FFFFFF;

  --eu-border:      #D7DEEA; /* neutral field border        */
  --eu-radius-ui:   8px;     /* inputs & buttons            */
  --eu-radius-card: 16px;    /* form card                   */
  --eu-font:        'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* --- Form container ------------------------------------------ */
.europat-form {
  font-family: var(--eu-font);
  color: var(--eu-ink);
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

/* Optional card treatment — uncomment to wrap the form in a card.
.europat-form {
  background: var(--eu-white);
  border: 1px solid var(--eu-border);
  border-radius: var(--eu-radius-card);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.europat-form::before {              // "Път" motif — thin accent bar
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--eu-blue) 0%, var(--eu-blue) 60%, var(--eu-red) 100%);
}
*/

/* --- Labels -------------------------------------------------- */
.europat-form label {
  display: block;
  font-weight: 600;              /* SemiBold */
  font-size: 18px;
  letter-spacing: 0.06em;        /* +6% tracking per brand */
  color: var(--eu-ink);
  margin-bottom: 18px;
}

/* --- Text inputs & textarea ---------------------------------- */
.europat-form input[type="text"],
.europat-form input[type="tel"],
.europat-form input[type="email"],
.europat-form textarea,
.europat-form select {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;               /* 16px avoids iOS zoom-on-focus */
  line-height: 1.5;
  color: var(--eu-ink);
  background: var(--eu-white);
  border: 1px solid var(--eu-border);
  border-radius: var(--eu-radius-ui);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.europat-form textarea { min-height: 120px; resize: vertical; }

.europat-form input::placeholder,
.europat-form textarea::placeholder {
  color: var(--eu-gray);
  opacity: 1;
}

/* Focus — accessible visible ring in brand blue */
.europat-form input:focus,
.europat-form textarea:focus,
.europat-form select:focus {
  outline: none;
  border-color: var(--eu-blue);
  box-shadow: 0 0 0 3px var(--eu-blue-50);
}

/* --- Two-column row (franchise + homepage) ------------------- */
.contact-form__row {
  display: flex;
  gap: 16px;
}
.contact-form__row > label,
.contact-form__row > .wpcf7-form-control-wrap {
  flex: 1 1 0;
  min-width: 0;                  /* prevents flex overflow */
}

@media (max-width: 560px) {
  .contact-form__row { flex-direction: column; gap: 0; }
}

/* --- File field (careers) ------------------------------------ */
.europat-form input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--eu-ink);
  background: var(--eu-blue-50);
  border: 1px dashed var(--eu-border);
  border-radius: var(--eu-radius-ui);
  cursor: pointer;
}
/* The browser button inside the file input (WebKit/Blink) */
.europat-form input[type="file"]::file-selector-button {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--eu-white);
  background: var(--eu-blue);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  margin-right: 12px;
  cursor: pointer;
}
.europat-form input[type="file"]::file-selector-button:hover {
  background: var(--eu-blue-dark);
}

/* --- Consent checkbox (acceptance, careers) ------------------ */
.europat-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.europat-form .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;              /* body weight, not a field label */
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--eu-gray);
  cursor: pointer;
}
.europat-form .wpcf7-acceptance input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--eu-blue);
  flex: 0 0 auto;
}

/* --- Submit button (CTA = red per brand) --------------------- */
.europat-form input[type="submit"],
.europat-form .wpcf7-submit,
.europat-form button[type="submit"] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--eu-white);
  background: var(--eu-red);
  border: none;
  border-radius: var(--eu-radius-ui);
  padding: 13px 26px;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.europat-form input[type="submit"]:hover,
.europat-form .wpcf7-submit:hover { background: var(--eu-red-dark); }
.europat-form input[type="submit"]:active,
.europat-form .wpcf7-submit:active { transform: translateY(1px); }
.europat-form input[type="submit"]:focus-visible,
.europat-form .wpcf7-submit:focus-visible {
  outline: 3px solid var(--eu-blue-50);
  outline-offset: 2px;
}
/* Disabled state while submitting */
.europat-form .wpcf7-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Optional secondary/blue button — add class:contact-form__btn--blue
.europat-form .contact-form__btn--blue { background: var(--eu-blue); }
.europat-form .contact-form__btn--blue:hover { background: var(--eu-blue-dark); }
*/

/* --- CF7 validation & messages ------------------------------- */
/* Invalid field */
.europat-form .wpcf7-not-valid {
  border-color: var(--eu-red) !important;
  box-shadow: 0 0 0 3px rgba(168, 5, 4, .12);
}
/* Inline field error tip */
.europat-form .wpcf7-not-valid-tip {
  color: var(--eu-red);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

/* Response banner under the form */
.europat-form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 12px 16px;
  border-radius: var(--eu-radius-ui);
  border-width: 1px;
  border-style: solid;
  font-size: 15px;
}
/* Success */
.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--eu-success);
  background: rgba(22, 164, 107, .08);
  color: #0f6b45;
}
/* Error / validation / failure */
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border-color: var(--eu-red);
  background: rgba(168, 5, 4, .06);
  color: var(--eu-red);
}

/* Loading spinner alignment */
.europat-form .wpcf7-spinner { margin: 0 0 0 12px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .europat-form * { transition: none !important; }
}
