/* Website Directory */
.wsd-wrap {
	--wsd-accent: #0f766e;
	--wsd-accent-2: #14b8a6;
	--wsd-ink: #111827;
	--wsd-muted: #6b7280;
	--wsd-line: #e5e7eb;
	--wsd-bg: #ffffff;
	--wsd-soft: #f5f7f8;
	--wsd-ok: #047857;
	--wsd-ok-bg: #ecfdf5;
	--wsd-err: #b91c1c;
	--wsd-err-bg: #fef2f2;
	max-width: 1040px;
	margin: 0 auto;
	color: var(--wsd-ink);
	font-size: 16px;
	line-height: 1.55;
}
.wsd-wrap *, .wsd-wrap *::before, .wsd-wrap *::after { box-sizing: border-box; }
.wsd-wrap [hidden] { display: none !important; }

.wsd-card {
	background: var(--wsd-bg);
	border: 1px solid var(--wsd-line);
	border-radius: 14px;
	padding: 24px;
	margin: 0 0 22px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .04);
}
.wsd-form-card { border-top: 4px solid var(--wsd-accent); }
.wsd-title { margin: 0 0 6px; font-size: 1.5em; line-height: 1.25; color: var(--wsd-ink); }
.wsd-sub { margin: 0 0 18px; color: var(--wsd-muted); font-size: .95em; }

/* Forms */
.wsd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.wsd-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 2px; font-weight: 600; font-size: .92em; }
.wsd-field em { color: var(--wsd-err); font-style: normal; }
.wsd-field small { color: var(--wsd-muted); font-weight: 400; }
.wsd-field input, .wsd-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font: inherit;
	font-size: 15px;
	font-weight: 400;
	background: #fff;
	color: var(--wsd-ink);
	margin: 0;
}
.wsd-field textarea { resize: vertical; min-height: 110px; }
.wsd-field input:focus, .wsd-field textarea:focus, .wsd-filter input:focus, .wsd-filter select:focus {
	outline: none;
	border-color: var(--wsd-accent-2);
	box-shadow: 0 0 0 3px rgba(20, 184, 166, .2);
}
.wsd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wsd-actions { margin-top: 18px; }
.wsd-email-notice { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; font-size: .92em; line-height: 1.5; }
.wsd-email-notice strong { color: #92400e; }
.wsd-consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; font-size: .92em; cursor: pointer; }
.wsd-consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--wsd-accent); }
.wsd-consent em { color: var(--wsd-err); font-style: normal; }
.wsd-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: .93em; }
.wsd-ok { background: var(--wsd-ok-bg); color: var(--wsd-ok); }
.wsd-err { background: var(--wsd-err-bg); color: var(--wsd-err); }

.wsd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--wsd-accent), var(--wsd-accent-2));
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
}
.wsd-btn:hover { opacity: .92; }
.wsd-btn:disabled { opacity: .55; cursor: wait; }
.wsd-btn-small { padding: 8px 14px; font-size: 14px; border-radius: 8px; }

