/* ================================================ */
/* ABC Estimates — full stylesheet                  */
/* ================================================ */

.abc-estimates {
	--abc-bg:       #0a0d13;
	--abc-bg-2:     #0d1119;
	--abc-card:     #121724;
	--abc-card-2:   #171d2c;
	--abc-border:   #1e2636;
	--abc-border-2: #2a3447;
	--abc-text:     #eaeef6;
	--abc-muted:    #93a0b5;
	--abc-dim:      #6b7689;
	--abc-orange:   #f97316;
	--abc-orange-2: #fb923c;
	--abc-green:    #22c55e;
	--abc-red:      #ef4444;
	--abc-font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
	--abc-font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--abc-radius:    14px;
	--abc-radius-sm: 10px;

	box-sizing: border-box;
	color-scheme: dark;
	width: auto;
	max-width: none !important;
	margin-left:  calc(var(--wp--style--root--padding-left,  0px) * -1);
	margin-right: calc(var(--wp--style--root--padding-right, 0px) * -1);
	padding: 32px 24px 56px;
	background:
		radial-gradient(700px 420px at 85% 0%, rgba(249, 115, 22, 0.16), transparent 65%),
		linear-gradient(180deg, var(--abc-bg-2), var(--abc-bg));
	color: var(--abc-text);
	font-family: var(--abc-font-body);
	font-size: 15px;
	line-height: 1.55;
}

.abc-estimates *,
.abc-estimates *::before,
.abc-estimates *::after { box-sizing: border-box; }

.abc-estimates a { color: inherit; text-decoration: none; }

/* ------------------------------------------------ */
/* Create panel                                     */
/* ------------------------------------------------ */

.abc-estimates .abc-create-panel {
	max-width: 1240px;
	margin: 0 auto;
	padding: 22px;
	background: var(--abc-card);
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius);
}

.abc-estimates .abc-create-head { margin-bottom: 28px; }

.abc-estimates .abc-create-head h1 {
	margin: 0 0 12px;
	color: #fff;
	font-family: var(--abc-font-display);
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.1;
}

.abc-estimates .abc-create-head p,
.abc-estimates .abc-form-section > p {
	margin: 0 0 18px;
	color: var(--abc-muted);
}

.abc-estimates .abc-form-section > p { margin-top: -8px; }

/* Line counter badge in section header */
.abc-estimates .abc-section-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.abc-estimates .abc-section-header h2 {
	margin: 0;
	color: #fff;
	font-family: var(--abc-font-display);
	font-size: 18px;
	font-weight: 700;
}

.abc-estimates .abc-line-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(249, 115, 22, 0.18);
	color: var(--abc-orange-2);
	font-size: 12px;
	font-weight: 900;
}

.abc-estimates .abc-create-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	min-height: 32px;
	color: var(--abc-muted);
	font-size: 14px;
}

.abc-estimates .abc-create-back:hover { color: var(--abc-text); }

.abc-estimates .abc-create-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ------------------------------------------------ */
/* Form sections                                    */
/* ------------------------------------------------ */

.abc-estimates .abc-form-section,
.abc-estimates .abc-estimates-empty {
	background: var(--abc-card);
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius);
}

.abc-estimates .abc-form-section { padding: 20px; }

.abc-estimates .abc-form-section h2 {
	margin: 0 0 18px;
	color: #fff;
	font-family: var(--abc-font-display);
	font-size: 18px;
	font-weight: 700;
}

.abc-estimates .abc-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

/* ------------------------------------------------ */
/* Form fields                                      */
/* ------------------------------------------------ */

.abc-estimates .abc-form-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
	min-width: 0;
}

.abc-estimates .abc-form-field span {
	color: var(--abc-muted);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.abc-estimates .abc-form-field input,
.abc-estimates .abc-form-field textarea,
.abc-estimates .abc-form-field select {
	width: 100%;
	min-height: 44px;
	padding: 12px 14px;
	border: 1px solid var(--abc-border-2);
	border-radius: var(--abc-radius-sm);
	background: rgba(10, 13, 19, 0.72);
	color: var(--abc-text);
	font-family: inherit;
	font-size: 14px;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.abc-estimates .abc-form-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2393a0b5' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 32px;
}

.abc-estimates .abc-form-field textarea {
	resize: vertical;
	min-height: 64px;
	max-height: 280px;
	field-sizing: content; /* Chrome 123+: auto-grows with content */
}

.abc-estimates .abc-form-field input:focus,
.abc-estimates .abc-form-field textarea:focus,
.abc-estimates .abc-form-field select:focus {
	outline: none;
	border-color: var(--abc-orange);
	box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18);
}

