/*
 * Tana Contact Form — Styles v3
 * All selectors scoped under .tana-cf-wrapper to avoid theme conflicts.
 *
 * @package Tana_Contact_Form
 */

/* ── Reset ───────────────────────────────────────────────────────────────── */
.tana-cf-wrapper *,
.tana-cf-wrapper *::before,
.tana-cf-wrapper *::after {
	box-sizing: border-box;
}

/* ── Design tokens ───────────────────────────────────────────────────────── */
.tana-cf-wrapper {
	--tcf-red:          #e03e2d;
	--tcf-red-dark:     #c2321f;
	--tcf-red-glow:     rgba(224, 62, 45, 0.14);
	--tcf-border:       #e2e5ec;
	--tcf-border-hover: #c8cdd8;
	--tcf-text:         #1a1d23;
	--tcf-muted:        #6b7280;
	--tcf-label:        #4b5563;
	--tcf-hint:         #9ca3af;
	--tcf-bg-input:     #fafbfd;
	--tcf-radius:       10px;
	--tcf-ease:         0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Card wrapper ────────────────────────────────────────────────────────── */
.tana-cf-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	background: #ffffff;
	border-radius: 20px;
	padding: 45px 48px 48px;
	max-width: 900px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
	margin: 0 auto;
}

/* ── Two-column row ──────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* ── Field block ─────────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 20px;
}

.tana-cf-wrapper .tcf-field--full {
	/* used when placed outside a .tcf-row */
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--tcf-label);
	letter-spacing: 0.01em;
}

.tana-cf-wrapper .tcf-req {
	color: var(--tcf-red);
	margin-left: 2px;
}

/* ── Hint text ───────────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-field-hint {
	font-size: 12px;
	color: var(--tcf-hint);
	line-height: 1.4;
	margin-top: -2px;
}

/* ── Base controls ───────────────────────────────────────────────────────── */
.tana-cf-wrapper input[type="text"],
.tana-cf-wrapper input[type="email"],
.tana-cf-wrapper input[type="tel"],
.tana-cf-wrapper input[type="url"],
.tana-cf-wrapper select,
.tana-cf-wrapper textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--tcf-border);
	border-radius: var(--tcf-radius);
	font-family: inherit;
	font-size: 14px;
	color: var(--tcf-text);
	background: var(--tcf-bg-input);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition:
		border-color var(--tcf-ease),
		box-shadow   var(--tcf-ease),
		background   var(--tcf-ease);
}

.tana-cf-wrapper input::placeholder,
.tana-cf-wrapper textarea::placeholder {
	color: #b0b6c3;
}

.tana-cf-wrapper input:hover,
.tana-cf-wrapper textarea:hover,
.tana-cf-wrapper select:hover {
	border-color: var(--tcf-border-hover);
}

.tana-cf-wrapper input:focus,
.tana-cf-wrapper textarea:focus,
.tana-cf-wrapper select:focus {
	border-color: var(--tcf-red);
	box-shadow: 0 0 0 3px var(--tcf-red-glow);
	background: #fff;
}

/* ── Textarea ────────────────────────────────────────────────────────────── */
.tana-cf-wrapper textarea {
	resize: vertical;
	min-height: 120px;
	line-height: 1.6;
}

/* ── Checkboxes ──────────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-checks {
	display: flex;
	flex-direction: column;
	gap: 13px;
	margin-top: 8px;
	margin-bottom: 28px;
}

.tana-cf-wrapper .tcf-check-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	cursor: pointer;
}

.tana-cf-wrapper .tcf-check-item input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	border: 1.5px solid var(--tcf-border);
	border-radius: 5px;
	background: var(--tcf-bg-input);
	cursor: pointer;
	margin-top: 1px;
	position: relative;
	transition:
		background     var(--tcf-ease),
		border-color   var(--tcf-ease),
		box-shadow     var(--tcf-ease);
}

.tana-cf-wrapper .tcf-check-item input[type="checkbox"]:checked {
	background: var(--tcf-red);
	border-color: var(--tcf-red);
}

.tana-cf-wrapper .tcf-check-item input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(42deg);
}

.tana-cf-wrapper .tcf-check-item input[type="checkbox"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px var(--tcf-red-glow);
	border-color: var(--tcf-red);
}

.tana-cf-wrapper .tcf-check-label {
	font-size: 13.5px;
	color: var(--tcf-muted);
	line-height: 1.55;
	cursor: pointer;
	user-select: none;
}

.tana-cf-wrapper .tcf-check-label strong {
	color: var(--tcf-text);
	font-weight: 600;
}

.tana-cf-wrapper .tcf-check-label a {
	color: var(--tcf-red);
	text-decoration: none;
	font-weight: 500;
}

.tana-cf-wrapper .tcf-check-label a:hover {
	text-decoration: underline;
}

/* ── Submit row ──────────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-submit-row {
	display: flex;
	justify-content: flex-end;
}

.tana-cf-wrapper .tcf-btn-submit {
	background: var(--tcf-red);
	margin-top:-55px;
	color: #fff;
	border: none;
	padding: 14px 44px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	border-radius: var(--tcf-radius);
	cursor: pointer;
	letter-spacing: 0.01em;
	transition:
		background  var(--tcf-ease),
		transform   var(--tcf-ease),
		box-shadow  var(--tcf-ease);
}

.tana-cf-wrapper .tcf-btn-submit:hover {
	background: var(--tcf-red-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(224, 62, 45, 0.32);
}

.tana-cf-wrapper .tcf-btn-submit:active {
	transform: translateY(0);
	box-shadow: none;
}

.tana-cf-wrapper .tcf-btn-submit:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ── Feedback message ────────────────────────────────────────────────────── */
.tana-cf-wrapper .tcf-message {
	margin-top: 20px;
	padding: 13px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
}

.tana-cf-wrapper .tcf-message[hidden] {
	display: none;
}

.tana-cf-wrapper .tcf-message--success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.tana-cf-wrapper .tcf-message--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
	.tana-cf-wrapper {
		padding: 36px 24px 32px;
	}

	.tana-cf-wrapper .tcf-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.tana-cf-wrapper .tcf-btn-submit {
		width: 100%;
	}
}

/* ── Website field – https enforcement ───────────────────────────────────── */
.tana-cf-wrapper .tcf-field-error {
	display: block;
	font-size: 12px;
	color: #dc2626;
	margin-top: -2px;
	line-height: 1.4;
}

.tana-cf-wrapper .tcf-field-error[hidden] {
	display: none;
}

.tana-cf-wrapper input.tcf-input--error {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
	background: #fff;
}

.tana-cf-wrapper input.tcf-input--error:focus {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}
