/**
 * Silenthought — Large Format Printing Calculator (LF-001)
 * @package Silenthought
 */

/* ── Wrapper ─────────────────────────────────────────────────────── */
.lf-calculator {
	margin: 24px 0;
	font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* ── Header ──────────────────────────────────────────────────────── */
.lf-header {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	padding-bottom: 16px;
	border-bottom: 1.5px solid var(--color-gray-200, #e5e5e5);
	margin-bottom: 4px;
}

/* ── Steps ───────────────────────────────────────────────────────── */
.lf-step {
	padding: 16px 0;
	border-bottom: 1px solid var(--color-gray-100, #f5f5f5);
}

.lf-step-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .7px;
	color: #374151;
	margin-bottom: 14px;
}

.lf-step-num {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--color-black, #000);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.lf-step-hint {
	font-weight: 400;
	font-size: 10px;
	text-transform: none;
	letter-spacing: 0;
	color: #9ca3af;
	margin-left: auto;
}

/* ── Type buttons ─────────────────────────────────────────────────── */
.lf-type-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.lf-type-btn {
	padding: 10px 22px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #374151;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: var(--font-body, 'DM Sans', sans-serif);
	transition: border-color .15s, background .15s, color .15s;
}

.lf-type-btn:hover {
	border-color: #9ca3af;
}

.lf-type-btn.is-active {
	border-color: var(--color-black, #000);
	background: var(--color-black, #000);
	color: #fff;
}

/* ── Size panels ─────────────────────────────────────────────────── */
.lf-size-panel {
	display: none;
}

.lf-size-panel.is-visible {
	display: block;
}

.lf-size-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 8px;
}

.lf-size-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 10px 12px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	font-family: var(--font-body, 'DM Sans', sans-serif);
	transition: border-color .15s, background .15s;
}

.lf-size-btn:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

.lf-size-btn.is-active {
	border-color: var(--color-black, #000);
	background: #f0fdf4;
}

.lf-size-dim {
	font-size: 13px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 3px;
}

.lf-size-price {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-primary, #dc2626);
}

.lf-size-unit {
	font-size: 10px;
	color: #9ca3af;
	margin-top: 2px;
}

/* ── Quantity ────────────────────────────────────────────────────── */
.lf-qty-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lf-qty-spin {
	width: 34px;
	height: 34px;
	border: 1.5px solid #e5e7eb;
	border-radius: 6px;
	background: #f9fafb;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color .15s, background .15s;
}

.lf-qty-spin:hover {
	border-color: #9ca3af;
	background: #f3f4f6;
}

.lf-qty-input {
	width: 54px;
	height: 34px;
	border: 1.5px solid #e5e7eb;
	border-radius: 6px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	-moz-appearance: textfield;
}

.lf-qty-input::-webkit-inner-spin-button,
.lf-qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.lf-qty-unit {
	font-size: 13px;
	color: #6b7280;
}

/* ── Design buttons ──────────────────────────────────────────────── */
.lf-design-row {
	display: flex;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.lf-design-method-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #374151;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	flex: 1;
	min-width: 140px;
	justify-content: center;
	font-family: var(--font-body, 'DM Sans', sans-serif);
	transition: border-color .15s, background .15s;
}

.lf-design-method-btn:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

.lf-design-method-btn.is-active {
	border-color: var(--color-black, #000);
	background: var(--color-black, #000);
	color: #fff;
}

/* ── Canva area ──────────────────────────────────────────────────── */
.lf-canva-area {
	background: #f9fafb;
	border: 1.5px dashed #d1d5db;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
}

.lf-canva-container {
	min-height: 60px;
}

/* ── Upload area ─────────────────────────────────────────────────── */
.lf-upload-area {
	background: #f9fafb;
	border: 1.5px dashed #d1d5db;
	border-radius: 8px;
	padding: 20px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.lf-upload-area:hover,
.lf-upload-area.lf-dragover {
	border-color: #6b7280;
	background: #f3f4f6;
}

.lf-upload-icon {
	font-size: 28px;
	margin-bottom: 6px;
}

.lf-upload-text {
	font-size: 13px;
	color: #374151;
	margin: 0 0 4px;
}

.lf-area-hint {
	font-size: 11px;
	color: #9ca3af;
	margin: 0 0 10px;
}

.lf-upload-prog {
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
	margin: 8px auto;
	max-width: 200px;
}

.lf-upload-bar {
	height: 100%;
	background: var(--color-black, #000);
	width: 0%;
	transition: width .2s;
}

.lf-upload-fname {
	font-size: 12px;
	color: #374151;
	margin: 6px 0 0;
	word-break: break-all;
}

.lf-file-label {
	display: inline-block;
	padding: 7px 16px;
	background: var(--color-black, #000);
	color: #fff;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 8px;
}

.lf-design-note {
	font-size: 11px;
	color: #9ca3af;
	margin: 10px 0 0;
	text-align: center;
}

/* ── Error ───────────────────────────────────────────────────────── */
.lf-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 12px;
}

/* ── Summary ─────────────────────────────────────────────────────── */
.lf-summary {
	margin: 16px 0 0;
	background: #f9fafb;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 16px;
}

.lf-summary-head {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .7px;
	color: #6b7280;
	margin-bottom: 8px;
}

.lf-summary-text {
	font-size: 13px;
	color: #374151;
	margin: 0 0 10px;
	line-height: 1.6;
}

.lf-summary-footer {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-top: 1px solid #e5e7eb;
	padding-top: 10px;
}

.lf-summary-label {
	font-size: 13px;
	color: #6b7280;
	font-weight: 600;
}

.lf-summary-total {
	font-size: 22px;
	font-weight: 800;
	color: #111827;
}

/* ── Add to Cart ─────────────────────────────────────────────────── */
.lf-atc {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 20px;
	background: var(--color-black, #000);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 14px;
	font-family: var(--font-body, 'DM Sans', sans-serif);
	transition: opacity .15s;
}

.lf-atc:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.lf-atc:not(:disabled):hover {
	opacity: .85;
}

.lf-atc.lf-atc--success {
	background: #16a34a;
	opacity: 1;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.lf-size-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}

	.lf-design-method-btn {
		min-width: unset;
		padding: 10px 14px;
		font-size: 13px;
	}

	.lf-type-btn {
		padding: 8px 16px;
		font-size: 13px;
	}
}
