/* Trendwise Agency forms.
   Two looks: "modern" (default, self-contained, tuned per form with --twa-accent
   and --twa-radius) and "inherit" (layout only; the theme styles the controls).
   Two layouts: "plain" (sits in the page) and "card" (boxed, padded, shadowed).
   Accent falls back to Elementor's primary global color, then a deep navy. */

/* ---------- Layout (both styles) ---------- */
.twa-form-wrap{max-width:100%;position:relative}
.twa-form{margin:0}
.twa-form *,.twa-form *::before,.twa-form *::after{box-sizing:border-box}
.twa-form .twa-fields{display:flex;flex-wrap:wrap;gap:20px 3%}
.twa-form .twa-field{display:flex;flex-direction:column;gap:7px;flex:0 0 100%;min-width:0;margin:0;position:relative}
.twa-form .twa-w-25{flex-basis:22.75%}
.twa-form .twa-w-33{flex-basis:31.33%}
.twa-form .twa-w-50{flex-basis:48.5%}
.twa-form .twa-w-66{flex-basis:65.66%}
.twa-form .twa-w-75{flex-basis:74.25%}
@media (max-width:640px){.twa-form .twa-field{flex-basis:100%!important}.twa-form .twa-fields{gap:16px}}
.twa-form .twa-hp{position:absolute!important;left:-10000px!important;top:auto;width:1px;height:1px;overflow:hidden}
.twa-form .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
.twa-form .twa-choices{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:10px 22px;min-width:0}
.twa-form .twa-choice{display:flex;align-items:flex-start;gap:10px;font-weight:400;cursor:pointer;margin:0;line-height:1.45}
.twa-form .twa-choice input{margin:.2em 0 0;flex:0 0 auto}
.twa-form .twa-desc{font-size:13.5px;line-height:1.45;opacity:.72;margin:-2px 0 0}
.twa-form .twa-actions{margin-top:22px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.twa-form .twa-submit:disabled{opacity:.7;cursor:progress}
.twa-message{margin-top:16px;padding:16px 18px;border-radius:10px;font-size:15px;line-height:1.5;display:flex;gap:12px;align-items:flex-start}
.twa-message:empty{display:none}
.twa-message::before{content:"";flex:0 0 22px;width:22px;height:22px;border-radius:50%;margin-top:1px;background-repeat:no-repeat;background-position:center;background-size:14px}
.twa-message.twa-success{background:#e9f7ee;color:#0f5132}
.twa-message.twa-success::before{background-color:#1a7a41;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E")}
.twa-message.twa-error{background:#fdecea;color:#7a1f18}
.twa-message.twa-error::before{background-color:#b42318;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' d='M8 4v5M8 11.5v.5'/%3E%3C/svg%3E")}
.twa-form .twa-field-error{color:#b42318;font-size:13px;line-height:1.35;display:flex;gap:6px;align-items:center}
.twa-form .twa-field-error::before{content:"";width:14px;height:14px;flex:none;border-radius:50%;background:#b42318 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' d='M8 4v5M8 11.5v.5'/%3E%3C/svg%3E") center/10px no-repeat}
.twa-form .twa-turnstile{margin-top:14px}
.twa-form-missing{padding:12px;border:1px dashed #b42318;color:#b42318;border-radius:6px}

/* ---------- Modern (default) ---------- */
.twa-style-modern{
  --twa-accent-final:var(--twa-accent,var(--e-global-color-primary,#000066));
  --twa-radius-final:var(--twa-radius,8px);
  --twa-field-bg:#fff;
  --twa-field-text:#0f172a;
  --twa-field-border:#d5d9e2;
  --twa-field-border-hover:#b3bac7;
  --twa-label:#1e293b;
  --twa-placeholder:#94a3b8;
  --twa-ring:rgba(0,0,102,.16);
  font-size:16px;line-height:1.5;color:var(--twa-label)
}
@supports (color:color-mix(in srgb,red 50%,blue)){
  .twa-style-modern{--twa-ring:color-mix(in srgb,var(--twa-accent-final) 18%,transparent)}
}
.twa-style-modern .twa-form-title{margin:0 0 18px;font-size:1.5em;line-height:1.2;letter-spacing:-.01em}
.twa-style-modern label{font-size:14px;font-weight:600;letter-spacing:.005em;line-height:1.35;color:var(--twa-label);margin:0}
.twa-style-modern .twa-req{color:#b42318;margin-left:2px;font-weight:700}
.twa-style-modern input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.twa-style-modern select,
.twa-style-modern textarea{
  display:block;width:100%;min-height:52px;padding:13px 16px;margin:0;
  border:1.5px solid var(--twa-field-border);border-radius:var(--twa-radius-final);
  background:var(--twa-field-bg);color:var(--twa-field-text);
  font:inherit;font-size:16px;line-height:1.4;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
  appearance:none;-webkit-appearance:none
}
.twa-style-modern input::placeholder,.twa-style-modern textarea::placeholder{color:var(--twa-placeholder);opacity:1}
.twa-style-modern input:hover:not(:focus),.twa-style-modern select:hover:not(:focus),.twa-style-modern textarea:hover:not(:focus){border-color:var(--twa-field-border-hover)}
.twa-style-modern input:focus,.twa-style-modern select:focus,.twa-style-modern textarea:focus{
  outline:none;border-color:var(--twa-accent-final);
  box-shadow:0 0 0 4px var(--twa-ring)
}
.twa-style-modern input:autofill,.twa-style-modern input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--twa-field-bg) inset;-webkit-text-fill-color:var(--twa-field-text)}
.twa-style-modern select{
  padding-right:44px;cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;background-size:16px
}
.twa-style-modern select:invalid,.twa-style-modern select option[value=""]{color:var(--twa-placeholder)}
.twa-style-modern select option{color:var(--twa-field-text)}
.twa-style-modern textarea{min-height:140px;resize:vertical}
.twa-style-modern input[type=date]{min-height:52px}
.twa-style-modern input[type=checkbox],.twa-style-modern input[type=radio]{
  width:20px;height:20px;accent-color:var(--twa-accent-final);cursor:pointer;flex:0 0 20px;margin-top:.15em
}
.twa-style-modern .twa-choice span{font-size:15px;color:var(--twa-label)}
.twa-style-modern .twa-choices{gap:12px 24px}
.twa-style-modern .twa-consent{align-items:flex-start;padding:12px 14px;border:1.5px dashed var(--twa-field-border);border-radius:var(--twa-radius-final);background:rgba(148,163,184,.06)}
.twa-style-modern .twa-consent span{font-size:13.5px;line-height:1.5;opacity:.88}
.twa-style-modern .twa-consent a{color:inherit;text-decoration:underline}
.twa-style-modern .twa-html{font-size:15px;line-height:1.55;opacity:.9}
.twa-style-modern .twa-html p:last-child{margin-bottom:0}
.twa-style-modern .twa-submit{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-width:190px;min-height:54px;padding:14px 32px;margin:0;
  border:0;border-radius:var(--twa-radius-final);
  background:var(--twa-accent-final);color:#fff;
  font:inherit;font-size:16px;font-weight:600;letter-spacing:.01em;line-height:1.2;
  cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.14);
  transition:filter .15s ease,transform .1s ease,box-shadow .15s ease
}
.twa-style-modern .twa-submit:hover:not(:disabled){filter:brightness(1.1);box-shadow:0 6px 16px -6px rgba(15,23,42,.4)}
.twa-style-modern .twa-submit:active:not(:disabled){transform:translateY(1px)}
.twa-style-modern .twa-submit:focus-visible{outline:3px solid var(--twa-accent-final);outline-offset:3px}
.twa-style-modern .twa-submit.is-busy::before{content:"";width:16px;height:16px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:twa-spin .7s linear infinite}
@keyframes twa-spin{to{transform:rotate(360deg)}}
@media (max-width:640px){.twa-style-modern .twa-submit{width:100%}}
.twa-style-modern .twa-invalid input,.twa-style-modern .twa-invalid select,.twa-style-modern .twa-invalid textarea{border-color:#b42318;background:#fffafa}
.twa-style-modern .twa-invalid input:focus,.twa-style-modern .twa-invalid select:focus,.twa-style-modern .twa-invalid textarea:focus{box-shadow:0 0 0 4px rgba(180,35,24,.15)}
.twa-style-modern .twa-invalid label{color:#b42318}
.twa-style-modern .twa-privacy{font-size:13px;opacity:.7;margin:0}

/* Card layout: the form is its own object on the page. */
.twa-style-modern.twa-layout-card{
  padding:32px;background:var(--twa-card-bg,#fff);
  border:1px solid rgba(15,23,42,.08);border-radius:calc(var(--twa-radius-final) + 8px);
  box-shadow:0 1px 2px rgba(15,23,42,.05),0 12px 32px -16px rgba(15,23,42,.18)
}
@media (max-width:640px){.twa-style-modern.twa-layout-card{padding:22px 18px}}

/* On dark sections (Elementor dark backgrounds): flip the field surfaces. */
.twa-style-modern.twa-on-dark{--twa-field-bg:rgba(255,255,255,.08);--twa-field-text:#fff;--twa-field-border:rgba(255,255,255,.22);--twa-field-border-hover:rgba(255,255,255,.4);--twa-label:#fff;--twa-placeholder:rgba(255,255,255,.55)}
.twa-style-modern.twa-on-dark .twa-consent{background:rgba(255,255,255,.06)}
.twa-style-modern.twa-on-dark select option{color:#0f172a}

/* ---------- Inherit (theme styles the controls) ---------- */
.twa-style-inherit label{font-weight:600;font-size:.95em;line-height:1.3}
.twa-style-inherit .twa-req{color:#b42318;margin-left:2px}
.twa-style-inherit input:not([type=checkbox]):not([type=radio]),.twa-style-inherit select,.twa-style-inherit textarea{width:100%}
.twa-style-inherit textarea{min-height:110px;resize:vertical}
.twa-style-inherit .twa-submit{cursor:pointer;min-width:160px}
.twa-style-inherit .twa-invalid input,.twa-style-inherit .twa-invalid select,.twa-style-inherit .twa-invalid textarea{border-color:#b42318}

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

/* Multi-step: hidden steps are removed by JS; without JS every step shows and
   the form is an ordinary one-page form. */
.twa-form .twa-step[hidden]{display:none}
.twa-form .twa-steps-bar{display:flex;gap:6px;margin:0 0 18px}
.twa-form .twa-step-dot{flex:1;height:4px;border-radius:2px;background:rgba(15,23,42,.12);transition:background .2s ease}
.twa-form .twa-step-dot.is-current{background:var(--twa-accent-final,#0f172a)}
.twa-form .twa-step-count{margin:0 0 14px;font-size:13px;opacity:.7}
.twa-form .twa-nav[hidden],.twa-form .twa-submit[hidden]{display:none}
.twa-style-modern .twa-back{
	background:transparent;border:1px solid rgba(15,23,42,.2);color:inherit;
	padding:12px 20px;border-radius:var(--twa-radius,8px);cursor:pointer;font:inherit
}
.twa-style-modern .twa-back:hover{background:rgba(15,23,42,.05)}
.twa-style-modern .twa-next{
	background:var(--twa-accent-final,#0f172a);color:#fff;border:0;
	padding:13px 26px;border-radius:var(--twa-radius,8px);cursor:pointer;font:inherit;font-weight:600
}
.twa-style-modern .twa-next:hover{filter:brightness(1.1)}
@media (max-width:640px){.twa-style-modern .twa-next,.twa-style-modern .twa-back{width:100%}}
