/**
 * The look of the online consent form and loan agreement.
 */

.rxca-wrap {
	--rxca-green: #00713c;
	--rxca-green-dark: #00532c;
	--rxca-green-soft: #e8f5ee;
	--rxca-green-tint: #f2f8f4;
	--rxca-green-card: #f6faf7;
	--rxca-line: #d7e2db;
	--rxca-ink: #1d2a23;
	--rxca-muted: #5d6b63;
	--rxca-error: #b3261e;
	--rxca-radius: 10px;
	--rxca-gap: 18px;
	max-width: 980px;
	margin: 0 auto 40px;
	color: var(--rxca-ink);
	font-size: 15px;
	line-height: 1.55;
}

.rxca-wrap *,
.rxca-wrap *::before,
.rxca-wrap *::after {
	box-sizing: border-box;
}

/* ---------- download box ---------- */

.rxca-download {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	background: var(--rxca-green-soft);
	border: 1px solid var(--rxca-line);
	border-left: 5px solid var(--rxca-green);
	border-radius: var(--rxca-radius);
	padding: 16px 18px;
	margin-bottom: 26px;
}

.rxca-download__text {
	margin: 0;
	flex: 1 1 320px;
	color: var(--rxca-muted);
}

/* ---------- buttons ---------- */

.rxca-btn {
	display: inline-block;
	border-radius: 999px;
	padding: 11px 22px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	line-height: 1.3;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rxca-btn--solid {
	background: var(--rxca-green);
	color: #fff;
	border-color: var(--rxca-green);
}

.rxca-btn--solid:hover,
.rxca-btn--solid:focus {
	background: var(--rxca-green-dark);
	border-color: var(--rxca-green-dark);
	color: #fff;
}

.rxca-btn--ghost {
	background: #fff;
	color: var(--rxca-green);
	border-color: var(--rxca-green);
}

.rxca-btn--ghost:hover,
.rxca-btn--ghost:focus {
	background: var(--rxca-green);
	color: #fff;
}

/* ---------- alerts ---------- */

.rxca-alert {
	border-radius: var(--rxca-radius);
	padding: 18px 20px;
	margin-bottom: 24px;
	border: 1px solid;
}

.rxca-alert--error {
	background: #fdf0ef;
	border-color: #f0c4c1;
	color: var(--rxca-error);
}

.rxca-alert--error ul {
	margin: 8px 0 0 18px;
	list-style: disc;
}

.rxca-alert--success {
	background: var(--rxca-green-soft);
	border-color: #a8d5bb;
	color: #14532d;
}

.rxca-alert--success h3 {
	margin-top: 0;
}

.rxca-success__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 0;
}

.rxca-ref {
	font-family: Consolas, Monaco, monospace;
	font-size: 18px;
	letter-spacing: .5px;
}

/* ---------- form ---------- */

.rxca-section {
	border: 1px solid var(--rxca-line);
	border-radius: var(--rxca-radius);
	padding: 22px 22px 8px;
	margin: 0 0 22px;
	background: var(--rxca-green-card);
	box-shadow: inset 0 4px 0 var(--rxca-green);
	min-width: 0;
}

.rxca-section__legend {
	font-size: 17px;
	font-weight: 700;
	padding: 5px 16px;
	margin-left: -8px;
	color: #fff;
	background: var(--rxca-green);
	border-radius: 999px;
}

.rxca-section__intro {
	margin: 0 0 18px;
	color: var(--rxca-muted);
}

.rxca-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--rxca-gap);
}

.rxca-field {
	min-width: 0;
	margin-bottom: 14px;
}

.rxca-field--full {
	grid-column: 1 / -1;
}

.rxca-label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.rxca-req {
	color: var(--rxca-error);
}

.rxca-field input[type="text"],
.rxca-field input[type="email"],
.rxca-field input[type="tel"],
.rxca-field input[type="number"],
.rxca-field input[type="date"],
.rxca-field select,
.rxca-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c4d2c8;
	border-radius: 8px;
	background: var(--rxca-green-tint);
	color: var(--rxca-ink);
	font-size: 15px;
	line-height: 1.4;
	font-family: inherit;
	transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.rxca-field input:hover,
.rxca-field select:hover,
.rxca-field textarea:hover {
	background: #eaf4ee;
}

.rxca-field textarea {
	resize: vertical;
}

.rxca-field input:focus,
.rxca-field select:focus,
.rxca-field textarea:focus {
	outline: none;
	border-color: var(--rxca-green);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0, 113, 60, .12);
}

.rxca-help {
	display: block;
	margin-top: 5px;
	font-size: 13px;
	color: var(--rxca-muted);
}

.rxca-radios,
.rxca-checks {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 4px;
}

.rxca-check,
.rxca-radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 500;
	cursor: pointer;
}

.rxca-check input,
.rxca-radio input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--rxca-green);
}

.rxca-disclosure {
	background: #fff;
	border: 1px solid var(--rxca-line);
	border-radius: 8px;
	padding: 14px 16px;
	font-size: 13.5px;
	color: var(--rxca-muted);
	max-height: 220px;
	overflow: auto;
	margin: 0 0 16px;
}

.rxca-conditional {
	display: none;
}

.rxca-conditional.is-open {
	display: block;
}

/* ---------- repeater ---------- */

.rxca-row {
	border: 1px dashed #c4d2c8;
	border-radius: 8px;
	padding: 14px 14px 0;
	margin-bottom: 12px;
	background: #fff;
}

.rxca-row__grid {
	display: grid;
	grid-template-columns: 2fr 2fr 1.3fr;
	gap: 12px;
}

.rxca-row__remove {
	background: none;
	border: 0;
	color: var(--rxca-error);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 0 0 10px;
	text-decoration: underline;
}

.rxca-add {
	margin-bottom: 14px;
}

.rxca-guarantor {
	border-top: 1px solid var(--rxca-line);
	padding-top: 8px;
	margin-bottom: 10px;
}

.rxca-guarantor:first-child {
	border-top: 0;
	padding-top: 0;
}

.rxca-guarantor__title {
	margin: 4px 0 10px;
	font-size: 15px;
	color: var(--rxca-green-dark);
}

/* ---------- actions ---------- */

.rxca-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 26px 0 10px;
}

.rxca-note {
	margin: 0;
	flex: 1 1 260px;
	font-size: 13px;
	color: var(--rxca-muted);
}

.rxca-hp {
	position: absolute;
	left: -9999px;
	height: 1px;
	overflow: hidden;
}

/* ---------- small screens ---------- */

@media (max-width: 782px) {
	.rxca-grid,
	.rxca-row__grid {
		grid-template-columns: 1fr;
	}

	.rxca-section {
		padding: 18px 16px 6px;
	}

	.rxca-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.rxca-btn {
		text-align: center;
	}
}
