/* ==================================================================
   BLUU KAZI · Custom Odoo Website Form
   Scope: everything lives under .bk-custom-form so no other Odoo page
   is touched. Works with the stock s_website_form snippet markup and
   Odoo's own submit / validation JS (classes are styled, never renamed).
   Drop into Website > Settings > Custom Code (CSS) or a theme SCSS file.
   ===================================================================== */

.bk-custom-form {
  --bk-blue: #1455D9;            /* primary brand blue (live site --bk-primary) */
  --bk-blue-hover: #0F45B5;
  --bk-blue-soft: #EAF0FD;
  --bk-ring: rgba(20, 85, 217, .22);
  --bk-ink: #0B1220;             /* headings and input text */
  --bk-slate: #475569;           /* labels, helper text */
  --bk-line: #E2E8F0;            /* borders, dividers */
  --bk-surface: #F8FAFC;         /* resting input background */
  --bk-card: #FFFFFF;
  --bk-danger: #DC2626;
  --bk-danger-soft: #FEF2F2;
  --bk-success: #15803D;
  --bk-radius: 14px;
  --bk-radius-sm: 10px;
  --bk-font: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--bk-font);
  color: var(--bk-ink);
  padding-block: clamp(32px, 6vw, 72px);
}
.bk-custom-form *, .bk-custom-form *::before, .bk-custom-form *::after { box-sizing: border-box; }

/* ---------- 1. Card ---------- */
.bk-custom-form .bk-form-card {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  background: var(--bk-card);
  border: 1px solid var(--bk-line);
  border-radius: var(--bk-radius);
  box-shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 12px 32px -12px rgba(11, 18, 32, .10);
  overflow: hidden;
}
.bk-custom-form .bk-form-card::before {           /* thin brand accent bar */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--bk-blue);
}
.bk-custom-form .bk-form-body { padding: clamp(28px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px); }

/* ---------- 2. Header ---------- */
.bk-custom-form .bk-form-header {
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) 0;
}
.bk-custom-form .bk-form-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.bk-custom-form .bk-form-logo { display: block; height: 22px; width: auto; }
.bk-custom-form .bk-form-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #C9D8F7;
  background: var(--bk-blue-soft);
  color: var(--bk-blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.bk-custom-form .bk-form-badge svg { width: 12px; height: 12px; }
.bk-custom-form .bk-form-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--bk-ink);
}
.bk-custom-form .bk-form-lede {
  margin: 0;
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--bk-slate);
}

/* ---------- 3. Numbered sections ---------- */
.bk-custom-form .bk-form-section {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0 6px;
  padding-top: 24px;
  /* divider inset to the column gutter so it lines up with the inputs */
  background: linear-gradient(var(--bk-line), var(--bk-line)) no-repeat center top / calc(100% - var(--bs-gutter-x, 1.5rem)) 1px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--bk-ink);
}
.bk-custom-form .bk-form-section:first-child { margin-top: 0; padding-top: 0; background: none; }
.bk-custom-form .bk-form-section__num {
  font-variant-numeric: tabular-nums;
  color: var(--bk-blue);
  font-weight: 700;
}
.bk-custom-form .bk-form-section__hint {
  margin-left: auto;
  font-weight: 400;
  color: var(--bk-slate);
}

/* ---------- 4. Grid: stack labels, pair short fields ---------- */
.bk-custom-form .s_website_form_rows { row-gap: 4px; }
.bk-custom-form .s_website_form_field { padding-block: 8px !important; }
.bk-custom-form .s_website_form_field > .row { flex-direction: column; margin: 0; }
.bk-custom-form .s_website_form_field > .row > * { width: 100% !important; max-width: 100%; flex: 0 0 auto; padding: 0; }
.bk-custom-form .s_website_form_label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bk-ink);
}
.bk-custom-form .s_website_form_label_content { color: inherit; }
.bk-custom-form .s_website_form_mark { color: var(--bk-blue); margin-left: 2px; }
/* half-width pairs: add col-md-6 to the field wrapper (see QWeb). On phones every field is full width. */
@media (max-width: 767.98px) {
  .bk-custom-form .s_website_form_field[class*="col-md-6"] { width: 100%; }
}

/* ---------- 5. Inputs ---------- */
.bk-custom-form .s_website_form_input:not([type=checkbox]):not([type=radio]):not([type=file]),
.bk-custom-form .form-control,
.bk-custom-form .form-select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: 500 15px/1.4 var(--bk-font);
  color: var(--bk-ink);
  background-color: var(--bk-surface);
  border: 1px solid var(--bk-line);
  border-radius: var(--bk-radius-sm);
  box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.bk-custom-form textarea.s_website_form_input { min-height: 120px; resize: vertical; }
