﻿/* --- Full width: give the form + preview the whole row --- */
	body.page-template-content-contract-form-php #primary.content-area {
		width: 100%;
		max-width: 100%;
		flex: 0 0 100%;
	}
	body.page-template-content-contract-form-php #secondary {
		display: none;
	}
	body.page-template-content-contract-form-php .entry-content {
		max-width: min(1680px, 95vw);
		margin-left: auto;
		margin-right: auto;
	}
	/* Let the theme container use the available width on this template */
	body.page-template-content-contract-form-php .container {
		max-width: min(1720px, 96vw);
		width: 100%;
	}

	/* --- Moderate visual refresh (brand colours unchanged: #582488) --- */
	body.page-template-content-contract-form-php .gform_wrapper .gsection {
		border-bottom: 2px solid #582488;
		margin: 1.75rem 0 1.1rem;
		padding-bottom: .45rem;
	}
	body.page-template-content-contract-form-php .gform_wrapper .gsection_title,
	body.page-template-content-contract-form-php .gform_wrapper .gsection .gfield_label {
		color: #582488;
		font-weight: 700;
	}
	body.page-template-content-contract-form-php .gform_wrapper .gfield_label {
		font-weight: 600;
	}
	body.page-template-content-contract-form-php .gform_wrapper .gfield {
		margin-bottom: .35rem;
	}
	body.page-template-content-contract-form-php .gform_wrapper input[type="text"],
	body.page-template-content-contract-form-php .gform_wrapper input[type="email"],
	body.page-template-content-contract-form-php .gform_wrapper input[type="tel"],
	body.page-template-content-contract-form-php .gform_wrapper input[type="number"],
	body.page-template-content-contract-form-php .gform_wrapper input[type="date"],
	body.page-template-content-contract-form-php .gform_wrapper input[type="password"],
	body.page-template-content-contract-form-php .gform_wrapper select,
	body.page-template-content-contract-form-php .gform_wrapper textarea {
		border: 1px solid #d8d2e2;
		border-radius: 8px;
		padding: .6rem .75rem;
		transition: border-color .15s ease, box-shadow .15s ease;
	}
	body.page-template-content-contract-form-php .gform_wrapper input[type="text"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper input[type="email"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper input[type="tel"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper input[type="number"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper input[type="date"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper input[type="password"]:focus,
	body.page-template-content-contract-form-php .gform_wrapper select:focus,
	body.page-template-content-contract-form-php .gform_wrapper textarea:focus {
		border-color: #582488;
		box-shadow: 0 0 0 3px rgba(88, 36, 132, .15);
		outline: none;
	}

	/* --- Submit button --- */
	body.page-template-content-contract-form-php .gform_footer input[type="submit"],
	body.page-template-content-contract-form-php .gform_footer button.gform_button {
		background: #582488;
		border: none;
		border-radius: 10px;
		padding: .85rem 2.1rem;
		font-weight: 600;
		color: #fff;
		transition: background .15s ease, transform .05s ease;
	}
	body.page-template-content-contract-form-php .gform_footer input[type="submit"]:hover,
	body.page-template-content-contract-form-php .gform_footer button.gform_button:hover {
		background: #4a1e73;
	}
	body.page-template-content-contract-form-php .gform_footer input[type="submit"]:active,
	body.page-template-content-contract-form-php .gform_footer button.gform_button:active {
		transform: translateY(1px);
	}

	/* --- PDF preview as a card --- */
	body.page-template-content-contract-form-php .gfield:has(.gpdf-previewer-wrapper) {
		background: #ffffff;
		border: 1px solid #e7e2ef;
		border-radius: 14px;
		padding: 18px 18px 20px;
		box-shadow: 0 10px 30px rgba(88, 36, 132, .08);
	}
	body.page-template-content-contract-form-php .gpdf-previewer-wrapper iframe,
	body.page-template-content-contract-form-php .gpdf-previewer-wrapper canvas {
		width: 100% !important;
		border-radius: 8px;
	}

	/* --- Two-column layout on desktop: fields left, PDF preview sticky right --- */
	@media (min-width: 992px) {
		body.page-template-content-contract-form-php .gform_fields {
			display: grid !important;
			grid-template-columns: minmax(0, 640px) minmax(0, 1fr) !important;
			column-gap: 3rem !important;
			row-gap: 0 !important;
			align-items: start;
		}
		body.page-template-content-contract-form-php .gform_fields > .gfield {
			grid-column: 1 !important;
			max-width: 100%;
			margin-bottom: 1.35rem !important;
		}
		body.page-template-content-contract-form-php .gform_fields > .gfield:has(.gpdf-previewer-wrapper) {
			grid-column: 2 !important;
			grid-row: 1 / span 200 !important;
			position: sticky;
			top: 90px;
			align-self: start;
			margin-bottom: 0 !important;
		}
		body.page-template-content-contract-form-php .gpdf-previewer-wrapper {
			max-height: calc(100vh - 140px);
			overflow: auto;
		}
	}