.cvd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 40px;
	margin: 20px 0;
}

/* Fixed 4-column layout used by the [cvd_directory] shortcode grid. */
.cvd-grid-4col {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.cvd-grid-4col {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.cvd-grid-4col {
		grid-template-columns: 1fr;
	}
}

.cvd-load-more-wrap {
	display: flex;
	justify-content: center;
	margin: 60px 0;
}

.cvd-load-more-btn {
	padding: 24px 64px;
	border-radius: 999px;
	background: #1c1c1e;
	color: #fff;
	border: none;
	font-size: 30px;
	font-weight: 600;
	cursor: pointer;
}

.cvd-load-more-btn:hover {
	background: #333;
}

.cvd-load-more-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.cvd-card {
	background: #f6f6f8;
	border-radius: 14px;
	overflow: hidden;
	border-bottom: 1px solid #dcdce0;
	transition: transform 0.15s ease;
}

.cvd-card:hover {
	transform: translateY(-3px);
}

.cvd-card-thumb {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #111;
	border-radius: 14px 14px 0 0;
}

.cvd-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cvd-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 32px;
	text-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.cvd-card-duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(0,0,0,0.75);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1.4;
}

.cvd-card-info {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	background: #f6f6f8;
	border-radius: 0 0 14px 14px;
}

.cvd-card-avatar-link {
	flex-shrink: 0;
	line-height: 0;
}

.cvd-card-avatar-link img {
	border-radius: 50%;
	display: block;
}

.cvd-card-meta {
	min-width: 0;
	flex: 1;
}

.cvd-card-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 4px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cvd-card-title a {
	text-decoration: none;
	color: inherit;
}

.cvd-card-subline {
	margin: 0;
	font-size: 13px;
	color: #6b6b70;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cvd-card-subline-dot {
	margin: 0 4px;
}

.cvd-pagination {
	margin: 20px 0;
	display: flex;
	gap: 6px;
}

.cvd-pagination .page-numbers {
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
}

.cvd-pagination .page-numbers.current {
	background: #222;
	color: #fff;
}

.cvd-responsive-embed {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	margin-bottom: 20px;
}

.cvd-responsive-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cvd-entry-hero-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	margin: 0;
}

.cvd-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin: 20px 0;
}

.cvd-gallery img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 6px;
}

