/*!
 * Boholweb ConnectFlow — forms for BoholwebCMS · Copyright (c) 2026 BoholwebWP (https://boholwebwp.com) · MIT License
 * Change the look with these custom properties on .cf-wrap (or :root), e.g. .cf-wrap { --cf-accent: #0f766e; }
 */
.cf-wrap {
  --cf-accent: #3a5bd9;
  --cf-accent-text: #ffffff;
  --cf-error: #c0292b;
  --cf-success: #1f7a4d;
  --cf-input-bg: #ffffff;
  --cf-input-text: #1d2330;
  --cf-input-border: #b9bfcc;
  --cf-radius: 8px;
  --cf-gap: 18px;
  --cf-muted: color-mix(in srgb, currentColor 62%, transparent);
  --cf-line: color-mix(in srgb, currentColor 18%, transparent);
  --cf-soft: color-mix(in srgb, currentColor 5%, transparent);
  max-width: 100%;
  margin: 0 0 1.5em;
  font-size: 1rem;
  line-height: 1.5;
}
.cf-wrap *, .cf-wrap *::before, .cf-wrap *::after { box-sizing: border-box; }
.cf-wrap [hidden] { display: none !important; }
.cf-wrap.cf-theme-minimal {
  --cf-input-bg: transparent;
  --cf-input-text: inherit;
  --cf-input-border: color-mix(in srgb, currentColor 35%, transparent);
  --cf-accent: currentColor;
}
.cf-wrap.cf-theme-minimal .cf-button { color: inherit; background: transparent; border: 2px solid currentColor; }

.cf-heading { margin-bottom: 1.2em; }
.cf-title { margin: 0 0 .25em; font-size: 1.5em; line-height: 1.25; }
.cf-description { margin: 0; color: var(--cf-muted); }

/* layout: a 12-column grid that collapses on small screens */
.cf-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--cf-gap) 16px; }
.cf-field { grid-column: span 12; min-width: 0; }
.cf-col-9 { grid-column: span 9; } .cf-col-8 { grid-column: span 8; } .cf-col-6 { grid-column: span 6; }
.cf-col-4 { grid-column: span 4; } .cf-col-3 { grid-column: span 3; }
@media (max-width: 640px) { .cf-field[class*="cf-col-"] { grid-column: span 12; } }
.cf-field--hidden-visibility { display: none; }

.cf-label { display: block; margin: 0 0 6px; padding: 0; font-weight: 600; }
.cf-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf-fieldset > legend { padding: 0; }
.cf-required { color: var(--cf-error); font-weight: 600; }
.cf-description, .cf-field .cf-description { margin: 6px 0 0; font-size: .9em; color: var(--cf-muted); }
.cf-description p { margin: 0 0 .4em; }
.cf-sublabel { display: block; margin-top: 4px; font-size: .85em; color: var(--cf-muted); }

.cf-labels-left .cf-field:not(.cf-field--section):not(.cf-field--html) { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; column-gap: 16px; align-items: start; }
.cf-labels-left .cf-field > .cf-label, .cf-labels-left .cf-fieldset > legend { grid-column: 1; padding-top: 9px; }
.cf-labels-left .cf-field > :not(.cf-label) { grid-column: 2; }
.cf-labels-left .cf-fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(120px, 30%) 1fr; column-gap: 16px; }
.cf-labels-left .cf-fieldset > legend { float: left; }
.cf-labels-left .cf-fieldset > :not(legend) { grid-column: 2; }
@media (max-width: 640px) { .cf-labels-left .cf-field, .cf-labels-left .cf-fieldset { display: block !important; } }

