/* ==========================================================================
   Auto Internal Linker & Related Jobs Box - Frontend Styles
   ========================================================================== */

.rpil-wrapper {
	margin: 28px 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

.rpil-wrapper * {
	box-sizing: border-box;
}

/* Box Section Title */
.rpil-box-title {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 16px 0;
	display: flex;
	align-items: center;
	gap: 8px;
	line-height: 1.4;
}

/* Cards Container */
.rpil-cards-container {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Base Card Styling */
.rpil-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 16px;
	transition: all 0.2s ease-in-out;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rpil-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Thumbnails */
.rpil-card-thumb-link {
	display: block;
	flex-shrink: 0;
	text-decoration: none !important;
}

.rpil-card-thumb {
	display: block;
	object-fit: cover;
	border-radius: 10px;
}

/* Layout 1 Specific Thumbnail */
.rpil-card-layout1 .rpil-card-thumb {
	width: 76px;
	height: 76px;
}

/* Layout 2 Specific Thumbnail */
.rpil-card-layout2 .rpil-card-thumb {
	width: 64px;
	height: 64px;
}

/* Card Main Content */
.rpil-card-content {
	flex: 1;
	min-width: 0; /* Prevents text overflow */
}

/* Country Tags & Badges */
.rpil-country-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	margin-bottom: 6px;
}

.rpil-country-text {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

/* Dynamic Tier 1 Tag Colors */
.rpil-tag-ca { color: #16a34a !important; } /* Green */
.rpil-tag-au { color: #d97706 !important; } /* Amber / Gold */
.rpil-tag-us { color: #2563eb !important; } /* Blue */
.rpil-tag-uk { color: #7c3aed !important; } /* Purple */
.rpil-tag-de { color: #0284c7 !important; } /* Sky Blue */
.rpil-tag-ch { color: #dc2626 !important; } /* Red */
.rpil-tag-global { color: #64748b !important; } /* Slate */

/* Post Heading / Title */
.rpil-card-heading {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

.rpil-card-layout2 .rpil-card-heading {
	font-size: 14px;
	font-weight: 600;
}

.rpil-card-heading a {
	color: #0f172a !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
	display: inline;
}

.rpil-card-heading a:hover {
	color: #2563eb !important;
}

.rpil-title-icon {
	margin-right: 4px;
	font-size: 14px;
}

/* CTA Action Button */
.rpil-card-action {
	flex-shrink: 0;
}

.rpil-btn {
	display: inline-block;
	background-color: #2563eb;
	color: #ffffff !important;
	font-weight: 700;
	text-decoration: none !important;
	text-align: center;
	border-radius: 8px;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
	white-space: nowrap;
}

.rpil-btn:hover {
	background-color: #1d4ed8;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Layout 1 Button Size */
.rpil-btn-layout1 {
	padding: 10px 20px;
	font-size: 13px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* Layout 2 Button Size */
.rpil-btn-layout2 {
	padding: 8px 16px;
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 640px) {
	.rpil-card {
		padding: 12px;
		gap: 12px;
	}

	.rpil-card-layout1 .rpil-card-thumb {
		width: 60px;
		height: 60px;
	}

	.rpil-card-layout2 .rpil-card-thumb {
		width: 50px;
		height: 50px;
	}

	.rpil-card-heading {
		font-size: 13px;
		line-height: 1.3;
	}

	.rpil-btn-layout1 {
		padding: 8px 12px;
		font-size: 11px;
	}

	.rpil-btn-layout2 {
		padding: 6px 10px;
		font-size: 10px;
	}
}

@media (max-width: 480px) {
	.rpil-card {
		flex-wrap: wrap;
	}

	.rpil-card-action {
		width: 100%;
		margin-top: 4px;
	}

	.rpil-btn {
		display: block;
		width: 100%;
		padding: 9px 0;
	}
}
