/**
 * DeiraJobs Ads (Ad Banner + Google AdSense) — Shared stylesheet
 *
 * Specificity intentionally kept low (.class = 0,1,0) so that Elementor
 * controls ({{WRAPPER}} .class = 0,2,0) always override it.
 */

.deira-ad,
.deira-adsense {
	position: relative;
	box-sizing: border-box;
}

.deira-ad *,
.deira-ad *::before,
.deira-ad *::after {
	box-sizing: border-box;
}

.dad-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.dad-editor-note {
	margin: 6px 0;
	padding: 6px 10px;
	font-size: 12px;
	color: #92400e;
	background: #fef3c7;
	border-radius: 6px;
}

/* ──────────────────────────────────────────
   AD BANNER
────────────────────────────────────────── */
.deira-ad {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.deira-ad.is-closed { display: none; }

.dad-label {
	display: block;
	color: #6b7280;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.dad-label--above { margin-bottom: 6px; }

.dad-label--overlay {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 3;
	padding: 2px 7px;
	background-color: rgba(255, 255, 255, .92);
	border-radius: 4px;
	pointer-events: none;
}

/* Frame keeps the exact format ratio and scales down with the container */
.dad-frame {
	--dad-w: 728px;
	--dad-ratio: 728 / 90;
	position: relative;
	width: min(100%, var(--dad-w));
	aspect-ratio: var(--dad-ratio);
	overflow: hidden;
	background: linear-gradient(120deg, #0f172a 0%, #1e293b 100%);
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	transition: transform .3s ease, box-shadow .3s ease;
}

@media (max-width: 767px) {
	.dad-mobile-format .dad-frame {
		width: min(100%, var(--dad-mw, var(--dad-w)));
		aspect-ratio: var(--dad-mratio, var(--dad-ratio));
	}
}

.dad-creative {
	position: absolute;
	inset: 0;
	display: block;
	color: inherit;
	text-decoration: none;
}

.dad-creative[hidden] { display: none; }
.dad-creative.is-entering { animation: dad-fade .6s ease both; }

@keyframes dad-fade { from { opacity: 0; } to { opacity: 1; } }

.dad-creative:focus-visible {
	outline: 3px solid #ad881e;
	outline-offset: -3px;
}

.dad-creative picture {
	display: block;
	width: 100%;
	height: 100%;
}

.dad-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.dad-hover-lift .dad-frame:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}

.dad-hover-zoom .dad-frame:hover .dad-img { transform: scale(1.04); }

/* Placeholder until the advertiser image is uploaded */
.dad-placeholder {
	--dad-accent: #e9c46a;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 100%;
	padding: 8px;
	color: #ffffff;
	text-align: center;
	background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 12px, transparent 12px 24px);
}

.dad-placeholder strong { font-size: clamp(13px, 2.2vw, 18px); line-height: 1.2; }
.dad-placeholder__size { color: var(--dad-accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; }

/* Native card */
.dad-format-card .dad-frame {
	width: 100%;
	max-width: 380px;
	aspect-ratio: auto;
	background: none;
}

.dad-format-card .dad-creative { position: relative; inset: auto; height: 100%; }

.dad-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #ffffff;
}

.dad-card--horizontal { flex-direction: row; }

.dad-card__media {
	position: relative;
	display: block;
	height: 200px;
	overflow: hidden;
	background-color: #0f172a;
}

.dad-card--horizontal .dad-card__media { flex: 0 0 40%; height: auto; min-height: 160px; }

.dad-card__media picture,
.dad-card__media .dad-img,
.dad-placeholder--card { position: absolute; inset: 0; }

.dad-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
	padding: 20px 22px 22px;
}

.dad-card__advertiser { color: #ad881e; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dad-card__title { color: #0f172a; font-size: 18px; font-weight: 700; line-height: 1.3; }
.dad-card__text { color: #4b5563; font-size: 14px; line-height: 1.55; }

.dad-card__btn {
	align-self: flex-start;
	margin-top: 10px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	background-color: #0f172a;
	border: 2px solid #0f172a;
	border-radius: 10px;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.dad-creative:hover .dad-card__btn,
.dad-creative:focus-visible .dad-card__btn { color: #0f172a; background-color: #e9c46a; border-color: #e9c46a; }

@media (max-width: 520px) {
	.dad-card--horizontal { flex-direction: column; }
	.dad-card--horizontal .dad-card__media { height: 180px; }
}

/* Close button */
.dad-close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	color: #0f172a;
	background-color: rgba(255, 255, 255, .92);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.dad-close:focus-visible { outline: 2px solid #ad881e; outline-offset: 2px; }

.dad-pixel {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* ──────────────────────────────────────────
   GOOGLE ADSENSE
────────────────────────────────────────── */
.deira-adsense { text-align: center; }

.das-label {
	display: block;
	margin-bottom: 6px;
	color: #6b7280;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.das-slot {
	min-height: 100px;
	max-width: 100%;
}

/* Unfilled ads (AdSense sets data-ad-status="unfilled") */
.das-collapse ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.das-collapse:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* Editor placeholder */
.das-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	margin-inline: auto;
	padding: 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #475569;
	background-color: #f1f5f9;
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
}

/* ──────────────────────────────────────────
   REDUCED MOTION
────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.deira-ad * { transition: none !important; animation: none !important; }
	.dad-hover-lift .dad-frame:hover { transform: none; }
}

/* ──────────────────────────────────────────
   PLACEMENTS (Settings › DeiraJobs Ads: articles, job pages, Job Board)
────────────────────────────────────────── */
.deira-ad-placement {
	clear: both;
	margin: 28px 0;
}

/* Reserved height: Settings › DeiraJobs Ads (inline --das-h on each placement) */
.deira-ad-placement .das-slot { min-height: var(--das-h, 120px); }

.djb-ad-row .deira-ad-placement { margin: 4px 0; }

/* Sidebar placement: widget (blog articles) and EdouJob right column (job pages) */
.deira-ad-placement--sidebar { margin: 0; }
.deira-job-sidebar-ad[hidden] { display: none; }
.deira-job-sidebar-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.widget_deira_ad:not(:has(.deira-adsense)) { display: none; }

/* Job page, above the description (desktop): 32px away from the header card and the description */
.deira-ad-job-top { margin: 4px 0 32px; } /* + the 28px under the header card */
.deira-ad-job-top .deira-ad-placement { margin: 0; }
.deira-ad-job-top:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
