/**
 * frontend-base.css
 *
 * Shared base styles for the Authenticity Verifier frontend form.
 * Includes form layout, input styling, button states, loading animation,
 * result message display, and responsive breakpoints.
 */

/* Container */
.av-verify-form-wrap {
	max-width: 480px;
	margin: 20px auto;
	padding: 0;
	box-sizing: border-box;
}

.av-verify-form-wrap * {
	box-sizing: border-box;
}

/* Form */
.av-verify-form {
	padding: 24px;
	border-radius: 8px;
	transition: all 0.3s ease;
}

/* Honeypot — visually hidden without causing horizontal scroll.
   Replaces the deprecated left:-9999px technique, which positioned the
   field 9999px off the viewport and expanded the document scrollWidth
   (producing a large horizontal scrollbar on every page with the shortcode).
   The field stays a real, submittable input (name="website") so bots that
   auto-fill form fields still get caught, while humans see nothing. */
.av-honeypot {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Title & Description */
.av-form-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center !important;
}

.av-form-description {
    margin: 0 0 16px;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    opacity: 0.85 !important;
}

/* Input */
.av-input-wrap {
	margin-bottom: 16px;
}

.av-code-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 4px;
	text-align: center;
	text-transform: uppercase;
	border: 2px solid var(--av-input-border, #ddd);
	border-radius: 6px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: var(--av-input-bg, #fff);
	color: var(--av-text-color, #333);
	/* Clean, neat, formal font stack (replaces Courier New monospace). */
	font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.av-code-input:focus {
	border-color: var(--av-input-focus, #007cba);
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}

.av-code-input::placeholder {
	color: #bbb;
	letter-spacing: 2px;
	font-weight: 400;
}

/* Button */
.av-verify-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	line-height: 1.4;
}

.av-verify-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.av-verify-btn:active {
	transform: translateY(0);
}

.av-verify-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.av-btn-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: av-spin 0.6s linear infinite;
}

/* Loading Overlay */
.av-loading {
	position: relative;
	text-align: center;
	padding: 20px 0;
}

.av-spinner {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 3px solid #e0e0e0;
	border-top-color: #007cba;
	border-radius: 50%;
	animation: av-spin 0.8s linear infinite;
}

@keyframes av-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Result */
.av-result {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	padding: 16px;
	border-radius: 6px;
	border-left: 4px solid #ddd;
	background: #f9f9f9;
	animation: av-fade-in 0.3s ease;
	direction: ltr !important;
}

.av-result-icon {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.av-result-message {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
}

@keyframes av-fade-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* RTL Support */
.av-rtl {
	direction: rtl;
	text-align: right;
}

.av-rtl .av-result {
	flex-direction: row-reverse;
	border-left: none;
	border-right: 4px solid #ddd;
}

/* Responsive */
@media (max-width: 600px) {
	.av-verify-form-wrap {
		max-width: 100%;
		margin: 12px 0;
	}

	.av-verify-form {
		padding: 16px;
	}

	.av-code-input {
		font-size: 20px;
		letter-spacing: 3px;
		padding: 10px 12px;
	}

	.av-form-title {
		font-size: 18px;
	}

	.av-result {
		padding: 12px;
	}

	.av-result-icon {
		font-size: 24px;
	}

	.av-result-message {
		font-size: 14px;
	}
}
