.ftoi-form-wrap {
	max-width: 900px;
	margin: 0 auto;
	--ftoi-green: #6eb43e;
	--ftoi-green-dark: #588f30;
}

.ftoi-form-wrap fieldset {
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	padding: 1.25em 1.5em 1.5em;
	margin: 0 0 1.5em;
}

.ftoi-form-wrap legend {
	font-weight: 600;
	font-size: 1.1em;
	padding: 0 0.5em;
}

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

.ftoi-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: flex-end;
}

.ftoi-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1em;
	flex: 1 1 170px;
}

.ftoi-field label {
	font-weight: 600;
	margin-bottom: 0.35em;
}

.ftoi-form-wrap .ftoi-field select,
.ftoi-form-wrap .ftoi-field input[type="text"],
.ftoi-form-wrap .ftoi-field input[type="email"],
.ftoi-form-wrap .ftoi-field input[type="tel"],
.ftoi-form-wrap .ftoi-field input[type="number"],
.ftoi-form-wrap .ftoi-field textarea {
	display: block !important;
	box-sizing: border-box !important;
	width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 2.85em !important;
	margin: 0 !important;
	padding: 0.6em 0.7em !important;
	border: 1px solid #b5b5b5 !important;
	border-radius: 4px !important;
	font-size: 16px !important;
	line-height: 1.5 !important;
	font-family: inherit !important;
	vertical-align: middle !important;
}

.ftoi-form-wrap .ftoi-field textarea {
	height: auto !important;
	min-height: 5em !important;
}

.ftoi-form-wrap .ftoi-field select {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	padding-right: 2.2em !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23555' d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6em center;
	background-size: 14px;
	text-overflow: ellipsis;
}

.ftoi-form-wrap .ftoi-field select:disabled {
	background-color: #f3f3f3 !important;
	color: #888;
}

.ftoi-form-wrap .ftoi-field input.ftoi-combobox-input:disabled {
	background-color: #f3f3f3 !important;
	color: #888;
	cursor: not-allowed;
}

.ftoi-combobox {
	position: relative;
}

.ftoi-combobox-list {
	position: absolute;
	z-index: 20;
	top: calc( 100% + 4px );
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #b5b5b5;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.12 );
	max-height: 240px;
	overflow-y: auto;
}

.ftoi-combobox-option {
	padding: 0.65em 0.75em;
	cursor: pointer;
	font-size: 16px;
}

.ftoi-combobox-option.active,
.ftoi-combobox-option:hover {
	background: var( --ftoi-green );
	color: #fff;
}

.ftoi-combobox-group {
	padding: 0.4em 0.75em 0.2em;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #888;
}

.ftoi-combobox-empty {
	padding: 0.5em 0.75em;
	color: #888;
	font-style: italic;
	font-size: 14px;
}

.ftoi-field:focus-within label {
	color: var( --ftoi-green-dark );
}

.ftoi-form-wrap select:focus,
.ftoi-form-wrap input:focus,
.ftoi-form-wrap textarea:focus {
	outline: none;
	border-color: var( --ftoi-green );
	box-shadow: 0 0 0 3px rgba( 110, 180, 62, 0.25 );
}

.ftoi-field-qty {
	flex: 0 1 110px;
}

.ftoi-field-year {
	flex: 0 1 150px;
}

.ftoi-add-item-row {
	text-align: center;
	margin-top: 0.5em;
}

.ftoi-add-item-row #ftoi-add-item {
	min-width: 220px;
}

.ftoi-field-wide {
	flex: 1 1 100%;
	width: 100%;
}

.ftoi-address-block {
	margin-bottom: 1.25em;
}

.ftoi-address-block h4 {
	margin: 0 0 0.6em;
	font-size: 1em;
}

.ftoi-address-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5em;
}

.ftoi-contact {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5em;
}

.ftoi-contact legend {
	width: 100%;
}

.ftoi-items-wrap {
	margin: 1.5em 0;
}

.ftoi-items-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ftoi-items-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	margin-top: 0.5em;
}

.ftoi-items-table th,
.ftoi-items-table td {
	text-align: left;
	padding: 0.5em 0.75em;
	border-bottom: 1px solid #e0e0e0;
}

.ftoi-no-items {
	color: #666;
	font-style: italic;
}

.ftoi-total-quantity {
	font-weight: 600;
	padding: 0.5em 0.9em;
	border-radius: 4px;
	display: inline-block;
}

.ftoi-total-quantity.ftoi-total-ok {
	background: #eaf6e2;
	color: var( --ftoi-green-dark );
}

.ftoi-total-quantity.ftoi-total-short {
	background: #fbeeee;
	color: #963a3a;
}

.ftoi-remove-item {
	color: #b32d2e;
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
}

.ftoi-error {
	color: #b32d2e;
	font-weight: 600;
}

.ftoi-success-message {
	background: #edf7ed;
	border: 1px solid #86c48f;
	color: #234a24;
	padding: 1em 1.25em;
	border-radius: 6px;
	margin-bottom: 1.5em;
	font-weight: 600;
}

.ftoi-submit-row {
	margin-top: 1.5em;
}

/* Buttons */

.ftoi-form-wrap button,
.ftoi-form-wrap .button {
	font-family: inherit;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 6px;
	padding: 0.65em 1.5em;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.ftoi-form-wrap button:active {
	transform: translateY( 1px );
}

#ftoi-add-item {
	background: #fff;
	border-color: var( --ftoi-green );
	color: var( --ftoi-green-dark );
}

#ftoi-add-item:hover {
	background: var( --ftoi-green );
	color: #fff;
}

#ftoi-submit {
	background: var( --ftoi-green );
	border-color: var( --ftoi-green );
	color: #fff;
	font-size: 1.05em;
	padding: 0.75em 1.75em;
	box-shadow: 0 2px 6px rgba( 88, 143, 48, 0.35 );
}

#ftoi-submit:hover {
	background: var( --ftoi-green-dark );
	border-color: var( --ftoi-green-dark );
}

#ftoi-submit:disabled {
	background: #cfcfcf;
	border-color: #cfcfcf;
	color: #777;
	box-shadow: none;
	cursor: not-allowed;
}

/* Mobile: stack fields one per row and make the primary buttons full-width
   so everything stays comfortable to read and tap on a phone screen. */
@media ( max-width: 600px ) {
	.ftoi-form-wrap fieldset {
		padding: 1em 1em 1.25em;
	}

	.ftoi-field-row .ftoi-field,
	.ftoi-field-row .ftoi-field-qty,
	.ftoi-field-row .ftoi-field-year,
	.ftoi-address-grid .ftoi-field {
		flex: 1 1 100%;
	}

	.ftoi-add-item-row #ftoi-add-item,
	.ftoi-submit-row #ftoi-submit {
		width: 100%;
		min-width: 0;
	}
}
