/* Form to PDF — scoped under .f2p-wrap */

.f2p-wrap {
	max-width: 860px;
	margin: 0 auto;
	font-size: 15px;
	color: #1f2933;
}

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

.f2p-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* Success card */
.f2p-success {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	padding: 24px 26px;
	margin-bottom: 24px;
	background: linear-gradient(180deg, #f0f9f1 0%, #e6f4ea 100%);
	border: 1px solid #abdec2;
	border-left: 5px solid #2e7d43;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(16, 24, 40, 0.05);
}
.f2p-success-icon {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #2e7d43;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.f2p-success-icon svg {
	width: 24px;
	height: 24px;
}
.f2p-success-title {
	margin: 2px 0 6px;
	font-size: 18px;
	line-height: 1.3;
	color: #1e4620;
}
.f2p-success-text {
	margin: 0 0 10px;
	color: #2f4a33;
	font-size: 14.5px;
	line-height: 1.55;
}
.f2p-success-steps {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}
.f2p-success-steps li {
	position: relative;
	padding-left: 24px;
	margin: 4px 0;
	color: #2f4a33;
	font-size: 14px;
	line-height: 1.5;
}
.f2p-success-steps li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 6px;
	width: 9px;
	height: 5px;
	border-left: 2px solid #2e7d43;
	border-bottom: 2px solid #2e7d43;
	transform: rotate(-45deg);
}
.f2p-success-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 8px;
}
.f2p-success-ref {
	display: inline-block;
	background: #2e7d43;
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.4px;
	padding: 4px 10px;
	border-radius: 6px;
}
.f2p-success-time {
	color: #4c6b52;
	font-size: 13px;
}
.f2p-success-note {
	margin: 6px 0 0;
	padding: 8px 12px;
	background: #fff7e0;
	border: 1px solid #f0db9a;
	border-radius: 6px;
	color: #7a5b00;
	font-size: 13px;
	line-height: 1.5;
}
.f2p-success-more {
	margin: 8px 0 0;
	color: #57765e;
	font-size: 13px;
	font-style: italic;
}
.f2p-success-warning {
	background: linear-gradient(180deg, #fdf8ec 0%, #fdf4dd 100%);
	border-color: #f0db9a;
	border-left-color: #b8860b;
}
.f2p-success-warning .f2p-success-icon {
	background: #b8860b;
}
.f2p-success-warning .f2p-success-title {
	color: #6d5200;
}
.f2p-success-warning .f2p-success-text,
.f2p-success-warning .f2p-success-steps li {
	color: #6d5a26;
}
@media (max-width: 560px) {
	.f2p-success {
		flex-direction: column;
		padding: 20px;
	}
}

/* Alerts */
.f2p-alert {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 20px;
	border: 1px solid transparent;
}
.f2p-alert-error {
	background: #fdecea;
	border-color: #f5c6c2;
	color: #8a1f16;
}
.f2p-alert-success {
	background: #e6f4ea;
	border-color: #abdec2;
	color: #1e4620;
}

/* Sections */
.f2p-section {
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	padding: 22px 24px;
	margin-bottom: 18px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.f2p-section-title {
	margin: 0 0 14px;
	font-size: 18px;
	line-height: 1.3;
	color: #101828;
	padding-bottom: 10px;
	border-bottom: 1px solid #eef1f5;
}
.f2p-section-intro {
	margin: -6px 0 16px;
	color: #55606e;
	font-size: 14px;
	line-height: 1.5;
}

/* Grid */
.f2p-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 22px;
}
@media (max-width: 640px) {
	.f2p-grid {
		grid-template-columns: 1fr;
	}
}

/* Fields */
.f2p-field {
	min-width: 0;
}
.f2p-field.f2p-hidden {
	display: none;
}
.f2p-label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	color: #344054;
}
.f2p-required::after {
	content: " *";
	color: #d92d20;
}
.f2p-hint {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: #7a8494;
}
.f2p-error {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: #b42318;
	font-weight: 600;
}
.f2p-has-error input,
.f2p-has-error textarea {
	border-color: #f04438 !important;
}

.f2p-field input[type="text"],
.f2p-field input[type="email"],
.f2p-field input[type="url"],
.f2p-field input[type="date"],
.f2p-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font-size: 15px;
	color: #1f2933;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.f2p-field input:focus,
