/**
 * Frontend Form Styles
 *
 * @package TokenBasedContentAccess
 * @since 1.0.0
 */

/* -------------------------------------------------------------------------- */
/*	Defensive box-sizing reset
/* -------------------------------------------------------------------------- */

.tbcpa-access-wrapper,
.tbcpa-access-wrapper *,
.tbcpa-access-wrapper *::before,
.tbcpa-access-wrapper *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------- */
/*	1. Container & Layout
/* -------------------------------------------------------------------------- */

.tbcpa-access-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tbcpa-form-container {
	background-color: #ffffff;
	padding: 2rem;
	width: 100%;
	max-width: 28rem;
	text-align: center;
	box-sizing: border-box;
}

/* Shadow mappings from old Tailwind classes */
.tbcpa-form-container.shadow-none {
	box-shadow: none;
}
.tbcpa-form-container.shadow-sm {
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.tbcpa-form-container.shadow-md {
	box-shadow:
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.tbcpa-form-container.shadow-lg {
	box-shadow:
		0 10px 15px -3px rgba(0, 0, 0, 0.1),
		0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.tbcpa-form-container.shadow-xl {
	box-shadow:
		0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.tbcpa-form-container.shadow-2xl {
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tbcpa-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1f2937;
}

.tbcpa-text {
	color: #4b5563;
	margin-bottom: 1.5rem;
	font-size: 1rem;
	line-height: 1.5;
}

.tbcpa-input {
	width: 100%;
	padding: 0.75rem;
	margin-bottom: 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	box-sizing: border-box;
	font-size: 1rem;
}

.tbcpa-input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* -------------------------------------------------------------------------- */
/*	Defensive Button Reset
/* -------------------------------------------------------------------------- */

div.tbcpa-access-wrapper .tbcpa-form-container button[type="submit"].tbcpa-btn {
	display: inline-block;
	width: 100%;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.1s ease;
	background-image: none;
	text-shadow: none;
	box-shadow: none;
	margin: 0;
}

div.tbcpa-access-wrapper .tbcpa-form-container button[type="submit"].tbcpa-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

div.tbcpa-access-wrapper .tbcpa-form-container button[type="submit"].tbcpa-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.tbcpa-msg-box {
	margin-top: 1rem;
	padding: 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	display: none; /* Hidden by default */
}

.tbcpa-msg-box.success {
	background-color: #d1fae5;
	color: #065f46;
	display: block;
}

.tbcpa-msg-box.error {
	background-color: #fee2e2;
	color: #991b1b;
	display: block;
}

.tbcpa-timer {
	font-size: 0.875rem;
	color: #6b7280;
	margin-top: 0.5rem;
	display: none;
}

/* -------------------------------------------------------------------------- */
/*	2. Utility Spacing Classes (Replaces Inline Styles)
/* -------------------------------------------------------------------------- */

.tbcpa-form-spacing {
	margin-bottom: 1.5rem;
}

.tbcpa-margin-bottom {
	margin-bottom: 1rem;
}