/* ===== Base: compact form ===== */
.rvgfw-grid { display:grid; gap:8px; }
.rvgfw-title{ margin:0 0 2px; font-size:17px; font-weight:700; color:#0d172a; }
.rvgfw-field{ display:block; }
.rvgfw-input,
.rvgfw-field select,
.rvgfw-field textarea{
  width:100%; padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px;
  font-size:14px; background:#fff; box-sizing:border-box;
}
.rvgfw-field textarea{ min-height:100px; resize:vertical; }
.rvgfw-actions{ margin-top:4px; text-align:right; }

/* ===== Buttons ===== */
.rvgfw-form-wrap{ --rvgfw-color:#25D366; --rvgfw-color-hover:#1ebe57; }
.rvgfw-btn{
  display:inline-flex; align-items:center; gap:8px;
  border:none; border-radius:8px; padding:10px 14px;
  font-weight:700; cursor:pointer; line-height:1; font-size:14px;
}

/* warna tombol default + ikon WA */
.rvgfw-btn-primary,
.rvgfw-btn-wa{
  background:var(--rvgfw-color) !important;
  color:#fff !important;
  font-weight:700 !important;
  border:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
.rvgfw-btn-primary:hover,
.rvgfw-btn-wa:hover{
  background:var(--rvgfw-color-hover) !important;
  color:#fff !important;
  transform:translateY(-1px);
}
.rvgfw-btn-wa::before{
  content:""; display:inline-block; width:18px; height:18px;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' d='M26.6 5.4C23.9 2.7 20.6 1.3 17 1.3 9.8 1.3 4 7.1 4 14.3c0 2.3.6 4.5 1.8 6.4L4 30.7l10.2-1.8c1.9 1 4 1.6 6.1 1.6 7.2 0 13-5.8 13-13 0-3.6-1.4-6.9-4.1-9.5z'/%3E%3Cpath fill='%23fff' d='M19.11 17.04c-.27-.13-1.57-.78-1.81-.87-.24-.09-.42-.13-.6.13-.18.27-.69.87-.85 1.05-.16.18-.31.2-.58.07-.27-.13-1.14-.42-2.17-1.34-.8-.71-1.34-1.59-1.5-1.86-.16-.27-.02-.41.11-.54.12-.12.27-.31.4-.47.13-.16.18-.27.27-.45.09-.18.04-.34-.02-.47-.07-.13-.6-1.44-.82-1.97-.22-.53-.45-.45-.6-.46-.16-.01-.34-.01-.52-.01-.18 0-.47.07-.72.34-.24.27-.95.93-.95 2.26 0 1.33.97 2.62 1.1 2.8.13.18 1.91 2.94 4.62 4.02.65.28 1.16.45 1.56.58.65.21 1.25.18 1.72.11.52-.08 1.57-.64 1.79-1.26.22-.62.22-1.15.16-1.26-.07-.11-.24-.18-.5-.31z'/%3E%3C/svg%3E");
  filter:brightness(0) invert(1);
}

/* ===== Overlay Modal (tanpa <dialog>) ===== */
.rvgfw-overlay{
  position:fixed; inset:0; display:none;
  align-items:center; justify-content:center;
  background:rgba(0,0,0,.55); z-index:999999;
}
.rvgfw-overlay.is-open{ display:flex; }

/* box & padding rapat; close absolute agar tidak makan ruang */
.rvgfw-modal-box{
  --rvgfw-modal-w:640px; --rvgfw-modal-h:86vh;
  width:min(var(--rvgfw-modal-w), 92vw);
  max-height:var(--rvgfw-modal-h);
  background:#fff; border-radius:12px; box-shadow:0 24px 80px rgba(0,0,0,.25);
  padding:12px 14px; display:flex; flex-direction:column; overflow:hidden; position:relative;
}
.rvgfw-modal-head{ height:0; padding:0; margin:0; }
.rvgfw-modal-close{
  position:absolute; top:8px; right:10px;
  background:transparent; border:0; color:#334155; font-size:18px;
  line-height:1; cursor:pointer; padding:4px; border-radius:6px;
}
.rvgfw-modal-close:hover{ background:#f1f5f9; }
.rvgfw-modal-body{ padding:6px 4px 6px; overflow:auto; }

/* ===== Ensure button color inside modal beats theme (Flatsome) ===== */
.rvgfw-overlay .rvgfw-modal-body .rvgfw-actions .rvgfw-btn-wa,
.rvgfw-overlay .rvgfw-modal-body .rvgfw-actions .rvgfw-btn-primary{
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  background-color:var(--rvgfw-color) !important;
  background:var(--rvgfw-color) !important;
  background-image:none !important;
  color:#fff !important;
  text-shadow:none !important;
  border:none !important;
  box-shadow:none !important;
  padding:12px 18px !important;
  border-radius:8px !important;
}
.rvgfw-overlay .rvgfw-modal-body .rvgfw-actions .rvgfw-btn-wa:hover,
.rvgfw-overlay .rvgfw-modal-body .rvgfw-actions .rvgfw-btn-primary:hover{
  background-color:var(--rvgfw-color-hover) !important;
  background:var(--rvgfw-color-hover) !important;
  color:#fff !important;
  transform:translateY(-1px);
}
.rvgfw-overlay .rvgfw-modal-body .rvgfw-actions .rvgfw-btn-wa::before{
  filter:brightness(0) invert(1) !important;
}

/* minor */
.rvgfw-form-wrap .rvgfw-btn,
.rvgfw-overlay .rvgfw-btn{ font-family:inherit; }

/* === Konsistenkan radius semua field form RVG === */
.rvgfw-form-wrap input[type="text"],
.rvgfw-form-wrap input[type="email"],
.rvgfw-form-wrap input[type="tel"],
.rvgfw-form-wrap input[type="number"],
.rvgfw-form-wrap select,
.rvgfw-form-wrap textarea {
  border-radius: 10px !important;   /* samakan dengan textarea bawah */
  border: 1px solid rgba(2,6,23,0.1);
  box-shadow: none !important;
  transition: all 0.2s ease;
}

/* Saat fokus */
.rvgfw-form-wrap input:focus,
.rvgfw-form-wrap textarea:focus,
.rvgfw-form-wrap select:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37,211,102,0.15);
  outline: none;
}
