.mlms-event-cert-wrap {
	font-size: 15px;
}

.mlms-cert-form-card {
	margin: 0 auto;
	background: #f8f9fa;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
	padding: 24px;
}

.mlms-cert-field {
	margin-bottom: 16px;
}

.mlms-cert-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.mlms-cert-field input[type="text"],
.mlms-cert-field input[type="email"],
.mlms-cert-field select,
.mlms-cert-field textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
	box-sizing: border-box;
}

.mlms-cert-field textarea {
	resize: vertical;
}

.mlms-cert-field-row {
	display: flex;
	gap: 16px;
}

.mlms-cert-field-row .mlms-cert-field {
	flex: 1;
}

.mlms-required {
	color: #d63638;
}

.mlms-cert-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.mlms-cert-btn {
	display: inline-block;
	padding: 10px 24px;
	background: #1d4ed8;
	color: #fff !important;
	border: none;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
}

.mlms-cert-btn:hover,
.mlms-cert-btn:focus,
.mlms-cert-btn:visited {
	background: #1e40af;
	color: #fff !important;
	text-decoration: none !important;
}

.mlms-cert-btn-secondary {
	background: #6b7280;
}

.mlms-cert-btn-secondary:hover {
	background: #4b5563;
}

.mlms-cert-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid #e5e7eb;
	border-top-color: #1d4ed8;
	border-radius: 50%;
	animation: mlms-spin 0.7s linear infinite;
	display: inline-block;
	vertical-align: middle;
}

@keyframes mlms-spin {
	to { transform: rotate(360deg); }
}

.mlms-cert-msg {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 14px;
}

.mlms-cert-msg-error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #b91c1c;
}

.mlms-cert-msg-warn {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	color: #92400e;
}

.mlms-cert-msg-success {
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #166534;
}

.mlms-cert-success-box {
	padding: 24px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 6px;
	text-align: center;
}

.mlms-cert-success-msg {
	font-size: 16px;
	color: #166534;
	margin-bottom: 16px;
}

.mlms-event-cert-notice {
	color: #6b7280;
	font-style: italic;
}

/* Event search autocomplete */
.mlms-cert-event-field {
	position: relative;
}

#mlms-cert-event-results {
	position: absolute;
	z-index: 9999;
	background: #fff;
	border: 1px solid #8c8f94;
	border-top: none;
	box-shadow: 0 4px 10px rgba(0,0,0,.12);
	max-height: 240px;
	overflow-y: auto;
	width: 100%;
	border-radius: 0 0 4px 4px;
}

.mlms-cert-sr-item {
	padding: 9px 14px;
	cursor: pointer;
	font-size: 14px;
	border-bottom: 1px solid #f0f0f1;
}

.mlms-cert-sr-item:last-child {
	border-bottom: none;
}

.mlms-cert-sr-item:hover,
.mlms-cert-sr-item:focus {
	background: #f0f6fc;
}

.mlms-cert-sr-none {
	color: #6b7280;
	cursor: default;
}

/* Selected state — text stays in the input */
#mlms-cert-event-search.mlms-cert-event-selected {
	background: #f0fdf4;
	border-color: #86efac;
	color: #166534;
	font-weight: 600;
}

#mlms-cert-event-clear {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 18px;
	color: #6b7280;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

#mlms-cert-event-clear:hover {
	color: #b32d2e;
}

/* Small cert history download button */
.mlms-cert-btn-sm {
	display: inline-block;
	padding: 4px 12px;
	background: #1d4ed8;
	color: #fff !important;
	border: none;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
}

.mlms-cert-btn-sm:hover {
	background: #1e40af;
	color: #fff !important;
}

/* Cert history table */
.mlms-cert-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	margin-top: 8px;
}

.mlms-cert-history-table th,
.mlms-cert-history-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
}

.mlms-cert-history-table th {
	font-weight: 600;
	background: #f9fafb;
}

/* Logged-out state */
.mlms-cert-logged-out-wrap {
	padding: 24px;
	text-align: center;
}

.mlms-cert-logged-out-msg {
	margin-bottom: 16px;
	font-size: 15px;
	color: #374151;
}

@media (max-width: 480px) {
	.mlms-cert-field-row {
		flex-direction: column;
		gap: 0;
	}
}