.abc-estimates .abc-form-field input[readonly] {
	color: var(--abc-muted);
	background: rgba(10, 13, 19, 0.42);
}

/* Validation error state */
.abc-estimates .abc-form-field.has-error > input,
.abc-estimates .abc-form-field.has-error > textarea,
.abc-estimates .abc-form-field.has-error > select {
	border-color: var(--abc-red);
	box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.abc-estimates .abc-form-field.has-error > span {
	color: #fca5a5;
}

/* ------------------------------------------------ */
/* Buttons                                          */
/* ------------------------------------------------ */

.abc-estimates .abc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border-radius: var(--abc-radius-sm);
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.abc-estimates .abc-btn--gold {
	border: 1px solid var(--abc-orange);
	background: var(--abc-orange);
	color: #fff;
}

.abc-estimates .abc-btn--gold:hover  { background: var(--abc-orange-2); border-color: var(--abc-orange-2); }
.abc-estimates .abc-btn--gold:active { transform: scale(0.99); }

.abc-estimates .abc-btn--ghost {
	background: transparent;
	border: 1px solid var(--abc-border-2);
	color: var(--abc-text);
}

.abc-estimates .abc-btn--ghost:hover { border-color: var(--abc-orange); color: #fff; }

.abc-estimates .abc-btn--danger {
	border: 1px solid var(--abc-red);
	background: var(--abc-red);
	color: #fff;
}

.abc-estimates .abc-btn--danger:hover  { background: #f87171; border-color: #f87171; }
.abc-estimates .abc-btn--danger:active { transform: scale(0.99); }

/* Add line — more prominent */
.abc-estimates .abc-btn--add-line {
	width: 100%;
	margin-top: 4px;
	border: 1px dashed var(--abc-border-2);
	background: transparent;
	color: var(--abc-muted);
	font-size: 13px;
	font-weight: 700;
}

.abc-estimates .abc-btn--add-line:hover {
	border-color: var(--abc-orange);
	color: var(--abc-orange);
	background: rgba(249, 115, 22, 0.06);
}

.abc-estimates .abc-btn--remove {
	color: var(--abc-muted);
	font-size: 13px;
}

.abc-estimates .abc-btn--remove:hover { border-color: var(--abc-red); color: #fca5a5; }

.abc-estimates .abc-create-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

/* ------------------------------------------------ */
/* Notices                                          */
/* ------------------------------------------------ */

.abc-estimates .abc-form-notice {
	margin-bottom: 20px;
	padding: 14px 18px;
	border-radius: var(--abc-radius-sm);
	font-weight: 800;
}

.abc-estimates .abc-form-notice--success {
	background: rgba(34, 197, 94, 0.14);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.28);
}

.abc-estimates .abc-form-notice--error {
	background: rgba(239, 68, 68, 0.14);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.28);
}

/* ------------------------------------------------ */
/* Catalog picker                                   */
/* ------------------------------------------------ */

.abc-estimates .abc-estimate-picker {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius-sm);
	background: rgba(10, 13, 19, 0.42);
}

.abc-estimates .abc-estimate-picker-column {
	display: flex;
	flex-direction: column;
	min-height: 320px;
	max-height: 520px;
	overflow: auto;
	padding: 12px;
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius-sm);
	background: var(--abc-card-2);
	scrollbar-width: thin;
	scrollbar-color: var(--abc-border-2) transparent;
	transition: opacity 0.15s;
}

.abc-estimates .abc-estimate-picker-column.is-loading { opacity: 0.45; pointer-events: none; }

.abc-estimates .abc-estimate-picker-column::-webkit-scrollbar { width: 5px; }
.abc-estimates .abc-estimate-picker-column::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: var(--abc-border-2);
}