/* inputs */
.cf-control input[type=text], .cf-control input[type=email], .cf-control input[type=tel], .cf-control input[type=url],
.cf-control input[type=number], .cf-control input[type=date], .cf-control input[type=time], .cf-control input[type=password],
.cf-control select, .cf-control textarea, .cf-list-table input, .cf-other-text, .cf-resume-link {
  display: block; width: 100%; max-width: 100%; margin: 0;
  padding: 10px 12px; min-height: 44px;
  font: inherit; color: var(--cf-input-text); background: var(--cf-input-bg);
  border: 1px solid var(--cf-input-border); border-radius: var(--cf-radius);
  transition: border-color .15s, box-shadow .15s;
}
.cf-control textarea { min-height: 120px; resize: vertical; }
.cf-control select[multiple] { min-height: 120px; padding: 6px; }
.cf-control input:focus-visible, .cf-control select:focus-visible, .cf-control textarea:focus-visible, .cf-list-table input:focus-visible, .cf-other-text:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cf-accent) 45%, transparent); outline-offset: 1px; border-color: var(--cf-accent);
}
.cf-control input[readonly] { background: var(--cf-soft); color: inherit; font-weight: 600; }
.cf-field--error input:not([type=checkbox]):not([type=radio]), .cf-field--error select, .cf-field--error textarea { border-color: var(--cf-error); }
.cf-affix { display: flex; align-items: stretch; }
.cf-affix input { flex: 1; min-width: 0; }
.cf-prefix, .cf-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--cf-soft); border: 1px solid var(--cf-input-border); }
.cf-prefix { border-right: 0; border-radius: var(--cf-radius) 0 0 var(--cf-radius); }
.cf-suffix { border-left: 0; border-radius: 0 var(--cf-radius) var(--cf-radius) 0; }
.cf-affix .cf-prefix + input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cf-affix input:has(+ .cf-suffix) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cf-confirm { margin-top: 12px; }

.cf-subfields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cf-subfield.cf-sub-full { grid-column: 1 / -1; }
@media (max-width: 480px) { .cf-subfields { grid-template-columns: 1fr; } }

/* choices */
.cf-choices { display: grid; gap: 8px 20px; }
.cf-choices-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-choices-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cf-choices-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .cf-choices[class*="cols-"] { grid-template-columns: 1fr; } }
.cf-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 28px; }
.cf-choice input[type=checkbox], .cf-choice input[type=radio] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cf-accent); }
.cf-choice label { cursor: pointer; }
.cf-choice-other { flex-wrap: wrap; }
.cf-choice-other .cf-other-text { flex: 1 1 180px; min-height: 36px; padding: 6px 10px; margin-top: -4px; }
.cf-consent-text { margin-top: 8px; font-size: .9em; color: var(--cf-muted); }

/* rating: radios drawn in reverse so :checked ~ fills the lower stars */
.cf-rating { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.cf-rating-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cf-rating-star { font-size: 1.9em; line-height: 1; cursor: pointer; color: color-mix(in srgb, currentColor 25%, transparent); padding: 2px; transition: color .1s, transform .1s; }
.cf-rating-input:checked ~ .cf-rating-star, .cf-rating-star:hover, .cf-rating-star:hover ~ .cf-rating-star { color: #f5a623; }
.cf-rating-input:focus-visible + .cf-rating-star { outline: 3px solid color-mix(in srgb, var(--cf-accent) 45%, transparent); border-radius: 4px; }

/* list */
.cf-list-table { width: 100%; border-collapse: collapse; }
.cf-list-table th { text-align: left; font-size: .85em; font-weight: 600; padding: 0 6px 4px 0; }
.cf-list-table td { padding: 0 6px 6px 0; vertical-align: middle; }
.cf-list-actions { width: 1%; white-space: nowrap; }
.cf-icon-button { width: 34px; height: 34px; margin-left: 2px; font-size: 1.1em; line-height: 1; border: 1px solid var(--cf-input-border); border-radius: 50%; background: var(--cf-input-bg); color: var(--cf-input-text); cursor: pointer; }

/* files */
.cf-control input[type=file] { display: block; max-width: 100%; padding: 12px; border: 1px dashed var(--cf-input-border); border-radius: var(--cf-radius); background: var(--cf-soft); width: 100%; }
.cf-file-rules { margin: 6px 0 0; font-size: .85em; color: var(--cf-muted); }
.cf-file-list { margin: 6px 0 0; padding-left: 1.2em; font-size: .9em; }
.cf-file-list:empty { display: none; }

.cf-counter { margin: 4px 0 0; font-size: .85em; color: var(--cf-muted); text-align: right; }
.cf-section-title { margin: 1em 0 .25em; padding-bottom: 6px; font-size: 1.2em; border-bottom: 1px solid var(--cf-line); }
.cf-field--section:first-child .cf-section-title { margin-top: 0; }
.cf-section-description { color: var(--cf-muted); }
.cf-html > :first-child { margin-top: 0; } .cf-html > :last-child { margin-bottom: 0; }

/* errors */
.cf-error { margin: 6px 0 0; color: var(--cf-error); font-size: .9em; font-weight: 600; }
.cf-error::before { content: "! "; }
.cf-error-summary { margin: 0 0 1.2em; padding: 14px 16px; border: 2px solid var(--cf-error); border-radius: var(--cf-radius); background: color-mix(in srgb, var(--cf-error) 7%, transparent); }
.cf-error-summary:focus { outline: 3px solid color-mix(in srgb, var(--cf-error) 40%, transparent); }
.cf-error-summary-title { margin: 0; font-weight: 700; color: var(--cf-error); }
.cf-error-summary ul { margin: 8px 0 0; padding-left: 1.2em; }
.cf-error-summary a { color: inherit; }

/* footer & buttons */
.cf-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: calc(var(--cf-gap) + 6px); }
.cf-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; font: inherit; font-weight: 600; line-height: 1.2;
  color: var(--cf-accent-text); background: var(--cf-accent); border: 2px solid var(--cf-accent); border-radius: var(--cf-radius);
  cursor: pointer; transition: filter .15s, transform .05s;
}
.cf-button:hover { filter: brightness(1.08); }
.cf-button:active { transform: translateY(1px); }
.cf-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--cf-accent) 45%, transparent); outline-offset: 2px; }
.cf-button:disabled { opacity: .6; cursor: progress; }
.cf-button--secondary { color: var(--cf-accent); background: transparent; }
.cf-theme-minimal .cf-button--secondary { border-style: dashed; }
.cf-link-button { padding: 4px 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; }
.cf-save { margin-left: auto; font-size: .95em; }
.cf-spinner { width: 20px; height: 20px; border: 3px solid var(--cf-line); border-top-color: var(--cf-accent); border-radius: 50%; animation: cf-spin .7s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cf-spinner { animation-duration: 2s; } .cf-wrap * { transition: none !important; } }
.cf-wrap:not(.cf-js) [data-cf-next], .cf-wrap:not(.cf-js) [data-cf-prev], .cf-wrap:not(.cf-js) .cf-progress, .cf-wrap:not(.cf-js) .cf-steps { display: none; }
.cf-wrap:not(.cf-js) .cf-page + .cf-page { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid var(--cf-line); }
.cf-wrap:not(.cf-js) .cf-page .cf-footer:not(.cf-footer--last) { display: none; }

