/* WHOIS Domein Checker – frontend */

.wdc-wrapper {
	--wdc-accent: #2563eb;
	--wdc-accent-hover: #1d4ed8;
	--wdc-green: #16a34a;
	--wdc-red: #dc2626;
	--wdc-gray: #6b7280;
	--wdc-border: #e5e7eb;
	--wdc-bg: #ffffff;
	--wdc-radius: 10px;

	max-width: 760px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
	color: #111827;
	box-sizing: border-box;
}

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

.wdc-title {
	margin: 0 0 .25em;
	font-size: 1.6em;
}

.wdc-intro {
	margin: 0 0 1em;
	color: var(--wdc-gray);
}

/* Zoekbalk */
.wdc-search-row {
	display: flex;
	gap: 8px;
}

.wdc-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 16px;
	font-size: 1em;
	border: 2px solid var(--wdc-border);
	border-radius: var(--wdc-radius);
	background: var(--wdc-bg);
	transition: border-color .15s ease;
}

.wdc-input:focus {
	outline: none;
	border-color: var(--wdc-accent);
}

.wdc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	font-size: 1em;
	font-weight: 600;
	color: #fff;
	background: var(--wdc-accent);
	border: none;
	border-radius: var(--wdc-radius);
	cursor: pointer;
	transition: background .15s ease;
	white-space: nowrap;
}

.wdc-btn:hover {
	background: var(--wdc-accent-hover);
}

.wdc-btn:disabled {
	opacity: .6;
	cursor: default;
}

.wdc-hint {
	margin: .6em 2px 0;
	font-size: .82em;
	color: var(--wdc-gray);
}

/* Resultaten */
.wdc-results {
	margin-top: 1.4em;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wdc-result {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--wdc-border);
	border-radius: var(--wdc-radius);
	background: var(--wdc-bg);
}

.wdc-result-domain {
	font-weight: 600;
	word-break: break-all;
}

.wdc-result-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .92em;
	color: var(--wdc-gray);
	white-space: nowrap;
}

.wdc-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	font-size: 12px;
	color: #fff;
	background: var(--wdc-gray);
}

.wdc-status-available {
	border-color: rgba( 22, 163, 74, .4 );
	background: rgba( 22, 163, 74, .05 );
}

.wdc-status-available .wdc-badge {
	background: var(--wdc-green);
}

.wdc-status-available .wdc-result-status {
	color: var(--wdc-green);
	font-weight: 600;
}

.wdc-status-taken .wdc-badge {
	background: var(--wdc-red);
}

.wdc-status-taken {
	opacity: .7;
}

.wdc-status-taken .wdc-result-status {
	color: var(--wdc-red);
}

.wdc-result-price {
	font-weight: 600;
	white-space: nowrap;
}

.wdc-result-price.wdc-on-request {
	font-weight: 500;
	color: var(--wdc-accent);
	font-style: italic;
}

.wdc-btn-request {
	padding: 8px 14px;
	font-size: .9em;
}

/* Bestelknop (beschikbaar met prijs) */
.wdc-btn-order {
	padding: 8px 14px;
	font-size: .9em;
	text-decoration: none;
	background: var(--wdc-green);
}

.wdc-btn-order:hover {
	background: #15803d;
	color: #fff;
}

.wdc-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid var(--wdc-border);
	border-top-color: var(--wdc-accent);
	border-radius: 50%;
	animation: wdc-spin .7s linear infinite;
}

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

/* Modal – standaard verborgen; enkel zichtbaar met .wdc-open */
.wdc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.wdc-modal.wdc-open {
	display: flex;
}

.wdc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 17, 24, 39, .55 );
}

.wdc-modal-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 14px;
	padding: 26px;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, .25 );
}

.wdc-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 34px;
	height: 34px;
	font-size: 26px;
	line-height: 1;
	color: var(--wdc-gray);
	background: none;
	border: none;
	cursor: pointer;
}

.wdc-modal-title {
	margin: 0 0 .2em;
	font-size: 1.3em;
}

.wdc-modal-domain {
	margin: 0 0 1.2em;
	font-weight: 700;
	color: var(--wdc-accent);
}

.wdc-request-form label {
	display: block;
	margin-bottom: 12px;
	font-size: .9em;
	font-weight: 600;
}

.wdc-request-form label span {
	display: block;
	margin-bottom: 4px;
}

.wdc-request-form input,
.wdc-request-form textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 1em;
	font-weight: 400;
	border: 1px solid var(--wdc-border);
	border-radius: 8px;
}

.wdc-request-form input:focus,
.wdc-request-form textarea:focus {
	outline: none;
	border-color: var(--wdc-accent);
}

.wdc-btn-submit {
	width: 100%;
	margin-top: 6px;
}

/* Honeypot verbergen */
.wdc-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 0;
	overflow: hidden;
}

.wdc-form-message {
	margin: 12px 0 0;
	font-size: .92em;
	min-height: 1.2em;
}

.wdc-form-message.wdc-success {
	color: var(--wdc-green);
	font-weight: 600;
}

.wdc-form-message.wdc-error {
	color: var(--wdc-red);
	font-weight: 600;
}

body.wdc-modal-open {
	overflow: hidden;
}

/* Responsief */
@media ( max-width: 560px ) {
	.wdc-result {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"domain status"
			"price action";
		row-gap: 8px;
	}

	.wdc-result-domain { grid-area: domain; }
	.wdc-result-status { grid-area: status; justify-self: end; }
	.wdc-result-price { grid-area: price; }
	.wdc-result-action { grid-area: action; justify-self: end; }

	.wdc-search-row {
		flex-direction: column;
	}

	.wdc-btn-search {
		width: 100%;
	}
}
