/**
 * TechBBQ Input — reusable text field.
 *
 * Figma: Input (4304:12240)
 * https://www.figma.com/design/5yXrB09CMVaqf3V343o3yZ/Website-%7C-TechBBQ--Copy-?node-id=4304-12240
 *
 * Modifiers:
 * - .techbbq-input--with-icon — trailing search icon
 * - .techbbq-input--large — 64px height (Speakers page search)
 * - .techbbq-input-with-btn — email row with embedded submit button (Subscribe)
 */

.techbbq-input--large {
	--techbbq-input-height: 64px;
}

.techbbq-input {
	--techbbq-input-height: 52px;
	--techbbq-input-padding-inline: 20px;
	--techbbq-input-radius: 12px;
	--techbbq-input-gap: 8px;
	--techbbq-input-border-color: var(--techbbq-border-tertiary);
	--techbbq-input-text-color: var(--techbbq-content-primary);
	--techbbq-input-placeholder-color: var(--techbbq-content-tertiary);

	box-sizing: border-box;
	display: flex;
	gap: var(--techbbq-input-gap);
	align-items: center;
	width: 100%;
	height: var(--techbbq-input-height);
	padding: 8px var(--techbbq-input-padding-inline);
	border: 1px solid var(--techbbq-input-border-color);
	border-radius: var(--techbbq-input-radius);
	background: var(--techbbq-bg-main);
	transition:
		border-color 0.2s ease,
		opacity 0.2s ease;
}

.techbbq-input:hover {
	--techbbq-input-border-color: var(--techbbq-border-secondary);
}

.techbbq-input:focus-within {
	--techbbq-input-border-color: var(--techbbq-content-primary);
}

.techbbq-input.is-disabled {
	opacity: var(--techbbq-btn-disabled-opacity);
	pointer-events: none;
}

input.techbbq-input__control,
.techbbq-input__control {
	box-sizing: border-box;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	color: var(--techbbq-input-text-color);
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-s-size);
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: var(--techbbq-text-paragraph-letter-spacing);
	transition: none;
}

.techbbq-input__control::placeholder,
input .techbbq-input__control::placeholder{
	color: var(--techbbq-input-placeholder-color);
	opacity: 1;
}

.techbbq-input__control:focus,
input.techbbq-input__control:focus {
	outline: none;
}

.techbbq-input__control:disabled,
input.techbbq-input__control:disabled{
	cursor: not-allowed;
}

.techbbq-input__icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	color: var(--techbbq-content-tertiary);
	pointer-events: none;
}

.techbbq-input__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.techbbq-input:focus-within .techbbq-input__icon {
	color: var(--techbbq-content-secondary);
}

/* Input + submit button (Subscribe email row) */
.techbbq-input-with-btn {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	min-width: 0;
}

.techbbq-input-with-btn .techbbq-input {
	padding-right: calc(var(--techbbq-input-with-btn-submit-space, 9rem));
}

.techbbq-input-with-btn__submit {
	position: absolute;
	top: 50%;
	right: 8px;
	z-index: 1;
	transform: translateY(-50%);
}

.techbbq-input-with-btn__submit.techbbq-btn {
	min-height: 38px;
	padding: 8px 30px;
	font-size: var(--techbbq-text-paragraph-m-size);
}