/* progress */
.cf-progress { margin: 0 0 1.4em; }
.cf-progress-label { margin: 0 0 6px; font-weight: 600; }
.cf-progress-title { font-weight: 400; color: var(--cf-muted); }
.cf-progress-track { height: 8px; background: var(--cf-line); border-radius: 99px; overflow: hidden; }
.cf-progress-bar { height: 100%; background: var(--cf-accent); border-radius: 99px; transition: width .3s ease; }
.cf-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 1.4em; padding: 0; list-style: none; counter-reset: none; }
.cf-step { display: flex; align-items: center; gap: 8px; color: var(--cf-muted); }
.cf-step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--cf-line); font-weight: 700; font-size: .9em; }
.cf-step.is-current { color: inherit; font-weight: 600; }
.cf-step.is-current .cf-step-number { border-color: var(--cf-accent); background: var(--cf-accent); color: var(--cf-accent-text); }
.cf-step.is-done .cf-step-number { border-color: var(--cf-accent); color: var(--cf-accent); }

/* messages */
.cf-confirmation { padding: 18px 20px; border-radius: var(--cf-radius); border: 1px solid color-mix(in srgb, var(--cf-success) 40%, transparent); background: color-mix(in srgb, var(--cf-success) 8%, transparent); }
.cf-confirmation:focus { outline: none; }
.cf-confirmation > :first-child { margin-top: 0; } .cf-confirmation > :last-child { margin-bottom: 0; }
.cf-resume { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-resume .cf-resume-link { flex: 1 1 260px; }
.cf-closed { padding: 16px 18px; border: 1px solid var(--cf-line); border-radius: var(--cf-radius); background: var(--cf-soft); }
.cf-closed p { margin: 0; }
.cf-admin-note { padding: 10px 12px; border-left: 4px solid #d98e04; background: color-mix(in srgb, #d98e04 10%, transparent); font-size: .9em; }
.cf-wrap.cf-busy form { opacity: .75; }

/* honeypot: away from sight and from screen readers */
.cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cf-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }

/* {all_fields}-style tables shown on pages */
.cf-list-table td, .cf-list-table th { word-break: break-word; }