/* List header */
.wsd-list-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.wsd-list-head .wsd-title { margin: 0; }
.wsd-count { font-size: .55em; font-weight: 600; color: var(--wsd-accent); background: #f0fdfa; border-radius: 99px; padding: 3px 10px; vertical-align: middle; }
.wsd-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.wsd-filter input, .wsd-filter select {
	padding: 8px 11px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: var(--wsd-ink);
	margin: 0;
	height: auto;
}
.wsd-filter input { min-width: 180px; }

/* Table */
.wsd-table-wrap { overflow-x: auto; }
.wsd-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .95em; }
.wsd-table th, .wsd-table td { padding: 12px; border: 0; border-bottom: 1px solid var(--wsd-line); text-align: left; vertical-align: middle; }
.wsd-table th { background: var(--wsd-soft); font-size: .78em; text-transform: uppercase; letter-spacing: .05em; color: var(--wsd-muted); }
.wsd-table tbody tr:hover { background: #fafafa; }
.wsd-c-n { width: 48px; color: var(--wsd-muted); }
.wsd-c-num { text-align: right !important; white-space: nowrap; width: 90px; font-variant-numeric: tabular-nums; }
.wsd-c-act { text-align: right !important; width: 110px; }
.wsd-link { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--wsd-ink) !important; }
.wsd-link span { display: flex; flex-direction: column; min-width: 0; }
.wsd-link strong { color: var(--wsd-accent); font-weight: 700; overflow-wrap: anywhere; }
.wsd-link:hover strong { text-decoration: underline; }
.wsd-link small { color: var(--wsd-muted); font-size: .85em; overflow-wrap: anywhere; }
.wsd-fav { width: 20px; height: 20px; border-radius: 4px; flex: 0 0 auto; margin: 0; }
.wsd-dr { display: inline-block; min-width: 36px; padding: 2px 8px; border-radius: 99px; background: #f0fdfa; color: var(--wsd-accent); font-weight: 700; text-align: center; }
.wsd-clicks { font-weight: 600; }

.wsd-empty { padding: 24px; text-align: center; color: var(--wsd-muted); background: var(--wsd-soft); border-radius: 10px; margin: 0; }
.wsd-note { margin: 14px 0 0; font-size: .82em; color: var(--wsd-muted); }

.wsd-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.wsd-page { display: inline-block; min-width: 36px; padding: 6px 10px; border: 1px solid var(--wsd-line); border-radius: 8px; text-align: center; text-decoration: none !important; color: var(--wsd-ink) !important; font-size: .9em; }
.wsd-current { background: var(--wsd-accent); border-color: var(--wsd-accent); color: #fff !important; font-weight: 700; }

/* Modal */
.wsd-modal { position: fixed; inset: 0; background: rgba(17, 24, 39, .55); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wsd-modal-box { background: var(--wsd-bg); border-radius: 14px; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 24px; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.wsd-modal-box h3 { margin: 0 0 4px; font-size: 1.25em; padding-right: 30px; color: var(--wsd-ink); }
.wsd-modal-box .wsd-field { margin-bottom: 12px; }
.wsd-modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--wsd-soft); color: var(--wsd-ink); font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
body.wsd-noscroll { overflow: hidden; }

/* Top websites and admin controls */
.wsd-table tr.wsd-pinned { background: #fffbeb; }
.wsd-table tr.wsd-pinned:hover { background: #fef3c7; }
.wsd-top { display: inline-block; padding: 3px 8px; border-radius: 6px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: .72em; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.wsd-top-badge { display: none; }
.wsd-c-admin { white-space: nowrap; width: 170px; }
.wsd-pin { padding: 5px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; margin: 0 4px 0 0; background: #fff; }
.wsd-del { padding: 5px 10px; border: 1px solid #fecaca; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: 13px; font-weight: 600; cursor: pointer; }
.wsd-del:hover { background: #fee2e2; }

/* Owner email box */
.wsd-owner-email { margin: 14px 0 16px; padding: 14px; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; }
.wsd-owner-email label { display: block; font-weight: 700; font-size: .85em; margin-bottom: 6px; color: var(--wsd-accent); }
.wsd-copy-row { display: flex; gap: 8px; }
.wsd-owner-email-input { flex: 1 1 auto; min-width: 0; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 15px; color: var(--wsd-ink); margin: 0; }
.wsd-copy-msg { margin: 8px 0 0; font-size: .85em; color: var(--wsd-ok); }
.wsd-or { margin-bottom: 12px; }

/* Mobile: each row becomes a card */
@media (max-width: 700px) {
	.wsd-card { padding: 18px 16px; }
	.wsd-grid { grid-template-columns: 1fr; }
	.wsd-filter, .wsd-filter input { width: 100%; }
	.wsd-filter input { min-width: 0; flex: 1 1 100%; }
	.wsd-table thead { display: none; }
	.wsd-table, .wsd-table tbody, .wsd-table tr, .wsd-table td { display: block; width: 100%; }
	.wsd-table tr { border: 1px solid var(--wsd-line); border-radius: 12px; margin-bottom: 12px; padding: 6px 4px; }
	.wsd-table td { border: 0; padding: 7px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: right !important; width: 100% !important; }
	.wsd-table td::before { content: attr(data-label); font-size: .78em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wsd-muted); text-align: left; }
	.wsd-table td.wsd-c-n { display: none; }
	.wsd-top-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #d97706; color: #fff; font-style: normal; font-size: .72em; font-weight: 800; vertical-align: middle; }
	.wsd-table td.wsd-c-site { display: block; text-align: left !important; border-bottom: 1px solid var(--wsd-line); padding-bottom: 10px; margin-bottom: 4px; }
	.wsd-table td.wsd-c-site::before { display: none; }
	.wsd-c-act .wsd-btn { width: auto; }
}