.bk-custom-form .s_website_form_input::placeholder { color: #94A3B8; font-weight: 400; }
.bk-custom-form .s_website_form_input:hover:not(:focus) { border-color: #CBD5E1; }
.bk-custom-form .s_website_form_input:focus,
.bk-custom-form .form-control:focus,
.bk-custom-form .form-select:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--bk-blue);
  box-shadow: 0 0 0 4px var(--bk-ring);
}
.bk-custom-form .form-select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
/* file input */
.bk-custom-form input[type=file].s_website_form_input {
  width: 100%;
  padding: 8px;
  font: 500 14px var(--bk-font);
  color: var(--bk-slate);
  background: var(--bk-surface);
  border: 1px dashed #CBD5E1;
  border-radius: var(--bk-radius-sm);
}
.bk-custom-form input[type=file]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--bk-ink);
  color: #fff;
  font: 600 13px var(--bk-font);
  cursor: pointer;
}
/* checkboxes and radios */
.bk-custom-form .form-check-input {
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1.5px solid #CBD5E1;
  background-color: #fff;
}
.bk-custom-form .form-check-input:checked { background-color: var(--bk-blue); border-color: var(--bk-blue); }
.bk-custom-form .form-check-input:focus { box-shadow: 0 0 0 4px var(--bk-ring); border-color: var(--bk-blue); }
.bk-custom-form .form-check-label { font-size: 14px; color: var(--bk-ink); }
/* yes / no answers (Odoo radio groups) as pill buttons */
.bk-custom-form .s_website_form_multiple { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bk-custom-form .s_website_form_multiple > .radio { flex: 0 0 auto; width: auto; max-width: none; padding: 0; }
.bk-custom-form .s_website_form_multiple .form-check { position: relative; margin: 0; padding: 0; }
.bk-custom-form .s_website_form_multiple .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
.bk-custom-form .s_website_form_multiple .form-check-label {
  display: inline-flex; align-items: center; min-height: 42px; padding: 9px 18px;
  border: 1px solid var(--bk-line); border-radius: 999px; background: var(--bk-surface);
  font-weight: 500; color: var(--bk-ink); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.bk-custom-form .s_website_form_multiple .form-check-label:hover { border-color: #CBD5E1; }
.bk-custom-form .s_website_form_multiple .form-check-input:checked + .form-check-label { background: var(--bk-blue); border-color: var(--bk-blue); color: #fff !important; }
.bk-custom-form .s_website_form_multiple .form-check-input:focus-visible + .form-check-label { box-shadow: 0 0 0 4px var(--bk-ring); }
.bk-custom-form .o_has_error .s_website_form_multiple .form-check-label { border-color: var(--bk-danger); background: var(--bk-danger-soft); }
/* conditional field (Odoo hides it with .s_website_form_field_hidden_if / d-none) */
.bk-custom-form .bk-form-reveal { padding: 12px 14px !important; margin-top: 4px; max-width: calc(100% - var(--bs-gutter-x, 1.5rem)) !important; margin-inline: auto; border-left: 3px solid var(--bk-blue); background: var(--bk-blue-soft); border-radius: 0 var(--bk-radius-sm) var(--bk-radius-sm) 0; }
.bk-custom-form .bk-form-reveal .s_website_form_input { background-color: #fff !important; }
.bk-custom-form .bk-form-note { margin: 2px 0 6px; font-size: 13px; color: var(--bk-slate); }

/* helper text */
.bk-custom-form .s_website_form_field .form-text,
.bk-custom-form .s_website_form_field .text-muted { display: block; margin-top: 6px; font-size: 12.5px; color: var(--bk-slate) !important; }
.bk-custom-form .bk-form-strong { color: var(--bk-blue); font-weight: 700; }

/* PDF-only resume message */
.bk-custom-form .bk-form-file-error { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--bk-danger-soft); color: var(--bk-danger); font-size: 12.5px; font-weight: 500; }
.bk-custom-form .bk-form-file-error[hidden] { display: none; }

/* ---------- Validation (Odoo adds .is-invalid / .o_has_error) ---------- */
.bk-custom-form .s_website_form_input.is-invalid,
.bk-custom-form .o_has_error .s_website_form_input,
.bk-custom-form .o_has_error .form-control {
  border-color: var(--bk-danger) !important;
  background-color: var(--bk-danger-soft) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12) !important;
  background-image: none;
}
.bk-custom-form .o_has_error .s_website_form_label,
.bk-custom-form .s_website_form_field:has(.is-invalid) .s_website_form_label { color: var(--bk-danger); }
.bk-custom-form .o_has_error::after,
.bk-custom-form .s_website_form_field:has(.is-invalid)::after {
  content: "Please complete this field.";
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bk-danger);
}
.bk-custom-form .s_website_form_input.is-valid { border-color: var(--bk-success); }

/* ---------- 6. Submit ---------- */
.bk-custom-form .s_website_form_submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 28px !important;
  padding-top: 24px;
  background: linear-gradient(var(--bk-line), var(--bk-line)) no-repeat center top / calc(100% - var(--bs-gutter-x, 1.5rem)) 1px;
}
.bk-custom-form .s_website_form_submit > .s_website_form_label { display: none; } /* Odoo's spacer column */
.bk-custom-form .s_website_form_send {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--bk-radius-sm);
  background: var(--bk-blue);
  color: #fff !important;
  font: 600 16px/1 var(--bk-font);
  letter-spacing: -.005em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(11, 18, 32, .08), 0 8px 20px -8px rgba(20, 85, 217, .55);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.bk-custom-form .s_website_form_send::after {
  content: "→";
  font-size: 18px;
  transition: transform .18s ease;
}
.bk-custom-form .s_website_form_send:hover { background: var(--bk-blue-hover); transform: translateY(-1px); }
.bk-custom-form .s_website_form_send:hover::after { transform: translateX(4px); }
.bk-custom-form .s_website_form_send:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--bk-ring); }
.bk-custom-form .s_website_form_send:active { transform: translateY(0); }
/* desktop: result message across the top, trust line left, button right */
@media (min-width: 768px) {
  .bk-custom-form .s_website_form_submit { grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
  .bk-custom-form .s_website_form_submit #s_website_form_result { grid-column: 1 / -1; grid-row: 1; }
  .bk-custom-form .s_website_form_submit .bk-form-trust { grid-column: 1; grid-row: 2; }
  .bk-custom-form .s_website_form_send { grid-column: 2; grid-row: 2; width: auto; min-width: 220px; }
}
/* loading: Odoo disables the button (and may inject its own spinner) while posting */
.bk-custom-form .s_website_form_send.disabled,
.bk-custom-form .s_website_form_send[disabled],
.bk-custom-form .s_website_form_send.bk-is-loading {
  pointer-events: none;
  color: transparent !important;
  background: var(--bk-blue);
  opacity: 1;
  transform: none;
}
.bk-custom-form .s_website_form_send.disabled > *,
.bk-custom-form .s_website_form_send[disabled] > *,
.bk-custom-form .s_website_form_send.bk-is-loading > * { visibility: hidden; }
.bk-custom-form .s_website_form_send.disabled::after,
.bk-custom-form .s_website_form_send[disabled]::after,
.bk-custom-form .s_website_form_send.bk-is-loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bk-form-spin .7s linear infinite;
}
@keyframes bk-form-spin { to { transform: rotate(360deg); } }
/* submit result message */
.bk-custom-form #s_website_form_result { font-size: 14px; }
.bk-custom-form #s_website_form_result:empty { display: none; }
.bk-custom-form #s_website_form_result.text-danger,
.bk-custom-form #s_website_form_result .text-danger {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bk-danger-soft);
  color: var(--bk-danger) !important;
}

