/**
 * Uber Direct — Driver Tip widget styles.
 * Designed to fit inside the WooCommerce review-order table without
 * fighting the theme's checkout styling.
 */

.udi-tip-row.udi-tip-row--hidden { display: none; }

.udi-tip-cell {
	padding: 14px 12px !important;
	background: transparent;
	border-bottom: 1px solid #e8e8e8;
}

.udi-tip {
	font-family: inherit;
	color: #2b2b2b;
}

.udi-tip__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
	flex-wrap: wrap;
	gap: 4px;
}

.udi-tip__title {
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.2px;
}

.udi-tip__subtitle {
	font-size: 11px;
	color: #6b6b6b;
	font-weight: 400;
}

.udi-tip__options {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
	margin-bottom: 6px;
}

@media (max-width: 480px) {
	.udi-tip__options {
		grid-template-columns: repeat(3, 1fr);
	}
}

.udi-tip__btn {
	appearance: none;
	-webkit-appearance: none;
	background: #ffffff;
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	padding: 9px 6px;
	font-size: 13px;
	font-weight: 500;
	color: #2b2b2b;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: center;
	line-height: 1.2;
	min-height: 38px;
}

.udi-tip__btn:hover {
	border-color: #000;
	background: #fafafa;
}

.udi-tip__btn:focus-visible {
	outline: 2px solid #000;
	outline-offset: 1px;
}

.udi-tip__btn.is-active {
	background: #000;
	border-color: #000;
	color: #fff;
}

.udi-tip__btn.is-active .udi-tip__pct { color: #fff; }

.udi-tip__pct { font-weight: 600; }

.udi-tip__btn--custom { font-style: normal; }

.udi-tip__custom {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease, margin 0.2s ease;
	margin-top: 0;
}

.udi-tip__custom.is-open {
	max-height: 80px;
	margin-top: 8px;
}

.udi-tip__custom-input-wrap {
	display: flex;
	align-items: stretch;
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.udi-tip__currency {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	background: #f4f4f4;
	font-size: 13px;
	color: #555;
	border-right: 1px solid #e0e0e0;
}

.udi-tip__custom-input {
	flex: 1;
	border: 0;
	padding: 9px 10px;
	font-size: 14px;
	outline: none;
	background: transparent;
	min-width: 0;
	width: 100%;
}

.udi-tip__custom-input:focus { outline: none; }

.udi-tip__custom-apply {
	appearance: none;
	border: 0;
	border-left: 1px solid #e0e0e0;
	background: #000;
	color: #fff;
	padding: 0 14px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease;
}

.udi-tip__custom-apply:hover { background: #333; }

.udi-tip__summary {
	margin-top: 8px;
	font-size: 12px;
	color: #555;
	text-align: right;
}

.udi-tip__summary .amount {
	font-weight: 600;
	color: #2b2b2b;
}

/* Subtle loading state while AJAX is in flight.
 * Note: do NOT use `pointer-events: none` here — if the loading state
 * ever gets stuck (block-based checkout, updated_checkout never firing),
 * the buttons would be permanently dead. A dim opacity is enough visual
 * feedback without blocking input.
 */
.udi-tip.is-loading { opacity: 0.65; }