.abc-estimates .abc-estimate-picker-column h3 {
	position: sticky;
	top: 0;
	z-index: 1;
	margin: -12px -12px 10px;
	padding: 12px;
	border-bottom: 1px solid var(--abc-border);
	background: var(--abc-card-2);
	color: #fff;
	font-family: var(--abc-font-display);
	font-size: 14px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.abc-estimates .abc-picker-count {
	flex-shrink: 0;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(249, 115, 22, 0.14);
	color: var(--abc-orange-2);
	font-size: 11px;
	font-weight: 900;
}

.abc-estimates .abc-estimate-picker-column-empty {
	margin: auto 0;
	padding: 24px 8px;
	text-align: center;
	color: var(--abc-dim);
	font-size: 13px;
}

.abc-estimates .abc-estimate-picker-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.abc-estimates .abc-estimate-picker-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	padding: 11px 12px;
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius-sm);
	background: rgba(10, 13, 19, 0.6);
	color: var(--abc-text);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.abc-estimates .abc-estimate-picker-item > span {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

.abc-estimates .abc-estimate-picker-item:hover,
.abc-estimates .abc-estimate-picker-item.is-active {
	border-color: var(--abc-orange);
	background: rgba(249, 115, 22, 0.12);
}

.abc-estimates .abc-estimate-picker-item:focus-visible {
	outline: 2px solid var(--abc-orange);
	outline-offset: 1px;
}

.abc-estimates .abc-estimate-picker-item strong {
	display: block;
	overflow-wrap: break-word;
	word-break: break-word;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
}

.abc-estimates .abc-estimate-picker-item small {
	display: block;
	margin-top: 4px;
	overflow-wrap: break-word;
	color: var(--abc-muted);
	font-size: 11px;
}

.abc-estimates .abc-estimate-picker-item em {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
	min-width: 26px;
	height: 26px;
	border-radius: 999px;
	background: rgba(249, 115, 22, 0.14);
	color: var(--abc-orange-2);
	font-style: normal;
	font-weight: 900;
}

.abc-estimates .abc-estimate-picker-item.is-added {
	border-color: rgba(34, 197, 94, 0.55);
	background: rgba(34, 197, 94, 0.12);
	cursor: not-allowed;
	opacity: 0.75;
}

.abc-estimates .abc-estimate-picker-item.is-added em {
	background: rgba(34, 197, 94, 0.16);
	color: #86efac;
	font-size: 0;
}

.abc-estimates .abc-estimate-picker-item.is-added em::before {
	content: "✓";
	font-size: 16px;
	font-weight: 900;
}

/* Scroll-snap dots */
.abc-estimates .abc-estimate-picker-dots {
	justify-content: center;
	gap: 6px;
	margin-top: -4px;
	display: none;
}

.abc-estimates .abc-estimate-picker-dots span {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--abc-border-2);
	transition: background 0.2s, transform 0.2s;
}

.abc-estimates .abc-estimate-picker-dots span.is-active {
	background: var(--abc-orange);
	transform: scale(1.3);
}

/* ------------------------------------------------ */
/* Estimate lines                                   */
/* ------------------------------------------------ */

.abc-estimates .abc-estimate-lines,
.abc-estimates .abc-estimate-adjustments {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 14px;
	counter-reset: abc-line;
}

/* Swipe wrapper */
.abc-estimates .abc-estimate-line-wrap {
	position: relative;
}

.abc-estimates .abc-estimate-line-wrap .abc-estimate-line {
	position: relative;
	z-index: 1;
	will-change: transform;
}

/* Swipe-to-remove action zone (desktop: hidden) */
.abc-estimates .abc-estimate-line-swipe-action {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	z-index: 0;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100px;
	border-radius: var(--abc-radius-sm);
	background: var(--abc-red);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0;
	transition: opacity 0.15s;
}

.abc-estimates .abc-estimate-line-swipe-action.is-visible { opacity: 1; }

/* Line card */
.abc-estimates .abc-estimate-line,
.abc-estimates .abc-estimate-adjustment {
	display: grid;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius-sm);
	background: var(--abc-card-2);
	transition: border-color 0.2s, background 0.2s;
}

.abc-estimates .abc-estimate-line {
	counter-increment: abc-line;
	grid-template-columns: minmax(240px, 2fr) 150px 120px 120px 120px 110px;
	align-items: end;
	padding-left: 52px;
}

/* Number badge via ::after */
.abc-estimates .abc-estimate-line::after {
	content: counter(abc-line);
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 5px;
	border-radius: var(--abc-radius-sm);
	border: 1px solid var(--abc-border-2);
	background: rgba(10, 13, 19, 0.6);
	color: var(--abc-muted);
	font-family: var(--abc-font-display);
	font-size: 12px;
	font-weight: 800;
	pointer-events: none;
}