/* Front-end upload form ([cvd_upload_form]) */
.cvd-upload-form {
	max-width: 1100px;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.cvd-upload-columns {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.cvd-upload-col-media,
.cvd-upload-col-fields {
	flex: 1 1 320px;
	min-width: 280px;
}

.cvd-dropzone {
	border: 2px dashed #d5d5d9;
	border-radius: 10px;
	padding: 24px;
	background: #f9f9fa;
}

@media (max-width: 700px) {
	.cvd-upload-columns {
		flex-direction: column;
	}
}

.cvd-upload-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.cvd-upload-dynamic-heading {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.cvd-upload-back-link {
	font-size: 14px;
	font-weight: 600;
	color: #1c1c1e;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: #f2f2f4;
	white-space: nowrap;
}

.cvd-upload-back-link:hover {
	background: #e6e6e9;
	text-decoration: none;
}

.cvd-upload-type-toggle {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
}

.cvd-type-option {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	border: 2px solid #e0e0e3;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
}

.cvd-type-option input {
	margin: 0;
}

.cvd-field {
	margin-bottom: 14px;
}

.cvd-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.cvd-field input[type="text"],
.cvd-field input[type="url"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d9;
	border-radius: 6px;
	font-size: 15px;
}

.cvd-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d9;
	border-radius: 6px;
}

.cvd-field textarea {
	width: 100%;
	height: 90px;
	padding: 10px 12px;
	border: 1px solid #d5d5d9;
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
	resize: none;
	box-sizing: border-box;
}

.cvd-field-hint {
	display: block;
	font-size: 12px;
	color: #6b6b70;
	margin-top: 4px;
}

.cvd-rules-field {
	margin-bottom: 20px;
}

.cvd-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
}

.cvd-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.cvd-checkbox-label a {
	color: #c8102e;
	font-weight: 600;
}

.cvd-upload-submit {
	padding: 12px 32px;
	border-radius: 999px;
	background: #c8102e;
	color: #fff;
	border: none;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

.cvd-upload-submit:hover {
	background: #a50d26;
}

.cvd-upload-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.cvd-upload-error {
	background: #fdecea;
	border-left: 4px solid #c8102e;
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.cvd-upload-success {
	background: #eaf7ee;
	border-left: 4px solid #1e9e5a;
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: 4px;
}

/* Tag type-ahead input */
.cvd-tag-input {
	position: relative;
	border: 1px solid #d5d5d9;
	border-radius: 6px;
	padding: 8px;
}

.cvd-tag-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.cvd-tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #eceef0;
	border-radius: 999px;
	padding: 4px 8px 4px 12px;
	font-size: 13px;
	font-weight: 600;
}

.cvd-tag-chip-remove {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	color: #6b6b70;
	padding: 0 2px;
}

.cvd-tag-input input[type="text"] {
	border: none;
	width: 100%;
	padding: 4px;
	font-size: 15px;
	outline: none;
}

.cvd-tag-suggestions {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: #fff;
	border: 1px solid #d5d5d9;
	border-top: none;
	border-radius: 0 0 6px 6px;
	z-index: 20;
	max-height: 180px;
	overflow-y: auto;
}

.cvd-tag-suggestion {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
}

.cvd-tag-suggestion:hover {
	background: #f2f2f4;
}

.cvd-upload-login-notice {
	background: #fff;
	border-radius: 10px;
	padding: 24px;
	text-align: center;
	box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.cvd-upload-btn-link {
	display: inline-block;
	margin: 8px;
	padding: 10px 24px;
	border-radius: 999px;
	background: #1c1c1e;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

/* Subscribe / Subscribed button (used on the single entry page) */
.cvd-subscribe-btn {
	padding: 8px 20px;
	border-radius: 999px;
	border: none;
	background: #c8102e;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}

.cvd-subscribe-btn:hover {
	background: #a50d26;
}

.cvd-subscribe-btn.cvd-subscribed {
	background: #eceef0;
	color: #1c1c1e;
}

.cvd-subscribe-btn.cvd-subscribed:hover {
	background: #fdeceb;
	color: #c8102e;
}

.cvd-subscribe-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Ad boxes on the single entry page */
.cvd-ad-box {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	background: #eceef0;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
	max-height: 264px;
}

.cvd-ad-box img,
.cvd-ad-box video {
	width: 100%;
	height: auto;
	max-height: 264px;
	object-fit: contain;
	display: block;
}

/* Inline tag editor on the single entry page */
.cvd-entry-tags-editor {
	border: 1px solid #d5d5d9;
	border-radius: 10px;
	padding: 12px;
	max-width: 500px;
}

.cvd-entry-tags-editor .cvd-tag-input {
	position: relative;
	border: 1px solid #d5d5d9;
	border-radius: 6px;
	padding: 8px;
	margin-bottom: 10px;
}

.cvd-entry-tags-editor .cvd-tag-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.cvd-entry-tags-editor input[type="text"] {
	border: none;
	width: 100%;
	padding: 4px;
	font-size: 14px;
	outline: none;
}

.cvd-entry-tags-save {
	padding: 8px 20px;
	border-radius: 999px;
	border: none;
	background: #1c1c1e;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.cvd-entry-tags-status {
	margin-left: 10px;
	font-size: 12px;
	color: #6b6b70;
}

.cvd-video-preview-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Pre-roll video ad — plays before the real video, with sound, for
   5 seconds before Skip becomes clickable. */
.cvd-preroll-ad {
	position: relative;
	width: 100%;
	height: 100%;
}

.cvd-preroll-ad-link {
	display: block;
	width: 100%;
	height: 100%;
}

.cvd-preroll-ad-video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	display: block;
}

.cvd-preroll-ad-label {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 4px;
	pointer-events: none;
}

.cvd-preroll-skip-btn {
	position: absolute;
	bottom: 14px;
	right: 14px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.cvd-preroll-skip-btn:disabled {
	opacity: 0.6;
	cursor: default;
}
