/* ============================================================
   Request Free Sample — Button + Modal
   Matches Bookworm theme: primary #0d1b3e, font inherit
   ============================================================ */

/* Button */
.ehub-sample-wrap {
	margin-top: 12px;
}

.ehub-sample-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: #ffffff;
	color: #0d1b3e;
	border: 2px solid #0d1b3e;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	width: 100%;
	justify-content: center;
}

.ehub-sample-btn:hover,
.ehub-sample-btn:focus {
	background: #0d1b3e;
	color: #ffffff;
	outline: none;
}

/* Modal backdrop */
.ehub-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

.ehub-modal.is-open {
	display: flex;
}

.ehub-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

/* Dialog card */
.ehub-modal-dialog {
	position: relative;
	background: #ffffff;
	border-radius: 6px;
	padding: 36px 32px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	z-index: 1;
}

/* Close button */
.ehub-modal-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px;
}

.ehub-modal-close:hover {
	color: #0d1b3e;
}

/* Headings */
.ehub-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
	color: #0d1b3e;
}

.ehub-modal-subtitle {
	margin: 0 0 24px;
	color: #555;
	font-size: 14px;
}

/* Form fields */
.ehub-field {
	margin-bottom: 18px;
}

.ehub-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.ehub-req { color: #c0392b; }
.ehub-opt { color: #888; font-weight: 400; font-size: 12px; }

.ehub-field input[type="email"],
.ehub-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	color: #333;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.ehub-field input[type="email"]:focus,
.ehub-field textarea:focus {
	border-color: #0d1b3e;
	outline: none;
	box-shadow: 0 0 0 3px rgba(13, 27, 62, 0.1);
}

.ehub-field textarea {
	resize: vertical;
}

.ehub-field-error {
	display: block;
	margin-top: 4px;
	color: #c0392b;
	font-size: 12px;
	min-height: 16px;
}

/* Submit */
.ehub-submit-wrap {
	margin-top: 8px;
}

.ehub-submit-btn {
	display: block;
	width: 100%;
	padding: 13px;
	background: #0d1b3e;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.ehub-submit-btn:hover:not(:disabled) {
	background: #1a2f60;
}

.ehub-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Success state */
.ehub-success-msg {
	text-align: center;
	padding: 16px 0;
}

.ehub-success-icon {
	width: 52px;
	height: 52px;
	background: #0d1b3e;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	margin: 0 auto 16px;
}

.ehub-success-msg p {
	color: #333;
	line-height: 1.6;
	font-size: 14px;
	margin: 0;
}

/* Mobile */
@media (max-width: 520px) {
	.ehub-modal-dialog {
		padding: 28px 20px;
		margin: 0 12px;
		max-width: 100%;
	}
}
