/* RVG Form WA Pro — standardized frontend form UI */
.rvgfw-form-wrap,
.rvgfw-card,
.rvgfw-modal{
  --rvgfw-color:#25D366;
  --rvgfw-color-hover:#1ebe57;
  --rvgfw-text:#0f172a;
  --rvgfw-muted:#64748b;
  --rvgfw-border:#cbd5e1;
  --rvgfw-border-focus:#16a34a;
  --rvgfw-danger:#dc2626;
  --rvgfw-field-bg:#fff;
  font-family:inherit;
}

.rvgfw-card{
  color:var(--rvgfw-text);
  font-family:inherit;
}

.rvgfw-title{
  box-sizing:border-box;
  margin:0 0 18px;
  padding-right:0;
  color:var(--rvgfw-text);
  font-size:19px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:-.01em;
}

.rvgfw-form{margin:0;padding:0}
.rvgfw-field{display:block;margin:0 0 15px}
.rvgfw-label{
  display:block;
  margin:0 0 7px;
  color:#334155;
  font-size:13.5px;
  font-weight:600;
  line-height:1.35;
}
.rvgfw-required{color:#dc2626;font-weight:700}

.rvgfw-input,
.rvgfw-card input.rvgfw-input,
.rvgfw-card select.rvgfw-input,
.rvgfw-card textarea.rvgfw-input{
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box!important;
  display:block;
  width:100%!important;
  min-width:0;
  margin:0!important;
  border:1px solid var(--rvgfw-border)!important;
  border-radius:8px!important;
  background:var(--rvgfw-field-bg)!important;
  color:var(--rvgfw-text)!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:14.5px!important;
  font-weight:400!important;
  line-height:1.4!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
.rvgfw-card input.rvgfw-input,
.rvgfw-card select.rvgfw-input{
  height:46px!important;
  min-height:46px!important;
  padding:0 12px!important;
}
.rvgfw-card textarea.rvgfw-input{
  min-height:106px!important;
  padding:11px 12px!important;
  resize:vertical;
}
.rvgfw-input::placeholder{color:#94a3b8;opacity:1}
.rvgfw-card select.rvgfw-input{
  padding-right:42px!important;
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7' d='m6 8 4 4 4-4'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:18px 18px!important;
}
.rvgfw-input:hover{border-color:#94a3b8!important}
.rvgfw-input:focus{
  border-color:var(--rvgfw-border-focus)!important;
  outline:0!important;
  box-shadow:0 0 0 3px rgba(34,197,94,.12)!important;
}
.rvgfw-input:disabled{background:#f8fafc!important;color:#64748b!important;cursor:not-allowed}

.rvgfw-options{
  display:grid;
  gap:8px;
  width:100%;
  padding:2px 0 0;
}
.rvgfw-opt{
  display:flex!important;
  align-items:flex-start;
  gap:9px;
  margin:0!important;
  color:#334155;
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.4;
  cursor:pointer;
}
.rvgfw-opt input.rvgfw-choice{
  width:17px!important;
  min-width:17px!important;
  height:17px!important;
  min-height:17px!important;
  margin:2px 0 0!important;
  accent-color:var(--rvgfw-color);
}

.rvgfw-field-error{
  display:none;
  margin-top:6px;
  color:var(--rvgfw-danger);
  font-size:12.5px;
  line-height:1.35;
}
.rvgfw-field.rvgfw-error .rvgfw-field-error{display:block}
.rvgfw-field.rvgfw-error .rvgfw-input{
  border-color:#ef4444!important;
  box-shadow:0 0 0 3px rgba(239,68,68,.10)!important;
}

.rvgfw-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:19px;
  text-align:right;
}
.rvgfw-btn{
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:46px;
  margin:0!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:8px!important;
  box-shadow:none!important;
  color:#fff!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-decoration:none!important;
  text-shadow:none!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  cursor:pointer;
  transition:background-color .16s ease,transform .16s ease,opacity .16s ease;
}
.rvgfw-btn-primary,.rvgfw-btn-wa{background:var(--rvgfw-color)!important}
.rvgfw-btn-primary:hover,.rvgfw-btn-wa:hover{
  background:var(--rvgfw-color-hover)!important;
  color:#fff!important;
  transform:translateY(-1px);
}
.rvgfw-btn:focus-visible{outline:3px solid rgba(34,197,94,.24)!important;outline-offset:2px}
.rvgfw-btn:disabled{opacity:.62;cursor:wait;transform:none!important}

.rvgfw-status{margin-top:10px;font-size:13px;line-height:1.45}
.rvgfw-status.is-error{color:#b91c1c}
.rvgfw-status.is-ok{color:#166534}
.rvgfw-hp-wrap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}

/* Modal */
.rvgfw-overlay{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(15,23,42,.56);
}
.rvgfw-modal{
  box-sizing:border-box;
  width:min(max(var(--w,560px),520px),calc(100vw - 32px));
  max-height:var(--h,90vh);
  overflow:auto;
  overscroll-behavior:contain;
  padding:24px;
  border-radius:10px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  position:relative;
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}
.rvgfw-modal>.rvgfw-close{
  box-sizing:border-box!important;
  position:absolute!important;
  top:14px!important;
  right:14px!important;
  z-index:10!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#475569!important;
  font:400 28px/1 Arial,sans-serif!important;
  text-transform:none!important;
  cursor:pointer!important;
}
.rvgfw-modal>.rvgfw-close:hover{background:#f1f5f9!important;color:#0f172a!important}
.rvgfw-modal .rvgfw-title{margin-bottom:19px;padding-right:44px}
.rvgfw-modal .rvgfw-actions{padding-bottom:1px}
.rvgfw-modal .rvgfw-actions .rvgfw-btn{width:100%}

/* Inline forms keep a natural width and button alignment. */
.rvgfw-form-wrap:not(:empty) .rvgfw-card{max-width:100%}

@media (max-width:600px){
  .rvgfw-overlay{align-items:flex-start;padding:10px}
  .rvgfw-modal{
    width:calc(100vw - 20px);
    max-height:calc(100vh - 20px);
    margin-top:10px;
    padding:20px 16px 18px;
    border-radius:10px;
  }
  .rvgfw-title{font-size:18px;margin-bottom:16px}
  .rvgfw-modal .rvgfw-title{padding-right:42px}
  .rvgfw-field{margin-bottom:14px}
  .rvgfw-form-wrap input.rvgfw-input,
  .rvgfw-form-wrap select.rvgfw-input,
  .rvgfw-card textarea.rvgfw-input{font-size:16px!important}
  .rvgfw-actions{margin-top:17px}
  .rvgfw-actions .rvgfw-btn{width:100%}
}
