/**
 * Theme Name: Genesis Block Child Theme
 * Template:   genesis-block-theme
 *
 */
/* ========================================
   Signing Page Styles
   ======================================== */

#signing-page-wrapper {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: inherit;
}

#signing-page-wrapper.signing-active {
  max-width: 1000px;
}

#signing-form-container {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#signing-form-container h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #1a1a1a;
}

#signing-form-container > p {
  margin: 0 0 28px 0;
  color: #555;
  font-size: 15px;
}

.signing-field {
  margin-bottom: 20px;
}

.signing-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.signing-field .required {
  color: #e53935;
  margin-left: 2px;
}

.signing-field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  background: #fafafa;
}

.signing-field input:focus {
  outline: none;
  border-color: #1976d2;
  background: #fff;
}

.signing-actions {
  margin-top: 28px;
}

#signing-submit-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background-color: #1976d2;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#signing-submit-btn:hover {
  background-color: #1565c0;
}

#signing-submit-btn:disabled {
  background-color: #90bef0;
  cursor: not-allowed;
}

.signing-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #a02622;
  font-size: 14px;
}

/* The checkbox challenge, shown when the reCAPTCHA score refuses a visitor.
   Deliberately NOT .signing-error: being asked for the box is a normal outcome
   of a low score, so it reads as a step rather than a failure. */
.signing-challenge { margin: 16px 0; }
.signing-challenge[hidden] { display: none; }

/* On the enrollment form .signing-error clears the Submit button by 20px, and
   an info toast in the same slot must clear it by the same amount. */
#signing-challenge { margin-bottom: 20px; }
.signing-challenge__note {
  background: #eef2f7;
  border: 1px solid #c3c7d4;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 0 0 12px;
  color: #3a3f4c;
  font-size: 14px;
}

.signing-privacy {
  margin-top: 16px;
  font-size: 12px;
  color: #888;
  text-align: center;
}

.signing-privacy a {
  color: #1976d2;
  text-decoration: none;
}

.signing-privacy a:hover {
  text-decoration: underline;
}

#signing-message {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#signing-message p {
  font-size: 18px;
  color: #333;
  margin: 0;
}

#docusign-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.disclosure-box {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
  background: #fafafa;
}

.disclosure-box h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.disclosure-text p {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

.disclosure-text p:last-child {
  margin-bottom: 0;
}

.disclosure-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.disclosure-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Patient marketing form — interest fieldset + checkbox group ===== */

.priovant-form .priovant-form__fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0; /* prevents fieldset from forcing min-content width in flex */
}

.priovant-form .priovant-form__legend {
	padding: 0;
	margin-bottom: 8px;
	font-size: 0.875rem;
	line-height: 1.5;
	font-weight: 600;
	letter-spacing: -0.028em;
	color: var(--wp--preset--color--lisraya-gray-mid);
}

/* Two-column grid of interest checkboxes on wider screens, single column on mobile */
.priovant-form .priovant-form__checks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 24px;
}

@media (max-width: 1023px) {
	.priovant-form .priovant-form__checks {
		grid-template-columns: 1fr;
	}
}

/* The interest checkboxes reuse the parent's .priovant-form__check layout, but
   align center (single-line labels) rather than flex-start (which the parent uses
   for the long multi-line consent text). */
.priovant-form .priovant-form__checks .priovant-form__check {
	align-items: center;
	font-size: 0.9375rem;
	margin: 0;
}

/* Success state for the general message (green confirmation, no warning icon).
   Mirrors the override used on the HCP marketing form. */
.priovant-form__error.priovant-form__error--success {
	background-color: #e3f1e6;
	color: #1b5e20;
}
.priovant-form__error.priovant-form__error--success::before {
	content: none;
}

/* Locked email field after a successful signup (record key; can't be changed). */
.priovant-form input.priovant-form__input--locked {
	background-color: var(--wp--preset--color--lisraya-utility-bg);
	border-color: var(--wp--preset--color--lisraya-blue-muted);
	color: var(--wp--preset--color--lisraya-gray-mid);
	cursor: not-allowed;
	opacity: 1;
}

/* ============================================================
   Patient marketing form — self-contained styling
   (parent is genesis-block-theme; no .priovant-* inheritance,
   so all form styling lives here with hardcoded values)
   ============================================================ */

.priovant-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 640px;
	margin-inline: auto;   /* center the form block */
	font-family: inherit;
}

.priovant-form__row {
	display: flex;
	gap: 16px;
}

.priovant-form__row .priovant-form__field {
	flex: 1;
}

.priovant-form__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.priovant-form__field label {
	font-size: 0.875rem;
	line-height: 1.5;
	font-weight: 600;
	color: #4a4a4a;
}

.priovant-form__req {
	color: #d0021b;
	margin-left: 2px;
}