.f2p-field textarea:focus {
	outline: none;
	border-color: #1849a9;
	box-shadow: 0 0 0 3px rgba(24, 73, 169, 0.12);
}

/* Radio / checkbox */
.f2p-yesno {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}
.f2p-yesno legend {
	padding: 0 0 8px;
}
.f2p-choices {
	display: flex;
	gap: 22px;
}
.f2p-choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 15px;
}
.f2p-choice input[type="radio"],
.f2p-check input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #1849a9;
	flex: none;
}
.f2p-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14.5px;
	line-height: 1.5;
	color: #344054;
}
.f2p-check input {
	margin-top: 3px;
}

/* Wide fields take the full row */
.f2p-field.f2p-type-textarea,
.f2p-field.f2p-type-radio_yesno,
.f2p-field.f2p-type-checkbox {
	grid-column: 1 / -1;
}

/* Submit */
.f2p-submit {
	text-align: center;
	padding: 8px 0 26px;
}
.f2p-actions {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}
.f2p-button {
	/* 16/10: palette FIS — submit = CTA cam, preview = viền Navy (trước đây xanh #1849a9 ngoài bảng màu) */
	display: inline-block;
	min-width: 220px;
	background: #FF7D44;
	color: #fff;
	border: 1px solid #FF7D44;
	border-radius: 8px;
	padding: 13px 34px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}
.f2p-button:hover,
.f2p-button:focus {
	background: #1D2B4F;
	border-color: #1D2B4F;
}
.f2p-button:active {
	transform: translateY(1px);
}
.f2p-button-secondary {
	background: #fff;
	color: #1D2B4F;
	border-color: #1D2B4F;
}
.f2p-button-secondary:hover,
.f2p-button-secondary:focus {
	background: #EAF5FB;
	color: #1D2B4F;
	border-color: #1D2B4F;
}
@media (max-width: 640px) {
	.f2p-actions .f2p-button { width: 100%; min-width: 0; }
}
.f2p-submit-note {
	margin: 12px auto 0;
	font-size: 13px;
	color: #7a8494;
	max-width: 480px;
}

/* Review modal (sign only after seeing the draft) */
.f2p-modal[hidden] { display: none; }
body.f2p-modal-open { overflow: hidden; }

.f2p-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.f2p-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, 0.6);
	backdrop-filter: blur(2px);
}
.f2p-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 12px;
	width: min(880px, 100%);
	height: min(86vh, 760px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(16, 24, 40, 0.35);
}
.f2p-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	border-bottom: 1px solid #e4e7ec;
	color: #193963;
	font-size: 15.5px;
}
.f2p-modal-close {
	background: none;
	border: 0;
	font-size: 24px;
	line-height: 1;
	color: #667085;
	cursor: pointer;
	padding: 0 4px;
}
.f2p-modal-close:hover { color: #1f2933; }

.f2p-modal-body {
	flex: 1;
	position: relative;
	background: #f4f6f8;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.f2p-modal-body iframe {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	border: 0;
	display: block;
	background: #fff;
}
.f2p-modal-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #55606e;
	font-size: 14.5px;
	font-style: italic;
	z-index: 1;
}
.f2p-modal-fallback {
	flex: none;
	margin: 0;
	padding: 8px 14px;
	font-size: 12.5px;
	color: #7a8494;
	background: #fff;
	border-top: 1px solid #eef1f5;
}
.f2p-modal-fallback a { color: #1849a9; }

.f2p-modal-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 20px;
	border-top: 1px solid #e4e7ec;
	flex-wrap: wrap;
}
.f2p-modal-note {
	font-size: 12.5px;
	color: #7a8494;
	max-width: 380px;
}
.f2p-modal-actions {
	display: flex;
	gap: 10px;
}
.f2p-modal-actions .f2p-button {
	padding: 11px 24px;
	font-size: 14.5px;
}

@media (max-width: 640px) {
	.f2p-modal { padding: 0; }
	.f2p-modal-dialog {
		border-radius: 0;
		width: 100%;
		height: 100%;
	}
	.f2p-modal-foot { flex-direction: column-reverse; align-items: stretch; }
	.f2p-modal-actions { justify-content: stretch; }
	.f2p-modal-actions .f2p-button { flex: 1; }
}
