/* Certificate Validator - responsive public UI */
.cv-validator-box,
.cv-validator-box * {
	box-sizing: border-box;
}

.cv-validator-box {
	width: 100%;
	max-width: 760px;
	margin: 24px auto;
	padding: clamp(16px, 3vw, 28px);
	border: 1px solid #dfe8e2;
	border-radius: 14px;
	background: #fff;
	font-family: inherit;
	color: #26332b;
	box-shadow: 0 8px 28px rgba(30, 70, 45, .08);
}

.cv-validator-title {
	margin: 0 0 18px;
	font-size: clamp(20px, 3vw, 26px);
	line-height: 1.25;
	text-align: center;
	color: #1f7a3d;
}

.cv-validator-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.cv-validator-main-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
	width: 100%;
}

.cv-captcha-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	background: #f6f8f7;
	border: 1px solid #dbe6de;
	border-radius: 8px;
	padding: 10px 12px;
}

.cv-captcha-label {
	font-size: 13px;
	font-weight: 600;
	color: #33413a;
	margin: 0;
}

.cv-captcha-input {
	width: 90px;
	flex: 0 0 auto;
	padding: 8px 10px;
	border: 1px solid #cbd8cf;
	border-radius: 6px;
	font-size: 14px;
}

.cv-validator-input {
	min-width: 0;
	flex: 1 1 auto;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #cbd8cf;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.4;
	background: #fff;
}

.cv-validator-submit,
.cv-copy-link-btn,
.cv-qr-download {
	font-family: inherit;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease, background-color .15s ease;
}

.cv-validator-submit {
	flex: 0 0 auto;
	padding: 12px 22px;
	background: #2271b1;
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}

.cv-validator-submit:hover { background: #135e96; }
.cv-validator-submit:disabled { opacity: .6; cursor: default; }

.cv-validator-result { margin-top: 20px; }

.cv-result-success {
	width: 100%;
	padding: clamp(16px, 3vw, 28px);
	border-radius: 12px;
	background: #f0fbf4;
	border: 1px solid #75c88d;
	overflow: hidden;
}

.cv-result-success h4 {
	margin: 0 0 18px;
	color: #16813b;
	font-size: clamp(22px, 4vw, 28px);
	line-height: 1.25;
	text-align: center;
}

.cv-result-success table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid #d7e7dc;
	border-radius: 8px;
	background: rgba(255,255,255,.45);
}

