/* ==========================================================
   Pet Voting Contest — Frontend Styles
   Designed to inherit theme fonts/colors, with clear hooks.
   ========================================================== */

.pvc-wrap { font-family: inherit; color: inherit; box-sizing: border-box; max-width: 100%; margin: 0 auto; }
.pvc-wrap *, .pvc-wrap *::before, .pvc-wrap *::after { box-sizing: border-box; }

/* ---------- Form ---------- */
.pvc-form-wrap { max-width: 600px; }
.pvc-form .pvc-field { margin-bottom: 18px; }
.pvc-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.pvc-form .pvc-req { color: #dc2626; }
.pvc-form input[type="text"],
.pvc-form input[type="email"],
.pvc-form input[type="tel"],
.pvc-form input[type="file"],
.pvc-form select,
.pvc-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.pvc-form input:focus,
.pvc-form select:focus,
.pvc-form textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.pvc-form .pvc-hint { display: block; color: #6b7280; font-size: 12px; margin-top: 6px; }
.pvc-honeypot { position: absolute !important; left: -10000px !important; top: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden; }

.pvc-field-check label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.pvc-field-check input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; width: 16px; height: 16px; cursor: pointer; }

.pvc-actions { margin-top: 20px; }

.pvc-btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	transition: transform .08s, opacity .15s;
}
.pvc-btn:disabled { opacity: .5; cursor: not-allowed; }
.pvc-btn:active:not(:disabled) { transform: translateY(1px); }
.pvc-btn-primary { background: #2563eb; color: #fff; }
.pvc-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.pvc-btn-vote { background: #fff; color: #2563eb; border-color: #2563eb; width: 100%; margin-top: 8px; }
.pvc-btn-vote:hover:not(:disabled) { background: #2563eb; color: #fff; }

.pvc-message { margin-top: 14px; font-size: 14px; }
.pvc-message.is-error { color: #b91c1c; }
.pvc-message.is-success { color: #166534; padding: 10px 14px; background: #dcfce7; border-radius: 8px; }

/* ---------- Gallery filter tabs (pill style) ---------- */
.pvc-filter-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}
.pvc-filter-tab {
	display: inline-block;
	padding: 6px 18px;
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	text-decoration: none;
	border: 1.5px solid #e5e7eb;
	border-radius: 99px;
	background: #fff;
	transition: color .12s, border-color .12s, background .12s;
	line-height: 1.5;
}
.pvc-filter-tab:hover { color: #111827; border-color: #9ca3af; text-decoration: none; }
.pvc-filter-tab.is-active { color: #fff; background: #2563eb; border-color: #2563eb; }

/* ---------- Gallery inner / AJAX loading ---------- */
.pvc-gallery-inner { position: relative; min-height: 80px; transition: opacity .2s; }
.pvc-gallery-inner.pvc-loading { opacity: .35; pointer-events: none; }
.pvc-gallery-inner.pvc-loading::after {
	content: '';
	position: absolute;
	top: 48px;
	left: 50%;
	transform: translateX(-50%);
	width: 30px;
	height: 30px;
	border: 3px solid #e5e7eb;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: pvc-spin .55s linear infinite;
	z-index: 10;
}
@keyframes pvc-spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ---------- Gallery ---------- */
.pvc-notice { background: #fef3c7; color: #92400e; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.pvc-empty { color: #6b7280; text-align: center; padding: 40px 20px; }

.pvc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.pvc-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s, box-shadow .15s;
}
.pvc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }

.pvc-card-photo-link {
	display: block;
	overflow: hidden;
}
.pvc-card-photo-link:hover .pvc-card-photo { transform: scale(1.03); }
.pvc-card-photo {
	width: 100%;
	padding-top: 75%; /* 4:3 */
	background-size: cover;
	background-position: center;
	background-color: #f3f4f6;
	transition: transform .2s;
}
.pvc-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.pvc-card-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.pvc-card-title a { color: inherit; text-decoration: none; }
.pvc-card-title a:hover { color: #2563eb; text-decoration: none; }
.pvc-card-cat { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.pvc-card-votes {
	font-size: 14px;
	color: #374151;
	margin-top: auto;
	padding: 8px 0;
}
.pvc-vote-count { font-weight: 700; font-size: 18px; color: #111827; margin-right: 4px; }

/* ---------- Pagination ---------- */
.pvc-pagination { margin-top: 30px; text-align: center; }
.pvc-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	color: #374151;
	text-decoration: none;
	font-size: 14px;
}
.pvc-pagination .page-numbers.current,
.pvc-pagination .page-numbers:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ---------- Modal ---------- */
.pvc-modal { display: none; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; padding: 20px; }
.pvc-modal.is-open { display: flex; }
.pvc-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.pvc-modal-dialog {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 460px;
	padding: 28px 24px 22px;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	z-index: 1;
}
.pvc-modal-dialog h3 { margin: 0 0 8px; font-size: 20px; }
.pvc-modal-pet { color: #2563eb; font-weight: 600; margin: 0 0 16px; }
.pvc-modal-close {
	position: absolute; top: 8px; right: 12px;
	background: none; border: none; font-size: 28px; line-height: 1;
	cursor: pointer; color: #6b7280;
}
.pvc-modal-close:hover { color: #111; }

@media (max-width: 520px) {
	.pvc-modal { padding: 12px; }
}

/* ---------- Leaderboard ---------- */
.pvc-leaderboard-wrap { max-width: 520px; }
.pvc-leaderboard-title { font-size: 22px; margin: 0 0 16px; }
.pvc-leaderboard {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}
.pvc-leaderboard-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
}
.pvc-leaderboard-item:last-child { border-bottom: none; }
.pvc-rank { font-size: 18px; font-weight: 700; color: #6b7280; min-width: 36px; }
.pvc-rank-1 .pvc-rank { color: #d97706; }
.pvc-rank-2 .pvc-rank { color: #6b7280; }
.pvc-rank-3 .pvc-rank { color: #b45309; }
.pvc-rank-thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pvc-rank-name { flex: 1; font-weight: 600; }
.pvc-rank-votes { font-weight: 700; color: #111827; }
.pvc-rank-votes small { display: block; font-weight: 400; color: #6b7280; font-size: 11px; }

/* ---------- Share panel (gallery cards) ---------- */
.pvc-card-share { position: relative; margin-top: 6px; }
.pvc-btn-share {
	background: none;
	border: none;
	color: #2563eb;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
	font-family: inherit;
	line-height: 1;
}
.pvc-btn-share:hover { text-decoration: underline; }
.pvc-share-panel {
	display: none;
	position: absolute;
	bottom: calc(100% + 4px);
	left: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	padding: 6px;
	z-index: 200;
	min-width: 160px;
}
.pvc-share-panel.is-open { display: block; }
.pvc-share-opt {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
}
.pvc-share-opt:hover { background: #f3f4f6; }
.pvc-sopt-fb { color: #1877f2; }
.pvc-sopt-x  { color: #000; }
.pvc-sopt-copy { color: #374151; }
.pvc-sopt-copy.is-copied { color: #166534; }

/* ---------- Share buttons (single entry page) ---------- */
.pvc-share { margin: 24px 0; }
.pvc-share-label { font-weight: 700; margin-bottom: 12px; font-size: 15px; }
.pvc-share-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pvc-share-btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s;
}
.pvc-share-btn:hover { opacity: .85; text-decoration: none; }
.pvc-share-fb   { background: #1877f2; color: #fff; }
.pvc-share-x    { background: #000;    color: #fff; }
.pvc-share-copy { background: #f3f4f6; color: #374151; }
.pvc-share-copy.is-copied { background: #dcfce7; color: #166534; }

/* ---------- Single entry page ---------- */
.pvc-entry-single { max-width: 680px; margin: 0 auto; padding: 32px 20px; }
.pvc-single-photo { margin-bottom: 28px; border-radius: 14px; overflow: hidden; }
.pvc-single-photo img { width: 100%; height: auto; display: block; }
.pvc-single-name  { font-size: 32px; margin: 0 0 10px; line-height: 1.2; }
.pvc-single-badge {
	display: inline-block;
	background: #eff6ff;
	color: #2563eb;
	border-radius: 6px;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.pvc-single-desc { font-size: 16px; line-height: 1.75; color: #374151; margin: 0 0 24px; }
.pvc-single-vote { margin: 24px 0; }
.pvc-btn-vote-single { font-size: 16px; padding: 14px 32px; width: 100%; text-align: center; }

/* =====================================================
   Contest Dashboard — Yoast-style admin panel layout
   ===================================================== */

.pvcd-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	color: #1d2327;
	max-width: 1100px;
	margin: 0 auto;
}
.pvcd-access-denied { color: #646970; padding: 20px 0; }

/* --- Page header --- */
.pvcd-page-header {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #c3c4c7;
}
.pvcd-page-title {
	margin: 0;
	font-size: 23px;
	font-weight: 400;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 8px;
	line-height: 1.3;
}
.pvcd-page-icon { font-style: normal; }
.pvcd-page-subtitle {
	font-size: 13px;
	color: #646970;
}

/* --- Status banner --- */
.pvcd-status-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-left: 4px solid #ccc;
	background: #f6f7f7;
	border-radius: 0 4px 4px 0;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.pvcd-status-banner.pvcd-status-open   { border-left-color: #00a32a; background: #f0fdf4; }
.pvcd-status-banner.pvcd-status-closed { border-left-color: #d63638; background: #fdf2f2; }
.pvcd-status-indicator {
	width: 10px; height: 10px;
	border-radius: 50%;
	background: #ccc;
	flex-shrink: 0;
}
.pvcd-status-open   .pvcd-status-indicator { background: #00a32a; }
.pvcd-status-closed .pvcd-status-indicator { background: #d63638; }
.pvcd-status-text { flex: 1; line-height: 1.5; }
.pvcd-status-text strong { display: block; font-size: 14px; }
.pvcd-status-dates { display: flex; gap: 16px; font-size: 12px; color: #646970; margin-top: 2px; }
.pvcd-status-action {
	font-size: 13px;
	color: #2271b1;
	text-decoration: none;
	white-space: nowrap;
	font-weight: 600;
}
.pvcd-status-action:hover { color: #135e96; text-decoration: underline; }

/* --- Two-column layout --- */
.pvcd-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}
@media (max-width: 700px) {
	.pvcd-columns { grid-template-columns: 1fr; }
}

/* --- Card --- */
.pvcd-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: 4px solid #2271b1;
	border-radius: 2px;
	margin-bottom: 20px;
}
.pvcd-card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-bottom: 1px solid #f0f0f1;
}
.pvcd-card-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}
.pvcd-card-count {
	margin-left: auto;
	background: #f0f0f1;
	color: #646970;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
}
.pvcd-card-body { padding: 16px; }
.pvcd-card-body-flush { padding: 0; }
.pvcd-columns .pvcd-card { margin-bottom: 0; }

/* --- At a Glance list --- */
.pvcd-glance-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1px;
	background: #f0f0f1;
}
.pvcd-glance-item {
	background: #fff;
	padding: 16px 12px;
	text-align: center;
}
.pvcd-glance-num {
	display: block;
	font-size: 32px;
	font-weight: 300;
	color: #1d2327;
	line-height: 1;
	margin-bottom: 6px;
}
.pvcd-glance-label {
	display: block;
	font-size: 11px;
	color: #646970;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.pvcd-glance-pending .pvcd-glance-num { color: #d63638; }
.pvcd-glance-approved .pvcd-glance-num { color: #00a32a; }
.pvcd-glance-votes .pvcd-glance-num { color: #2271b1; }

/* --- Quick action list --- */
.pvcd-action-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.pvcd-action-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}
.pvcd-action-item:last-child { border-bottom: none; }
.pvcd-action-icon { flex-shrink: 0; width: 18px; text-align: center; }
.pvcd-action-item a { color: #2271b1; text-decoration: none; }
.pvcd-action-item a:hover { color: #135e96; text-decoration: underline; }
.pvcd-action-alert a { color: #d63638; font-weight: 600; }
.pvcd-action-alert a:hover { color: #a22122; }

/* --- Entries table --- */
.pvcd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.pvcd-table thead th {
	text-align: left;
	padding: 8px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #646970;
	white-space: nowrap;
}
.pvcd-table tbody td {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: middle;
}
.pvcd-table tbody tr:last-child td { border-bottom: none; }
.pvcd-table tbody tr:hover td { background: #f6f7f7; }
.pvcd-row-pending td { background: #fffbeb; }
.pvcd-row-pending:hover td { background: #fef9c3; }

.pvcd-col-pet  { width: 200px; }
.pvcd-col-votes { text-align: center; width: 60px; }
.pvcd-col-edit  { width: 60px; text-align: right; }

.pvcd-pet-cell { display: flex; align-items: center; gap: 10px; }
.pvcd-thumb {
	width: 36px; height: 36px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #f0f0f1;
}
.pvcd-thumb-placeholder {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	background: #f6f7f7;
	border-radius: 4px;
	font-size: 16px;
	flex-shrink: 0;
}
.pvcd-pet-name { font-size: 13px; color: #1d2327; }

.pvcd-owner-cell { line-height: 1.5; }
.pvcd-owner-name { display: block; }
.pvcd-owner-email {
	display: block;
	font-size: 11px;
	color: #646970;
	text-decoration: none;
}
.pvcd-owner-email:hover { text-decoration: underline; }
.pvcd-date { color: #646970; white-space: nowrap; }

.pvcd-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.pvcd-badge-publish { background: #edfaef; color: #00a32a; border: 1px solid #b8e6bf; }
.pvcd-badge-pending { background: #fffbeb; color: #996800; border: 1px solid #f5e6a3; }

.pvcd-col-votes strong { font-size: 15px; color: #1d2327; }

.pvcd-edit-link {
	color: #2271b1;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
}
.pvcd-edit-link:hover { color: #135e96; text-decoration: underline; }

.pvcd-empty { color: #646970; padding: 24px 16px; text-align: center; margin: 0; }

/* --- Settings form inside card --- */
.pvcd-settings-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 14px;
}
.pvcd-settings-label {
	font-size: 11px;
	font-weight: 700;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.pvcd-settings-input {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	font-size: 13px;
	font-family: inherit;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .1s, box-shadow .1s;
}
.pvcd-settings-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.pvcd-settings-row-check { gap: 6px; }
.pvcd-settings-check-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	cursor: pointer;
}
.pvcd-settings-check-label input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.pvcd-settings-hint { font-size: 11px; color: #646970; }
.pvcd-settings-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #f0f0f1;
}
.pvcd-btn-save {
	padding: 6px 16px;
	background: #2271b1;
	color: #fff;
	border: 1px solid #135e96;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background .12s;
}
.pvcd-btn-save:hover:not(:disabled) { background: #135e96; }
.pvcd-btn-save:disabled { opacity: .6; cursor: not-allowed; }
.pvcd-settings-msg { font-size: 12px; font-weight: 600; }
.pvcd-settings-msg.is-success { color: #00a32a; }
.pvcd-settings-msg.is-error   { color: #d63638; }

/* --- Entry action buttons --- */
.pvcd-col-actions { width: 160px; }
.pvcd-row-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pvcd-action-btn {
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 3px;
	border: 1px solid;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.6;
	white-space: nowrap;
	transition: opacity .1s;
}
.pvcd-action-btn:hover:not(:disabled)    { opacity: .75; }
.pvcd-action-btn:disabled                { opacity: .4; cursor: not-allowed; }
.pvcd-action-approve   { background: #edfaef; color: #00a32a; border-color: #b8e6bf; }
.pvcd-action-unapprove { background: #f0f0f1; color: #50575e; border-color: #c3c4c7; }
.pvcd-action-reject    { background: #fdf2f2; color: #d63638; border-color: #f5c2c2; }

/* Row removal animation */
@keyframes pvcd-fade-out {
	to { opacity: 0; transform: translateX(12px); }
}
.pvcd-row-removing { animation: pvcd-fade-out .35s ease forwards; }