/* ---------- 7. Trust footer ---------- */
.bk-custom-form .bk-form-trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--bk-slate);
}
.bk-custom-form .bk-form-trust svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; color: var(--bk-slate); }
.bk-custom-form .bk-form-trust a { color: var(--bk-blue); text-decoration: none; font-weight: 600; }
.bk-custom-form .bk-form-trust a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .bk-custom-form * { transition: none !important; animation-duration: 1.4s !important; }
}

/* one message at a time on the resume field */
.bk-custom-form .s_website_form_field:has(.bk-form-file-error:not([hidden]))::after { content: none; }
/* compensation: amount + currency + period on one line */
.bk-custom-form .bk-form-inline { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 480px) { .bk-custom-form .bk-form-inline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bk-custom-form .bk-form-inline > :first-child { grid-column: 1 / -1; } }
/* city / state / country */
.bk-custom-form .bk-form-geo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 768px) { .bk-custom-form .bk-form-geo { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- live application page ---------- */
.bk-live-apply { background: radial-gradient(circle at 86% 0%, rgba(20, 85, 217, .10), transparent 40%), var(--bk-surface); min-height: 60vh; }
.bk-custom-form .bk-form-crumbs { max-width: 760px; margin: 0 auto 14px; font-size: 13px; color: var(--bk-slate); }
.bk-custom-form .bk-form-crumbs a { color: var(--bk-slate); text-decoration: none; }
.bk-custom-form .bk-form-crumbs a:hover { color: var(--bk-blue); }
.bk-custom-form .bk-form-timeline { margin: 10px 0 0; font-size: 14px; color: var(--bk-ink); font-weight: 500; }
.bk-custom-form h1.bk-form-title { text-align: left; }
.bk-custom-form .bk-apply-suggest { position: relative; }
.bk-custom-form .s_website_form_dnone { display: none !important; }
/* searchable Country / State boxes */
.bk-custom-form .bk-combo { position: relative; min-width: 0; }
.bk-custom-form .bk-combo.d-none { display: none !important; }
.bk-custom-form .bk-combo__select { position: absolute !important; inset: auto 0 0 0; width: 100% !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.bk-custom-form .bk-combo__input { padding-right: 36px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.bk-custom-form .bk-apply-suggest__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); box-shadow: 0 12px 28px -8px rgba(11, 18, 32, .18); }
.bk-custom-form .bk-apply-suggest__item { display: block; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font: 500 14px var(--bk-font); color: var(--bk-ink); cursor: pointer; }
.bk-custom-form .bk-apply-suggest__item:hover, .bk-custom-form .bk-apply-suggest__item.is-active { background: var(--bk-blue-soft); color: var(--bk-blue); }