.cv-result-success tr + tr td { border-top: 1px solid #d7e7dc; }
.cv-result-success td {
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.55;
	vertical-align: top;
	word-break: break-word;
}
.cv-result-success td.cv-label {
	width: 34%;
	color: #3f5046;
	font-weight: 600;
}

.cv-result-error {
	padding: 16px;
	border-radius: 8px;
	background: #fdeeee;
	border: 1px solid #e53935;
	color: #a12622;
	font-size: 14px;
}
.cv-result-loading { font-size: 14px; color: #666; }

/* QR */
.cv-qr-wrap {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid #d7e7dc;
	text-align: center;
}
.cv-qr-title {
	font-size: 14px;
	color: #3f5046;
	margin-bottom: 14px;
	font-weight: 500;
}
.cv-qr-toggle,
.cv-qr-download {
	font-family: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-left: auto;
	margin-right: auto;
	border: 0 !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	transition: background-color .15s ease, transform .15s ease, opacity .15s ease;
}
.cv-qr-toggle {
	min-height: 44px;
	padding: 10px 18px;
	background: #2271b1 !important;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
}
.cv-qr-toggle:hover { background: #135e96 !important; transform: translateY(-1px); }
.cv-qr-toggle svg,
.cv-qr-download svg { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.cv-qr-code {
	display: none;
	width: min(280px, 100%);
	max-width: 100%;
	margin: 16px auto 0;
	padding: 12px;
	background: #fff;
	border: 1px solid #dfe8e2;
	border-radius: 8px;
	line-height: 0;
	box-shadow: 0 2px 8px rgba(30, 70, 45, .05);
}
.cv-qr-code canvas {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-width: 100%;
	image-rendering: pixelated;
}
.cv-qr-open .cv-qr-code { display: block; }
.cv-qr-download {
	display: none;
	min-height: 44px;
	padding: 10px 18px;
	margin-top: 12px;
	background: #2271b1 !important;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
}
.cv-qr-open .cv-qr-download { display: flex; }
.cv-qr-download:hover { background: #135e96 !important; transform: translateY(-1px); }
.cv-qr-error { font-size: 12px; color: #a12622; line-height: 1.4; }

/* Verification link + social share */
.cv-share-link-row {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #d7e7dc;
}
.cv-share-link-label {
	margin-bottom: 9px;
	font-size: 13px;
	font-weight: 600;
	color: #26332b;
	text-align: center;
}
.cv-share-link-field {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 132px;
	gap: 8px;
	width: 100%;
	min-width: 0;
	align-items: stretch;
}
.cv-share-link-input {
	display: block;
	min-width: 0;
	width: 100%;
	min-height: 58px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #cbd8cf !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #4a554f !important;
	font-family: inherit;
	font-size: 12px !important;
	line-height: 1.45 !important;
	resize: none;
	overflow: hidden;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
	box-shadow: none !important;
}
.cv-share-link-input:focus {
	outline: 2px solid rgba(34,113,177,.16);
	outline-offset: 0;
}
.cv-copy-link-btn {
	min-width: 0;
	width: 100%;
	min-height: 58px;
	padding: 10px 12px;
	border: 0 !important;
	border-radius: 8px !important;
	background: #2271b1 !important;
	color: #fff !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none !important;
}
.cv-copy-link-btn:hover { background: #135e96 !important; }
.cv-copy-link-btn:focus-visible { outline: 2px solid #135e96; outline-offset: 2px; }
.cv-copy-link-btn svg { width: 19px; height: 19px; display: block; flex: 0 0 19px; }
.cv-copy-hint {
	margin-top: 8px;
	font-size: 11px;
	line-height: 1.5;
	color: #65736a;
	text-align: center;
}

.cv-share-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #d7e7dc; }
.cv-share-label {
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #26332b;
	text-align: center;
}
.cv-share-buttons {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
}
.cv-share-btn {
	min-width: 0;
	min-height: 44px;
	padding: 9px 10px;
	border: 0 !important;
	border-radius: 8px !important;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	color: #fff !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-align: center;
	cursor: pointer;
	box-shadow: none !important;
}
.cv-share-btn:hover { opacity: .92; color: #fff !important; transform: translateY(-1px); }
.cv-share-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.cv-share-btn svg { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.cv-share-fb { background: #1877f2 !important; }
.cv-share-li { background: #0a66c2 !important; }
.cv-share-wa { background: #25d366 !important; }
.cv-share-copy { background: #68737a !important; }
.cv-share-copy:hover { background: #566168 !important; }

.cv-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Admin QR */
.cv-admin-qr {
	width: 105px;
	height: 105px;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}
.cv-admin-qr svg { display: block; width: 105px; height: 105px; }
.cv-admin-qr-download { display: inline-block !important; }

@media (max-width: 560px) {
	.cv-validator-box { margin: 12px auto; padding: 14px; border-radius: 10px; }
	.cv-validator-main-row { flex-direction: column; }
	.cv-captcha-input { width: 100%; min-height: 44px; }
	.cv-validator-input { font-size: 14px; min-height: 46px; }
	.cv-validator-submit { width: 100%; min-height: 46px; }
	.cv-result-success { padding: 14px; border-radius: 10px; }
	.cv-result-success td { padding: 10px 9px; font-size: 13px; }
	.cv-result-success td.cv-label { width: 36%; }
	.cv-qr-code { width: min(100%, 240px); padding: 8px; }
	.cv-qr-code svg { width: 100% !important; height: auto !important; max-width: 100% !important; }
	.cv-share-link-field { grid-template-columns: 1fr; gap: 8px; }
	.cv-share-link-input { min-height: 76px; font-size: 12px !important; }
	.cv-copy-link-btn { min-height: 46px; width: 100%; }
	.cv-share-buttons { grid-template-columns: 1fr 1fr; gap: 8px; }
	.cv-share-btn { min-height: 44px; font-size: 12px; }
}

@media (max-width: 360px) {
	.cv-result-success td { padding: 9px 7px; font-size: 12px; }
	.cv-share-buttons { grid-template-columns: 1fr; }
	.cv-share-link-input { font-size: 11px !important; }
}

