/* ==========================================================================
   Port Checker — page-specific bits only. The test card shell, bulleted
   lists, numbered steps and reference table all come from tool-shared.css
   (loaded alongside this file); this file adds the host/port form and the
   result states specific to checking a port.
   ========================================================================== */

/* ---------- Form ---------- */

.pv-pc-tool { max-width: 560px; }

.pv-pc-form { text-align: left; }

.pv-pc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
}

.pv-pc-field__label {
	color: var(--pv-ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -.005em;
}

.pv-pc-row {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 10px;
}

.pv-pc-input,
.pv-pc-select {
	width: 100%;
	height: 52px;
	padding: 0 18px;
	border: 1px solid var(--pv-line);
	border-radius: var(--pv-r-sm);
	background: #fff;
	color: var(--pv-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.005em;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.pv-pc-input::placeholder { color: var(--pv-muted); font-weight: 500; }
.pv-pc-input:focus,
.pv-pc-select:focus {
	outline: none;
	border-color: var(--pv-cyan);
	box-shadow: 0 0 0 3px rgba(14, 165, 196, .14);
}
.pv-pc-input[aria-invalid="true"] { border-color: #d63c3c; }

.pv-pc-select {
	padding-right: 40px;
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767c89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	cursor: pointer;
}

.pv-pc-field__err {
	margin: 0;
	color: #b02a2a;
	font-size: 12.5px;
	font-weight: 600;
}

.pv-pc-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: -2px 0 16px;
}
.pv-pc-chips__label {
	margin-right: 2px;
	color: var(--pv-muted);
	font-size: 12px;
	font-weight: 600;
}
.pv-pc-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 5px 13px;
	border: 1px solid var(--pv-line-2);
	border-radius: 999px;
	background: var(--pv-soft-2);
	color: var(--pv-ink-2);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.pv-pc-chip:hover { border-color: var(--pv-ink); color: var(--pv-ink); background: #fff; }

.pv-pc-submit { width: 100%; margin-top: 4px; }
.pv-pc-submit:disabled {
	opacity: .55;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none;
}

@media (max-width: 480px) {
	.pv-pc-row { grid-template-columns: 1fr; }
}

/* ---------- Loading state ---------- */

.pv-pc-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 22px 0 4px;
}
.pv-pc-spinner {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 3px solid var(--pv-line-2);
	border-top-color: var(--pv-cyan);
	animation: pv-pc-spin .8s linear infinite;
}
.pv-pc-loading p { margin: 0; color: var(--pv-ink-2); font-size: 13.5px; font-weight: 600; }

@keyframes pv-pc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.pv-pc-spinner { animation-duration: 1.6s; }
}

/* ---------- Result ---------- */

.pv-pc-result {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--pv-line-2);
	text-align: left;
}

.pv-pc-badge {
	gap: 8px;
	margin: 0 0 14px;
}
.pv-pc-badge__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.pv-pc-badge--open { background: rgba(18, 183, 106, .12); color: var(--pv-green); }
.pv-pc-badge--closed { background: rgba(214, 60, 60, .12); color: #b02a2a; }
.pv-pc-badge--filtered { background: rgba(255, 138, 31, .14); color: var(--pv-orange); }

.pv-pc-headline {
	margin: 0 0 10px;
	font-size: 16.5px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.4;
}
.pv-pc-headline code {
	padding: 2px 7px;
	border-radius: 6px;
	background: var(--pv-soft);
	font-family: var(--pv-mono);
	font-size: 14.5px;
	font-weight: 600;
}

.pv-pc-detail {
	margin: 0;
	color: var(--pv-ink-2);
	font-size: 14px;
	line-height: 1.65;
}

.pv-pc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}
.pv-pc-meta span {
	padding: 4px 10px;
	border: 1px solid var(--pv-line-2);
	border-radius: 8px;
	background: var(--pv-soft-2);
	color: var(--pv-ink-2);
	font-size: 11.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.pv-pc-note {
	margin: 16px 0 0;
	padding: 12px 14px;
	border: 1px solid var(--pv-line-2);
	border-radius: 12px;
	background: var(--pv-soft-2);
	color: var(--pv-muted);
	font-size: 12.5px;
	line-height: 1.6;
}
