/*
 * OLM Gravity Forms Price Table — navy / cream itemized table.
 *
 * Layout uses CSS table display on every part of the List field, so it looks the same
 * whether Gravity Forms / your theme draws the list with <table>, flexbox or CSS grid.
 */
.gform_wrapper .gfield.olm-price-table {
	--olm-navy: #253a5e;
	--olm-cream: #f4f1ea;
	--olm-foot: #e4eaf2;
	--olm-line: #d9d6cf;
	--olm-ink: #1f2a3d;
	--olm-muted: #6f7684;
}

/* ---------- Structure: force a real table layout ---------- */
.gform_wrapper .gfield.olm-price-table .ginput_container_list,
.gform_wrapper .gfield.olm-price-table .ginput_list {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	overflow-x: auto;
}
.gform_wrapper .gfield.olm-price-table .gfield_list_container,
.gform_wrapper .gfield.olm-price-table table.gfield_list {
	display: table !important;
	table-layout: fixed !important;
	width: 100% !important;
	min-width: 520px;
	max-width: none !important;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	border: 1px solid var(--olm-line) !important;
	margin: 0 !important;
	gap: 0 !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_list_groups,
.gform_wrapper .gfield.olm-price-table table.gfield_list tbody {
	display: table-row-group !important;
}
.gform_wrapper .gfield.olm-price-table table.gfield_list thead {
	display: table-header-group !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_list_header,
.gform_wrapper .gfield.olm-price-table .gfield_list_group,
.gform_wrapper .gfield.olm-price-table table.gfield_list tr {
	display: table-row !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	width: auto !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_header_item,
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item,
.gform_wrapper .gfield.olm-price-table .gfield_list_icons,
.gform_wrapper .gfield.olm-price-table table.gfield_list th,
.gform_wrapper .gfield.olm-price-table table.gfield_list td {
	display: table-cell !important;
	vertical-align: middle !important;
	float: none !important;
	flex: none !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	writing-mode: horizontal-tb !important;
	white-space: normal !important;
	border-right: 1px solid var(--olm-line);
}
.gform_wrapper .gfield.olm-price-table .gfield_header_item::before,
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item::before,
.gform_wrapper .gfield.olm-price-table td::before {
	display: none !important; /* some themes print the column name inside each cell on phones */
}

/* Column widths: wide description, narrow numbers, small +/– column */
.gform_wrapper .gfield.olm-price-table .gfield_header_item:nth-child(1),
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item:nth-child(1),
.gform_wrapper .gfield.olm-price-table table.gfield_list tr > :nth-child(1) { width: 47% !important; }
.gform_wrapper .gfield.olm-price-table .gfield_header_item:nth-child(2),
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item:nth-child(2),
.gform_wrapper .gfield.olm-price-table table.gfield_list tr > :nth-child(2) { width: 11% !important; }
.gform_wrapper .gfield.olm-price-table .gfield_header_item:nth-child(3),
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item:nth-child(3),
.gform_wrapper .gfield.olm-price-table table.gfield_list tr > :nth-child(3),
.gform_wrapper .gfield.olm-price-table .gfield_header_item:nth-child(4),
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item:nth-child(4),
.gform_wrapper .gfield.olm-price-table table.gfield_list tr > :nth-child(4) { width: 17% !important; }
.gform_wrapper .gfield.olm-price-table .gfield_header_item--icons,
.gform_wrapper .gfield.olm-price-table .gfield_list_icons,
.gform_wrapper .gfield.olm-price-table table.gfield_list tr > :nth-child(5) { width: 8% !important; border-right: 0 !important; }

/* ---------- Header ---------- */
.gform_wrapper .gfield.olm-price-table .gfield_list_header,
.gform_wrapper .gfield.olm-price-table table.gfield_list thead tr {
	background: var(--olm-navy) !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_header_item,
.gform_wrapper .gfield.olm-price-table table.gfield_list th {
	background: var(--olm-navy) !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
	padding: 14px 14px !important;
	text-align: center !important;
	border-right: 1px solid rgba(255, 255, 255, .35) !important;
	border-bottom: 0 !important;
	height: auto !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_header_item:first-child,
.gform_wrapper .gfield.olm-price-table table.gfield_list th:first-child { text-align: left !important; }

/* ---------- Rows ---------- */
.gform_wrapper .gfield.olm-price-table .gfield_list_group:nth-child(odd),
.gform_wrapper .gfield.olm-price-table table.gfield_list tbody tr:nth-child(odd) { background: var(--olm-cream) !important; }
.gform_wrapper .gfield.olm-price-table .gfield_list_group:nth-child(even),
.gform_wrapper .gfield.olm-price-table table.gfield_list tbody tr:nth-child(even) { background: #fff !important; }
.gform_wrapper .gfield.olm-price-table .gfield_list_group_item,
.gform_wrapper .gfield.olm-price-table .gfield_list_icons,
.gform_wrapper .gfield.olm-price-table table.gfield_list td {
	padding: 6px 8px !important;
	border-bottom: 1px solid var(--olm-line) !important;
	background: transparent !important;
}

.gform_wrapper .gfield.olm-price-table .gfield_list_group input,
.gform_wrapper .gfield.olm-price-table table.gfield_list td input {
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 40px;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 9px 10px !important;
	background: transparent !important;
	border: 1px solid transparent !important;
	border-radius: 4px !important;
	box-shadow: none !important;
	color: var(--olm-ink) !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
}
.gform_wrapper .gfield.olm-price-table .gfield_list_group input:hover { border-color: var(--olm-line) !important; background: rgba(255, 255, 255, .7) !important; }
.gform_wrapper .gfield.olm-price-table .gfield_list_group input:focus {
	border-color: var(--olm-navy) !important;
	background: #fff !important;
	outline: none !important;
}
.gform_wrapper .gfield.olm-price-table input[inputmode="numeric"] { text-align: center !important; }
.gform_wrapper .gfield.olm-price-table input[inputmode="decimal"],
.gform_wrapper .gfield.olm-price-table input.olm-gfpt-total { text-align: right !important; font-variant-numeric: tabular-nums; }
.gform_wrapper .gfield.olm-price-table input.olm-gfpt-total {
	font-weight: 700 !important;
	cursor: default;
	border-color: transparent !important;
	background: transparent !important;
}

/* + / – buttons */
.gform_wrapper .gfield.olm-price-table .gfield_list_icons { text-align: center !important; white-space: nowrap !important; }
.gform_wrapper .gfield.olm-price-table .gfield_list_icons button,
.gform_wrapper .gfield.olm-price-table .gfield_list_icons img { display: inline-block !important; vertical-align: middle; margin: 0 2px !important; }

/* ---------- Grand Total bar ---------- */
.gform_wrapper .gfield.olm-price-table .olm-gfpt-footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 28px;
	min-width: 520px;
	padding: 16px 20px;
	box-sizing: border-box;
	background: var(--olm-foot);
	border: 1px solid var(--olm-line);
	border-top: 2px solid var(--olm-navy);
	color: var(--olm-ink);
	font-variant-numeric: tabular-nums;
}
.gform_wrapper .gfield.olm-price-table .olm-gfpt-footer__label { font-weight: 700; font-size: 16px; }
.gform_wrapper .gfield.olm-price-table .olm-gfpt-footer__value { font-weight: 700; font-size: 18px; min-width: 110px; text-align: right; }

/* ---------- Phones: table scrolls sideways inside its own box ---------- */
@media (max-width: 640px) {
	.gform_wrapper .gfield.olm-price-table .gfield_header_item,
	.gform_wrapper .gfield.olm-price-table table.gfield_list th { font-size: 13px !important; padding: 12px 8px !important; }
	.gform_wrapper .gfield.olm-price-table .gfield_list_group input { font-size: 14px !important; }
	.gform_wrapper .gfield.olm-price-table .olm-gfpt-footer { gap: 14px; padding: 14px 16px; min-width: 0; }
}