/* Catalog-sourced line */
.abc-estimates .abc-estimate-line.is-added {
	border-color: rgba(34, 197, 94, 0.45);
	background:
		linear-gradient(90deg, rgba(34, 197, 94, 0.09), transparent 40%),
		var(--abc-card-2);
}

.abc-estimates .abc-estimate-line.is-added::after {
	border-color: rgba(34, 197, 94, 0.4);
	background: rgba(34, 197, 94, 0.14);
	color: #86efac;
}

/* Flash animation on add */
.abc-estimates .abc-estimate-line.abc-just-added {
	animation: abc-line-flash 1s ease;
}

@keyframes abc-line-flash {
	0%   { box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.55); }
	100% { box-shadow: 0 0 0 0   rgba(249, 115, 22, 0); }
}

/* Description toggle */
.abc-estimates .abc-line-description { grid-column: 1 / -2; }

.abc-estimates .abc-line-description-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--abc-muted);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.abc-estimates .abc-line-description-toggle:hover { color: var(--abc-orange); }

.abc-estimates .abc-line-description-field { display: none; margin-top: 8px; }
.abc-estimates .abc-line-description.is-expanded .abc-line-description-field  { display: flex; }
.abc-estimates .abc-line-description.is-expanded .abc-line-description-toggle { color: var(--abc-text); }

/* Remove button within the line */
.abc-estimates .abc-estimate-line [data-abc-remove-line] { align-self: end; }

.abc-estimates .abc-estimate-adjustment {
	grid-template-columns: 160px minmax(220px, 1fr) 140px 120px 120px;
	align-items: end;
}

/* Empty state (shown when no lines) */
.abc-estimates [data-abc-lines-empty] {
	padding: 28px 20px;
	border: 1px dashed var(--abc-border-2);
	border-radius: var(--abc-radius-sm);
	text-align: center;
	color: var(--abc-muted);
	font-size: 14px;
}

/* Generic empty state block */
.abc-estimates .abc-estimates-empty {
	padding: 30px;
	text-align: center;
}

.abc-estimates .abc-estimates-empty strong {
	display: block;
	margin: 0 0 8px;
	color: #fff;
	font-family: var(--abc-font-display);
	font-size: 22px;
	font-weight: 700;
}

.abc-estimates .abc-estimates-empty p {
	margin: 0 auto 18px;
	max-width: 620px;
	color: var(--abc-muted);
}

/* ------------------------------------------------ */
/* Tables                                           */
/* ------------------------------------------------ */

.abc-estimates .abc-portal-table-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--abc-border);
	border-radius: var(--abc-radius);
	background: var(--abc-card);
	-webkit-overflow-scrolling: touch;
}

.abc-estimates .abc-portal-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
}

.abc-estimates .abc-portal-table th,
.abc-estimates .abc-portal-table td {
	padding: 14px;
	border-bottom: 1px solid var(--abc-border);
	text-align: left;
	color: var(--abc-text);
	white-space: nowrap;
}

