/* Frontend Conversational Form Styles */

.tfc-form-wrapper {
	position: relative;
	min-height: 500px;
	background: var(--tfc-bg, linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%));
	color: var(--tfc-text, #fff);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.tfc-progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--tfc-border-soft, rgba(255, 255, 255, 0.15));
	z-index: 10;
}

.tfc-progress-fill {
	height: 100%;
	background: var(--tfc-accent, #e94560);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 0 2px 2px 0;
}

.tfc-form-container {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 24px 80px;
	position: relative;
	min-height: inherit;
}

.tfc-screen {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% + 20px));
	width: 100%;
	max-width: 720px;
	padding: 0 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
	pointer-events: none;
	z-index: 1;
}

.tfc-screen.tfc-active {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	z-index: 3;
}

.tfc-screen.tfc-exiting {
	opacity: 0;
	transform: translate(-50%, calc(-50% - 20px));
}

.tfc-screen-inner {
	text-align: left;
}

.tfc-title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 16px;
	color: var(--tfc-text, #fff);
}

.tfc-description {
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--tfc-text-muted, rgba(255, 255, 255, 0.75));
	margin: 0 0 32px;
	max-width: 540px;
}

.tfc-question-description {
	margin-top: -8px;
	margin-bottom: 24px;
	font-size: 1rem;
	line-height: 1.65;
}

.tfc-question-number {
	font-size: 0.875rem;
	color: var(--tfc-accent, #e94560);
	font-weight: 600;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.tfc-input,
.tfc-textarea,
.tfc-select {
	width: 100%;
	max-width: 540px;
	background: transparent;
	border: none;
	border-bottom: 2px solid var(--tfc-border, rgba(255, 255, 255, 0.3));
	color: var(--tfc-text, #fff);
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	padding: 12px 0;
	outline: none;
	transition: border-color 0.2s ease;
	font-family: inherit;
}

.tfc-input::placeholder,
.tfc-textarea::placeholder {
	color: var(--tfc-text-subtle, rgba(255, 255, 255, 0.4));
}

.tfc-input:focus,
.tfc-textarea:focus,
.tfc-select:focus {
	border-bottom-color: var(--tfc-accent, #e94560);
}

.tfc-textarea {
	min-height: 120px;
	resize: vertical;
}

.tfc-select {
	cursor: pointer;
	appearance: none;
	background-color: transparent;
	background-image: linear-gradient(45deg, transparent 50%, var(--tfc-text, #fff) 50%), linear-gradient(135deg, var(--tfc-text, #fff) 50%, transparent 50%);
	background-repeat: no-repeat;
	background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
	background-size: 5px 5px, 5px 5px;
	padding-right: 28px;
}

.tfc-select option {
	background: #ffffff;
	color: #1a1a1a;
}

.tfc-choices {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	max-width: 540px;
}

.tfc-choice {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	margin-bottom: 8px;
	border: 2px solid var(--tfc-border-soft, rgba(255, 255, 255, 0.2));
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 1.125rem;
}

.tfc-choice:hover,
.tfc-choice.tfc-selected {
	border-color: var(--tfc-accent, #e94560);
	background: var(--tfc-accent-soft, rgba(233, 69, 96, 0.1));
}

.tfc-choice-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--tfc-border, rgba(255, 255, 255, 0.4));
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

.tfc-yesno {
	display: flex;
	gap: 16px;
	margin-top: 16px;
}

.tfc-yesno-btn {
	flex: 1;
	max-width: 200px;
	padding: 16px 24px;
	font-size: 1.125rem;
	font-weight: 600;
	border: 2px solid var(--tfc-border, rgba(255, 255, 255, 0.3));
	border-radius: 6px;
	background: transparent;
	color: var(--tfc-text, #fff);
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.tfc-yesno-btn:hover,
.tfc-yesno-btn.tfc-selected {
	border-color: var(--tfc-accent, #e94560);
	background: var(--tfc-accent-soft-strong, rgba(233, 69, 96, 0.15));
}

.tfc-file-upload {
	margin-top: 16px;
}

.tfc-file-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: 2px dashed var(--tfc-border, rgba(255, 255, 255, 0.3));
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.2s ease;
	font-size: 1rem;
}

.tfc-file-label:hover {
	border-color: var(--tfc-accent, #e94560);
}

.tfc-file-input {
	display: none;
}

.tfc-file-name {
	margin-top: 8px;
	font-size: 0.875rem;
	color: var(--tfc-text-muted, rgba(255, 255, 255, 0.6));
}

.tfc-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.tfc-btn-primary {
	background: var(--tfc-accent, #e94560);
	color: #fff;
	margin-top: 24px;
}

.tfc-btn-primary:hover {
	background: var(--tfc-accent-hover, #d63851);
	transform: translateY(-1px);
}

.tfc-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.tfc-error {
	color: #ff6b6b;
	font-size: 0.875rem;
	margin-top: 8px;
}

.tfc-thankyou-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--tfc-accent, #e94560);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	margin-bottom: 24px;
}

.tfc-next-btn {
	display: none;
}

.tfc-form-wrapper.tfc-submitting .tfc-keyboard-hint {
	opacity: 0.8;
}

.tfc-keyboard-hint {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.8125rem;
	color: var(--tfc-text-subtle, rgba(255, 255, 255, 0.4));
	text-align: center;
}

.tfc-questions {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 2;
}

.tfc-questions .tfc-question-screen {
	position: relative;
	top: auto;
	left: auto;
	transform: translateY(20px);
	width: 100%;
	max-width: 720px;
	padding: 0 24px;
}

.tfc-questions .tfc-question-screen.tfc-active {
	transform: translateY(0);
	pointer-events: auto;
}

.tfc-questions .tfc-question-screen.tfc-exiting {
	transform: translateY(-20px);
}

@media (max-width: 600px) {
	.tfc-form-container {
		padding: 48px 16px 72px;
	}

	.tfc-yesno {
		flex-direction: column;
	}

	.tfc-yesno-btn {
		max-width: 100%;
	}
}

/* Fullscreen mode when embedded standalone */
.tfc-form-wrapper.tfc-fullscreen {
	min-height: 100vh;
	border-radius: 0;
}
