/**
 * Single job page — comments + single-job advertisements.
 * Kept minimal to match existing liquid/glass design language.
 */

/* --------------------------------------------------------------------------
   Comments section
   -------------------------------------------------------------------------- */

.djm-comments-section {
	margin: 2rem 0 1.5rem;
	padding: 1.25rem 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.djm-comments-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.djm-comments-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.djm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	background: #2159e5;
	color: #fff;
	text-decoration: none;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.djm-btn:hover,
.djm-btn:focus {
	background: #1a47c0;
	color: #fff;
	outline: none;
}

.djm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.djm-btn-add-comment {
	background: #2159e5;
}

.djm-btn-load-more {
	background: transparent;
	color: #2159e5;
	border-color: #2159e5;
}

.djm-btn-load-more:hover {
	background: #2159e5;
	color: #fff;
}

.djm-btn-submit {
	background: #2159e5;
}

.djm-btn-reply {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: #2159e5;
	cursor: pointer;
}

.djm-btn-reply:hover {
	text-decoration: underline;
}

.djm-comment-form-wrap {
	margin-bottom: 1.25rem;
	padding: 1rem;
	background: rgba(33, 89, 229, 0.04);
	border: 1px solid rgba(33, 89, 229, 0.12);
	border-radius: 8px;
}

.djm-comment-form-wrap[hidden],
.djm-reply-form-slot[hidden],
.djm-comments-loading[hidden],
.djm-form-message[hidden] {
	display: none !important;
}

.djm-comment-form .djm-form-row {
	margin-bottom: 0.75rem;
}

.djm-comment-form .djm-form-row-half {
	display: inline-block;
	width: calc(50% - 0.5rem);
	vertical-align: top;
}

.djm-comment-form .djm-form-row-half:first-of-type {
	margin-right: 1rem;
}

.djm-comment-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.djm-comment-form .required {
	color: #b32d2e;
}

.djm-comment-form input[type="text"],
.djm-comment-form input[type="email"],
.djm-comment-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.65rem;
	/* 16px prevents iOS Safari auto-zoom on focus */
	font-size: 16px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
}

.djm-comment-form textarea {
	min-height: 90px;
	resize: vertical;
}

.djm-comment-form input:focus,
.djm-comment-form textarea:focus {
	border-color: #2159e5;
	outline: none;
	box-shadow: 0 0 0 2px rgba(33, 89, 229, 0.15);
}

.djm-comment-logged-as {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: #555;
}