.abc-estimates .abc-portal-table th {
	color: var(--abc-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ------------------------------------------------ */
/* Sticky totals bar (mobile)                       */
/* ------------------------------------------------ */

.abc-estimates .abc-sticky-totals {
	display: none;
	position: sticky;
	bottom: 0;
	z-index: 5;
	margin: 24px -14px -14px;
	padding: 10px 16px;
	padding-bottom: max(10px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--abc-border-2);
	background: rgba(13, 17, 25, 0.96);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	flex-direction: column;
	gap: 5px;
}

.abc-estimates .abc-sticky-totals.is-visible { display: flex; }

.abc-estimates .abc-sticky-totals-count {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--abc-border);
	color: var(--abc-dim);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.abc-estimates .abc-sticky-totals-count strong {
	color: var(--abc-muted);
	font-weight: 800;
}

.abc-estimates .abc-sticky-totals-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.abc-estimates .abc-sticky-totals-row.is-grand {
	padding-top: 8px;
	margin-top: 2px;
	border-top: 1px solid var(--abc-border);
}

.abc-estimates .abc-sticky-totals-label {
	color: var(--abc-muted);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.abc-estimates .abc-sticky-totals-value {
	color: var(--abc-text);
	font-family: var(--abc-font-display);
	font-size: 14px;
	font-weight: 700;
}

.abc-estimates .abc-sticky-totals-value.is-big {
	font-size: 22px;
	color: #fff;
}

.abc-estimates .abc-sticky-totals-value::before {
	content: "$";
	margin-right: 2px;
	color: var(--abc-orange-2);
	font-size: 0.72em;
}

/* ------------------------------------------------ */
/* Bottom sheet confirm                             */
/* ------------------------------------------------ */

.abc-bottom-sheet {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000000;
	align-items: flex-end;
}

.abc-bottom-sheet.is-open { display: flex; }

.abc-bottom-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 7, 12, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.abc-bottom-sheet-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	padding: 8px 20px 20px;
	padding-bottom: max(20px, env(safe-area-inset-bottom));
	border-radius: 20px 20px 0 0;
	border: 1px solid var(--abc-border-2, #2a3447);
	border-bottom: 0;
	background: var(--abc-card, #121724);
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
	animation: abc-sheet-in 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes abc-sheet-in {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.abc-bottom-sheet-handle {
	width: 36px;
	height: 4px;
	border-radius: 999px;
	background: var(--abc-border-2, #2a3447);
	margin: 0 auto 18px;
}

.abc-bottom-sheet-title {
	display: block;
	margin-bottom: 6px;
	color: #fff;
	font-family: var(--abc-font-display, "Space Grotesk", sans-serif);
	font-size: 17px;
	font-weight: 700;
}

.abc-bottom-sheet-text {
	margin: 0 0 20px;
	color: var(--abc-muted, #93a0b5);
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: break-word;
}

.abc-bottom-sheet-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.abc-bottom-sheet-actions .abc-btn {
	width: 100%;
	min-height: 52px;
	font-size: 15px;
}

body.abc-modal-open { overflow: hidden; }

/* Desktop: centre as a regular dialog */
@media (min-width: 769px) {
	.abc-bottom-sheet { align-items: center; padding: 20px; }

	.abc-bottom-sheet-card {
		border-radius: 16px;
		border: 1px solid var(--abc-border-2, #2a3447);
		animation: abc-dialog-in 0.18s ease;
	}

	@keyframes abc-dialog-in {
		from { opacity: 0; transform: translateY(6px) scale(0.98); }
		to   { opacity: 1; transform: none; }
	}

	.abc-bottom-sheet-handle { display: none; }

	.abc-bottom-sheet-actions {
		flex-direction: row-reverse;
		gap: 10px;
	}

	.abc-bottom-sheet-actions .abc-btn {
		flex: 1 1 0;
		min-height: 44px;
	}
}

/* ------------------------------------------------ */
/* Responsive: tablets (≤1100px)                   */
/* ------------------------------------------------ */

@media (max-width: 1100px) {
	.abc-estimates .abc-estimate-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.abc-estimates .abc-estimate-picker-column { min-height: 240px; max-height: 380px; }

	.abc-estimates .abc-estimate-line,
	.abc-estimates .abc-estimate-adjustment { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.abc-estimates .abc-estimate-line .abc-form-field:first-of-type,
	.abc-estimates .abc-line-description { grid-column: 1 / -1; }
}

/* ------------------------------------------------ */
/* Responsive: phones (≤768px)                     */
/* ------------------------------------------------ */

@media (max-width: 768px) {
	/* Full-bleed: break out of ANY parent padding/container */
	.abc-estimates {
		position: relative;
		left: 50%;
		right: 50%;
		width: 100vw !important;
		max-width: 100vw !important;
		margin-left:  -50vw !important;
		margin-right: -50vw !important;
		padding: 16px 0 32px;
		font-size: 14px;
	}

	/* Re-apply inner horizontal padding to header area */
	.abc-estimates .abc-create-head,
	.abc-estimates .abc-create-back {
		padding-left: 16px;
		padding-right: 16px;
	}

	.abc-estimates .abc-create-panel {
		max-width: none;
		padding: 0 16px 14px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		margin: 0;
	}

	/* Extra bottom room for sticky bar */
	.abc-estimates .abc-create-panel.has-sticky-totals { padding-bottom: 120px; }

	.abc-estimates .abc-create-back  { min-height: 44px; font-size: 15px; }

	.abc-estimates .abc-form-section {
		padding: 16px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	.abc-estimates .abc-create-form { gap: 2px; }

	.abc-estimates .abc-form-grid    { grid-template-columns: 1fr; gap: 14px; }

	/* Horizontal swipeable picker */
	.abc-estimates .abc-estimate-picker {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		padding: 10px 2px 14px;
		border: 0;
		background: transparent;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scroll-padding-left: 2px;
		scrollbar-width: none;
	}
	.abc-estimates .abc-estimate-picker::-webkit-scrollbar { display: none; }

	.abc-estimates .abc-estimate-picker-column {
		flex: 0 0 88%;
		min-height: 380px;
		max-height: 440px;
		overflow-y: auto;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	.abc-estimates .abc-estimate-picker-item { min-height: 56px; padding: 13px 12px; }
	.abc-estimates .abc-estimate-picker-dots { display: flex; margin-top: -2px; }

	/* Lines: single column */
	.abc-estimates .abc-estimate-line,
	.abc-estimates .abc-estimate-adjustment {
		grid-template-columns: 1fr;
		padding: 14px;
	}

	/* Preserve left padding for number badge */
	.abc-estimates .abc-estimate-line { padding-left: 52px; }
	.abc-estimates .abc-estimate-line::after { top: 14px; left: 14px; }

	.abc-estimates .abc-estimate-line .abc-form-field:first-of-type,
	.abc-estimates .abc-line-description { grid-column: auto; }

	/* Remove button full-width */
	.abc-estimates .abc-estimate-line [data-abc-remove-line] {
		width: 100%;
		min-height: 48px;
	}

	/* Enable swipe action zone */
	.abc-estimates .abc-estimate-line-swipe-action { display: flex; }

	.abc-estimates .abc-create-actions { flex-direction: column; align-items: stretch; }
	.abc-estimates .abc-create-actions .abc-btn,
	.abc-estimates .abc-btn { min-height: 48px; }

	.abc-estimates .abc-btn--add-line { min-height: 52px; font-size: 14px; }

	.abc-estimates .abc-portal-table-wrap { border-radius: 0; }

	/* Sticky bar: full bleed, above third-party widgets */
	.abc-estimates .abc-sticky-totals {
		margin-left: -16px;
		margin-right: -16px;
		z-index: 999999;
	}
}

/* ------------------------------------------------ */
/* Responsive: small phones (≤480px)               */
/* ------------------------------------------------ */

@media (max-width: 480px) {
	.abc-estimates { padding: 14px 8px 28px; }

	.abc-estimates .abc-create-panel,
	.abc-estimates .abc-form-section { padding: 12px; }

	.abc-estimates .abc-estimate-picker-column { flex-basis: 92%; max-height: 420px; }

	/* Prevent iOS auto-zoom on input focus */
	.abc-estimates .abc-form-field input,
	.abc-estimates .abc-form-field textarea,
	.abc-estimates .abc-form-field select { font-size: 16px; }

	.abc-estimates .abc-create-head h1 { font-size: 22px; }

	.abc-estimates .abc-sticky-totals { margin-left: -12px; margin-right: -12px; }
}

/* ------------------------------------------------ */
/* Reduced motion                                   */
/* ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.abc-estimates .abc-estimate-line.abc-just-added { animation: none; }
	.abc-bottom-sheet-card { animation: none; }

	.abc-estimates .abc-btn,
	.abc-estimates .abc-estimate-picker-item,
	.abc-estimates .abc-estimate-line,
	.abc-estimates .abc-estimate-adjustment,
	.abc-estimates .abc-estimate-picker-dots span,
	.abc-estimates .abc-estimate-picker-column { transition: none; }
}


.abc-estimates .abc-estimate-form-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 22px;
	padding: 0 0 18px;
	border-bottom: 1px solid var(--abc-border);
}

.abc-estimates .abc-estimate-form-nav a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--abc-border-2);
	border-radius: var(--abc-radius-sm);
	background: rgba(10, 13, 19, 0.72);
	color: var(--abc-muted);
	font-size: 13px;
	font-weight: 800;
}

.abc-estimates .abc-estimate-form-nav a:hover {
	border-color: var(--abc-orange);
	color: #fff;
}

@media (max-width: 768px) {
	.abc-estimates .abc-estimate-form-nav {
		position: sticky;
		top: 0;
		z-index: 20;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin: 0 -16px 18px;
		padding: 12px 16px;
		background: rgba(13, 17, 25, 0.96);
		border-bottom: 1px solid var(--abc-border);
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
	}

	.abc-estimates .abc-estimate-form-nav a {
		width: 100%;
		min-height: 42px;
	}
}

@media (max-width: 480px) {
	.abc-estimates .abc-estimate-form-nav {
		margin-left: -12px;
		margin-right: -12px;
		padding-left: 12px;
		padding-right: 12px;
	}
}