.priovant-form input[type="text"],
.priovant-form input[type="email"],
.priovant-form input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
	height: 52px;
	padding: 0 16px;
	border: 2px solid #6293bf;
	border-radius: 6px;
	background-color: #fff;
	font-family: inherit;
	font-size: 1rem;
	color: #333;
}

.priovant-form input:focus {
	border-color: #00529b;
	outline: none;
}

/* Interest fieldset + checkbox grid */
.priovant-form__fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.priovant-form__legend {
	padding: 0;
	margin-bottom: 8px;
	font-size: 0.875rem;
	line-height: 1.5;
	font-weight: 600;
	color: #4a4a4a;
}

.priovant-form__checks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 24px;
}

/* Consent / opt-in rows */
.priovant-form__consent {
	margin-top: 8px;
}

.priovant-form__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #333;
	cursor: pointer;
}

.priovant-form__checks .priovant-form__check {
	align-items: center;
	margin: 0;
}

.priovant-form__check input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	margin: 0.2em 0 0 0;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 2px solid #999;
	border-radius: 3px;
	background-color: #fff;
	cursor: pointer;
}

.priovant-form__checks .priovant-form__check input[type="checkbox"] {
	margin-top: 0;
}

.priovant-form__check input[type="checkbox"]:checked {
	background-color: #00529b;
	border-color: #00529b;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z' fill='%23ffffff'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
}

.priovant-form__check input[type="checkbox"]:focus {
	outline: 2px solid #00529b;
	outline-offset: 2px;
}

.priovant-form__check a {
	color: #00529b;
	text-decoration: underline;
}

/* Submit button */
.priovant-form__submit {
	align-self: flex-start;
	height: 52px;
	padding: 0 32px;
	margin-top: 8px;
	border: 2px solid #00529b;
	border-radius: 0;
	background-color: #00529b;
	color: #fff;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.priovant-form__submit:hover,
.priovant-form__submit:focus-visible {
	background-color: #fff;
	color: #00529b;
}

.priovant-form__submit:disabled {
	background-color: #e0e8f0;
	border-color: #e0e8f0;
	color: #98a2b3;
	cursor: default;
}

/* Required note */
.priovant-form__required {
	margin: 0;
	color: #d0021b;
	font-size: 0.8125rem;
}

/* Error message boxes (per-field + general) */
.priovant-form__error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 6px 0 0;
	padding: 10px 12px;
	background-color: #f3dcde;
	border-radius: 6px;
	color: #333;
	font-size: 0.875rem;
	line-height: 1.5;
	font-weight: 600;
}

.priovant-form__error::before {
	content: "";
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d0021b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

.priovant-form__error[hidden] {
	display: none;
}

/* Success state — green, no warning icon */
.priovant-form__error--success {
	background-color: #e3f1e6;
	color: #1b5e20;
}

.priovant-form__error--success::before {
	content: none;
}

/* Locked email after successful signup */
.priovant-form input.priovant-form__input--locked {
	background-color: #eef3f8;
	border-color: #6293bf;
	color: #6b6b6b;
	cursor: not-allowed;
	opacity: 1;
}

/* Mobile: stack the name row + interest grid */
@media (max-width: 1023px) {
	.priovant-form__row,
	.priovant-form__checks {
		grid-template-columns: 1fr;
		flex-direction: column;
	}
}

/* ============================================================
   DocuSign signing modal
   Focused view renders too small inline; we relocate #docusign-container into a
   near-full-page modal so it renders at a usable size. A header with a close (X)
   button behaves like "Finish Later". Prefixed pvt-ds- to avoid collisions.
   Uses 100dvh on mobile so iOS Safari's address bar doesn't clip the bottom
   (where DocuSign's action buttons are), and a 44px touch target on the X.
   ============================================================ */
.pvt-ds-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

.pvt-ds-modal {
  width: 92vw;
  height: 95vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pvt-ds-modal__header {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #e0e0e0;
}

.pvt-ds-modal__close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  min-width: 44px;      /* touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.pvt-ds-modal__close:hover {
  background: #f0f0f0;
  color: #000;
}

.pvt-ds-modal__body {
  flex: 1 1 auto;
  min-height: 0;            /* lets the iframe's 100% height resolve inside flex */
  position: relative;
  overflow: auto;
}

/* Force a concrete height so the SDK iframe's height:100% resolves (otherwise
   it falls back to its inline min-height:400px). Also neutralize the base
   #docusign-container box-shadow/border-radius/overflow while it's in the modal. */
.pvt-ds-modal__body #docusign-container {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pvt-ds-modal__body #docusign-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;     /* defeat the inline min-height:400px */
  max-width: none !important;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .pvt-ds-modal {
    width: 100vw;
    height: 100vh;      /* fallback */
    height: 100dvh;     /* fits visible viewport on mobile browsers (iOS Safari) */
    border-radius: 0;
  }
  .pvt-ds-modal__header {
    padding: 4px 6px;   /* compact header on mobile to preserve form height */
  }
}