.djm-replying-to {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.djm-cancel-reply {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.85rem;
	color: #b32d2e;
	cursor: pointer;
	text-decoration: underline;
}

.djm-form-actions {
	margin-top: 0.5rem;
}

.djm-form-message {
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.djm-form-message.is-error {
	color: #b32d2e;
}

.djm-form-message.is-success {
	color: #1a7f37;
}

.djm-comments-login-note {
	margin: 0;
	font-size: 0.9rem;
}

.djm-no-comments {
	margin: 0.5rem 0 1rem;
	color: #666;
	font-size: 0.95rem;
}

.djm-comment-thread {
	list-style: none;
	margin: 0;
	padding: 0;
}

.djm-comment {
	margin: 0 0 1rem;
}

.djm-comment-body {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.djm-comment-avatar img {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.djm-comment-content {
	flex: 1;
	min-width: 0;
}

.djm-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.25rem;
}

.djm-comment-author {
	font-weight: 600;
	font-size: 0.95rem;
}

.djm-comment-date {
	font-size: 0.8rem;
	color: #777;
}

.djm-comment-text {
	font-size: 0.95rem;
	line-height: 1.5;
	word-wrap: break-word;
}

.djm-comment-text p {
	margin: 0 0 0.4em;
}

.djm-comment-text p:last-child {
	margin-bottom: 0;
}

.djm-comment-actions {
	margin-top: 0.35rem;
}

.djm-comment-replies {
	margin: 0.75rem 0 0 0;
	padding-left: 1rem;
	border-left: 2px solid rgba(33, 89, 229, 0.2);
	list-style: none;
}

.djm-reply-form-slot {
	margin-top: 0.75rem;
	padding: 0.75rem;
	background: rgba(0, 0, 0, 0.02);
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.djm-comments-load-more-wrap {
	text-align: center;
	margin: 1.25rem 0 0.5rem;
}

.djm-comments-loading {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.9rem;
	color: #666;
}

/* --------------------------------------------------------------------------
   Single job advertisements
   -------------------------------------------------------------------------- */

.djm-single-ads {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1.5rem 0;
}

.djm-single-ad {
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.djm-single-ad.has-image {
	padding: 0;
}

.djm-single-ad-image-link {
	display: block;
	position: relative;
	text-decoration: none;
	color: inherit;
}

/* Never crop ad images — full image visible, aspect ratio preserved */
.djm-single-ad-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 120px;
	max-height: 420px;
	background: #f5f7fb;
	overflow: hidden;
}

.djm-single-ad-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: contain;
	object-position: center;
}

.djm-single-ad-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 0.2rem 0.5rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	border-radius: 4px;
	z-index: 1;
}

.djm-single-ad-inner {
	padding: 1.25rem 1.5rem;
	text-align: center;
}

.djm-single-ad-icon {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
	line-height: 1;
}

.djm-single-ad-title {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
	font-weight: 600;
}

.djm-single-ad-desc {
	margin: 0 0 0.85rem;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.4;
}

.djm-single-ad-btn {
	display: inline-flex;
	padding: 0.45rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	background: #2159e5;
	color: #fff;
	border-radius: 6px;
	text-decoration: none;
}

.djm-single-ad-btn:hover {
	background: #1a47c0;
	color: #fff;
}

@media (max-width: 640px) {
	/* Keep header + name/email as 2-column flex on all devices (desktop-like). */
	.djm-comments-header,
	.djm-theme-comments-header {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}

	.djm-comment-replies {
		padding-left: 0.65rem;
	}

	.djm-comment-avatar img {
		width: 32px;
		height: 32px;
	}

	.djm-single-ad-image-wrap {
		max-height: 280px;
	}

	.djm-single-ad-image {
		max-height: 280px;
	}
}


/* --------------------------------------------------------------------------
   Theme native comments (plugin custom UI disabled)
   Hidden form initially + Add Comment toggle + 2-col name/email on all devices
   -------------------------------------------------------------------------- */

.djm-theme-comments-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 1.25rem 0 1rem;
}

.djm-theme-comments-header #reply-title,
.djm-theme-comments-header .comment-reply-title,
.djm-theme-comments-heading {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.djm-theme-comment-form-wrap {
	margin-bottom: 1.25rem;
	padding: 1rem;
	background: rgba(33, 89, 229, 0.04);
	border: 1px solid rgba(33, 89, 229, 0.12);
	border-radius: 8px;
}

.djm-theme-comment-form-wrap[hidden] {
	display: none !important;
}

/* Standard WP comment form fields — 2 columns like desktop on ALL devices */
.single-job_listing #commentform,
.single-job_listing .comment-form,
.djm-single-job #commentform,
.djm-single-job .comment-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

.single-job_listing #commentform > p,
.single-job_listing .comment-form > p,
.djm-single-job #commentform > p,
.djm-single-job .comment-form > p {
	margin: 0 0 0.5rem;
	box-sizing: border-box;
}

/* Name + Email side by side (2 columns) on every screen size */
.single-job_listing .comment-form-author,
.single-job_listing .comment-form-email,
.djm-single-job .comment-form-author,
.djm-single-job .comment-form-email {
	flex: 1 1 calc(50% - 0.5rem);
	min-width: 0;
	max-width: calc(50% - 0.5rem);
}

.single-job_listing .comment-form-url,
.single-job_listing .comment-form-comment,
.single-job_listing .comment-notes,
.single-job_listing .comment-form-cookies-consent,
.single-job_listing .form-submit,
.djm-single-job .comment-form-url,
.djm-single-job .comment-form-comment,
.djm-single-job .comment-notes,
.djm-single-job .comment-form-cookies-consent,
.djm-single-job .form-submit {
	flex: 1 1 100%;
	max-width: 100%;
}

.single-job_listing #commentform label,
.single-job_listing .comment-form label,
.djm-single-job #commentform label,
.djm-single-job .comment-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.single-job_listing #commentform input[type="text"],
.single-job_listing #commentform input[type="email"],
.single-job_listing #commentform input[type="url"],
.single-job_listing #commentform textarea,
.djm-single-job #commentform input[type="text"],
.djm-single-job #commentform input[type="email"],
.djm-single-job #commentform input[type="url"],
.djm-single-job #commentform textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.65rem;
	/* 16px prevents iOS Safari auto-zoom on focus */
	font-size: 16px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
}

.single-job_listing #commentform textarea,
.djm-single-job #commentform textarea {
	min-height: 90px;
	resize: vertical;
}

.single-job_listing #commentform input:focus,
.single-job_listing #commentform textarea:focus,
.djm-single-job #commentform input:focus,
.djm-single-job #commentform textarea:focus {
	border-color: #2159e5;
	outline: none;
	box-shadow: 0 0 0 2px rgba(33, 89, 229, 0.15);
}

.single-job_listing #commentform .form-submit input[type="submit"],
.single-job_listing .comment-form .form-submit input[type="submit"],
.djm-single-job #commentform .form-submit input[type="submit"],
.djm-single-job .comment-form .form-submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	background: #2159e5;
	color: #fff;
	transition: background 0.15s ease;
}

.single-job_listing #commentform .form-submit input[type="submit"]:hover,
.djm-single-job #commentform .form-submit input[type="submit"]:hover {
	background: #1a47c0;
}

/* Hide plugin custom section if any leftover markup appears */
#djm-comments,
.djm-comments-section {
	display: none !important;
}
