/* KDS Tip Block – Frontend styles */
.code-order-tip-checkout-block .code-order-tip {
	padding: 0;
	width: 100%;
}

.code-order-tip {
	padding: 24px 0 36px;
}

.code-order-tip__title {
	margin: 0 0 16px;
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
}

.code-order-tip__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: 2%;
}

.code-order-tip__row:last-child .code-order-button {
	margin-bottom: 0 !important;
}

/* Buttons */
.code-order-button--tip {
	padding: 10px 16px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #333;
	transition: all 0.15s ease;
	text-align: center;
	line-height: 1.4;
}

.code-order-button--tip:hover {
	border-color: #000;
	color: #000;
}

.code-order-button--active {
	background: var(--code-order-primary) !important;
	color: #fff !important;
	border-color: var(--code-order-primary) !important;
}

.code-order-tip__button {
	flex: auto;
	margin: 0 0 2%;
}

.code-order-tip__button--half {
	width: 49%;
}

/* Custom form */
.code-order-tip__custom-form {
	display: none;
	align-items: center;
	width: 100%;
	margin: 0;
	gap: 8px;
}

.code-order-tip__custom-form--active {
	display: flex;
	margin-top: 12px;
}

.code-order-tip__amount-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.code-order-tip__currency {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	line-height: 1;
	font-size: 13px;
	font-weight: 500;
	color: #585858;
	pointer-events: none;
	white-space: nowrap;
}

.code-order-tip__amount-wrap--left .code-order-tip__currency,
.code-order-tip__amount-wrap--left_space .code-order-tip__currency {
	left: 12px;
}

.code-order-tip__amount-wrap--right .code-order-tip__currency,
.code-order-tip__amount-wrap--right_space .code-order-tip__currency {
	right: 12px;
}

.code-order-tip__custom-form-field {
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 13px;
	box-sizing: border-box;
	-moz-appearance: textfield !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-order-tip__custom-form-field:focus {
	border-color: var(--code-order-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--code-order-primary) 15%, transparent);
	outline: none;
}

.code-order-tip__custom-form-field::-webkit-inner-spin-button,
.code-order-tip__custom-form-field::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.code-order-tip__custom-form-button {
	flex-shrink: 0;
	padding: 10px 20px;
	border: 1.5px solid var(--code-order-primary);
	border-radius: 8px;
	background: var(--code-order-primary);
	color: #fff;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.code-order-tip__custom-form-button:hover {
	background: var(--code-order-primary);
	border-color: var(--code-order-primary);
	filter: brightness(1.1);
}

.code-order-tip__percentage-form-field {
	display: none !important;
}

/* Currency position overrides – generous padding for multi-char symbols (CHF, SEK, etc.) */
.code-order-tip__amount-wrap--left .code-order-tip__custom-form-field {
	padding-left: 48px;
}

.code-order-tip__amount-wrap--left_space .code-order-tip__custom-form-field {
	padding-left: 52px;
}

.code-order-tip__amount-wrap--right .code-order-tip__custom-form-field,
.code-order-tip__amount-wrap--right_space .code-order-tip__custom-form-field {
	text-align: right;
}

.code-order-tip__amount-wrap--right .code-order-tip__custom-form-field {
	padding-right: 48px;
}

.code-order-tip__amount-wrap--right_space .code-order-tip__custom-form-field {
	padding-right: 52px;
}