/**
 * ATS Job Board Frontend Styles
 *
 * Uses CSS custom properties for theming
 */

/* Smooth Scrolling */
html {
	scroll-behavior: smooth;
}

/* Container */
.ats-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Job Search Form - Header */
.ats-archive-header {
	padding: 50px 0 10px 0;
}

/* Job Search Form - Horizontal */
.ats-job-search-form {
	display: flex;
	gap: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	margin-bottom: 1.5rem;
	border-top: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
	border-left: 1px solid #e5e5e5;
}

.ats-job-search-form input,
.ats-job-search-form select {
	border: none;
	border-right: 1px solid #e5e7eb;
	padding: 1rem 1.5rem;
	flex: 1;
	font-size: 1rem;
}

.ats-job-search-form input:focus,
.ats-job-search-form select:focus {
	outline: none;
	background: #f9fafb;
}

.ats-job-search-form select {
	flex: 0 0 200px;
}

.ats-search-submit {
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 1rem 2rem;
	border: none;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.ats-search-submit:hover {
	background: var(--ats-color-button-hover);
	color: var(--ats-color-button-text) !important;
}

/* Sort Bar */
.ats-sort-bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1.5rem;
}

.ats-sort-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ats-sort-form label {
	font-weight: 600;
	color: #374151;
}

.ats-sort-form select {
	padding: 0.5rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}

/* Jobs List */
.ats-jobs-list {
	margin-bottom: 2rem;
}

/* Job Card - Horizontal Layout */
.ats-job-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s;
}

.ats-job-card:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ats-job-card-content {
	flex: 1;
	min-width: 0;
}

.ats-job-card-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.ats-job-card-row:first-child {
	margin-bottom: 0.5rem;
}

.ats-job-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
}

.ats-job-card-title a {
	color: #374151;
	text-decoration: none;
}

.ats-job-card-title a:hover {
	color: var(--ats-color-primary);
}

.ats-job-card-location,
.ats-job-card-salary {
	font-size: 0.875rem;
	color: #6b7280;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.ats-job-card-location i,
.ats-job-card-salary i {
	color: var(--ats-color-primary);
}

.ats-job-card-badges {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ats-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background: var(--ats-color-primary);
	color: #fff;
	border-radius: 4px;
}

.ats-badge:nth-child(2) {
	background: #6b7280;
}

.ats-job-card-button {
	display: inline-block;
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 0.75rem 1.5rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
	font-size: 18px;
}

.ats-job-card-button:hover {
	background: var(--ats-color-button-hover);
	color: var(--ats-color-button-text) !important;
}

/* Filters Sidebar */
.ats-filters-wrapper {
	position: relative;
}

.ats-filters-toggle {
	display: none;
	width: 100%;
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	border: none;
	padding: 1rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	margin-bottom: 0.5rem;
	transition: background 0.2s;
	justify-content: space-between;
	align-items: center;
}

.ats-filters-toggle:hover {
	background: var(--ats-color-button-hover);
}

.ats-filters-toggle i {
	transition: transform 0.3s;
}

.ats-filters {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 2rem;
}

.ats-filter-section {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.ats-filter-section:last-of-type {
	border-bottom: none;
	margin-bottom: 1rem;
	padding-bottom: 0;
}

.ats-filter-section h4 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
	color: #374151;
}

.ats-filter-dropdown {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.875rem;
}

.ats-filter-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ats-filter-checkboxes label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0;
	cursor: pointer;
	font-size: 0.875rem;
	color: #374151;
}

.ats-filter-checkboxes input[type="checkbox"] {
	width: auto;
	cursor: pointer;
}

.ats-filter-salary {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.ats-filter-salary input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.875rem;
}

.ats-filter-salary span {
	color: #6b7280;
}

.ats-filter-submit {
	width: 100%;
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 0.75rem 1rem;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.ats-filter-submit:hover {
	background: var(--ats-color-button-hover);
}

/* Pagination */
.ats-pagination {
	margin: 40px 0;
	text-align: center;
}

.ats-pagination .page-numbers {
	display: inline-flex;
	margin: 0 5px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	color: #374151;
	text-decoration: none;
	transition: all 0.2s;
	list-style: none;
}

.ats-pagination .page-numbers.current {
	background: var(--ats-color-pagination);
	color: var(--ats-color-pagination-text);
	border-color: var(--ats-color-pagination);
}

/* Single Job */
.ats-job-single .ats-job-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #e5e7eb;
}

.ats-job-title {
	color: var(--ats-color-primary);
	margin-bottom: 15px;
}

.ats-job-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	font-size: 16px;
	color: #6b7280;
}

.ats-job-description {
	line-height: 1.8;
	margin-bottom: 40px;
}

/* Application Form */
.ats-application-form-container {
	background: #f9fafb;
	padding: 40px;
	border-radius: 8px;
	margin-top: 40px;
}

.ats-application-form-container h2 {
	margin-top: 0;
	margin-bottom: 30px;
	color: var(--ats-color-primary);
}

.ats-form-field {
	margin-bottom: 25px;
}

.ats-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #374151;
}

.ats-form-field input[type="text"],
.ats-form-field input[type="email"],
.ats-form-field input[type="tel"],
.ats-form-field input[type="file"],
.ats-form-field select,
.ats-form-field textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}

.ats-form-field textarea {
	resize: vertical;
}

.ats-form-field small {
	display: block;
	margin-top: 5px;
	color: #6b7280;
	font-size: 13px;
}

.ats-form-field .required {
	color: #ef4444;
}

.ats-privacy-field label {
	display: flex;
	align-items: start;
	gap: 8px;
	font-weight: normal;
}

.ats-privacy-field input[type="checkbox"] {
	width: auto;
	margin-top: 3px;
}

.ats-submit-button {
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 14px 40px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.ats-submit-button:hover {
	background: var(--ats-color-button-hover);
}

.ats-form-messages {
	margin: 20px 0;
	padding: 15px;
	border-radius: 4px;
	display: none;
}

.ats-form-messages.success {
	display: block;
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #10b981;
}

.ats-form-messages.error {
	display: block;
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #ef4444;
}

/* No Results */
.ats-no-results,
.ats-no-jobs {
	text-align: center;
	padding: 60px 20px;
	color: #6b7280;
	font-size: 18px;
}

/* Layout System */
.ats-row {
	display: flex;
	gap: 2rem;
}

.ats-col-75 {
	flex: 0 0 74%;
}

.ats-col-25 {
	flex: 0 0 24%;
}

/* Single Job Page Layout */
.ats-single-job {
	padding-bottom: 60px;
}

.ats-single-job .ats-job-header {
	background: #f9fafb;
	padding: 40px 0 30px;
	margin-bottom: 40px;
}

.ats-single-job .ats-job-header h1 {
	margin: 0 0 15px;
	color: var(--ats-color-primary);
}

/* Breadcrumbs */
.ats-breadcrumbs {
	font-size: 14px;
	color: #6b7280;
}

.ats-breadcrumbs a {
	color: var(--ats-color-primary);
	text-decoration: none;
}

.ats-breadcrumbs a:hover {
	text-decoration: underline;
}

.ats-breadcrumbs span {
	margin: 0 8px;
}

/* Main Job Content Section */
.ats-job-main {
	margin-bottom: 60px;
}

.ats-job-main .ats-col-25 {
	position: sticky;
	top: 2rem;
	align-self: flex-start;
}

.ats-job-description {
	line-height: 1.8;
	color: #374151;
}

.ats-job-description h2,
.ats-job-description h3,
.ats-job-description h4 {
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: var(--ats-color-primary);
}

.ats-job-description ul,
.ats-job-description ol {
	margin: 1rem 0 1rem 1.5rem;
}

.ats-job-description li {
	margin-bottom: 0.5rem;
}

/* Job Sidebar */
.ats-job-sidebar {
	background: var(--ats-color-card-bg, #fff);
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ats-job-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
}

.ats-job-sidebar li {
	display: flex;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--ats-color-border, #eee);
}

.ats-job-sidebar li:last-child {
	border-bottom: none;
}

.ats-job-sidebar i {
	color: var(--ats-color-primary);
	width: 1.25rem;
	text-align: center;
	flex-shrink: 0;
}

.ats-job-sidebar .label {
	display: block;
	font-size: 0.875rem;
	color: #6b7280;
	margin-bottom: 0.25rem;
}

.ats-job-sidebar strong {
	display: block;
	color: #374151;
	font-weight: 600;
}

.ats-apply-button {
	display: block;
	width: 100%;
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 14px 0;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s;
}

.ats-apply-button:hover {
	background: var(--ats-color-button-hover);
}

/* Application Form Section */
.ats-job-apply {
	background: #f9fafb;
	padding: 60px 0;
	margin-bottom: 60px;
}

/* Social Share */
.ats-job-share {
	margin-bottom: 40px;
}

.ats-social-share h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 18px;
	color: var(--ats-color-primary);
}

.ats-social-buttons {
	display: flex;
	flex-direction: row;
	gap: 15px;
	align-items: center;
}

.ats-social-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 24px;
	transition: all 0.2s;
}

.ats-social-button span {
	display: none;
}

.ats-social-button i {
	width: auto;
}

.ats-social-linkedin {
	color: #0077b5;
}

.ats-social-linkedin:hover {
	color: #006399;
}

.ats-social-facebook {
	color: #1877f2;
}

.ats-social-facebook:hover {
	color: #145dbf;
}

.ats-social-twitter {
	color: #000;
}

.ats-social-twitter:hover {
	color: #333;
}

/* Recent Jobs Section */
.ats-job-footer {
	margin-bottom: 60px;
}

.ats-recent-jobs h3 {
	margin-top: 0;
	margin-bottom: 30px;
	color: var(--ats-color-primary);
}

.ats-recent-jobs-grid {
	display: grid;
	gap: 20px;
}

/* View All Jobs Button */
.ats-view-all-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 2rem 0;
	padding: 1rem 0;
}

.ats-view-all-button {
	display: inline-block;
	background: var(--ats-color-button-bg);
	color: var(--ats-color-button-text);
	padding: 1rem 2.5rem;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ats-view-all-button:hover {
	background: var(--ats-color-button-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
	/* Search bar stacks vertically */
	.ats-job-search-form {
		flex-direction: column;
	}
	
	.ats-job-search-form input,
	.ats-job-search-form select {
		border-right: none;
		border-bottom: 1px solid #e5e7eb;
	}

	.ats-job-search-form select {
		flex: none;
	}
	
	.ats-application-form-container {
		padding: 20px;
	}

	.ats-row {
		flex-direction: column;
	}

	.ats-col-75,
	.ats-col-25 {
		flex: 0 0 100%;
	}

	/* Archive: show filters first on mobile */
	.ats-job-archive .ats-row {
		flex-direction: column-reverse;
	}

	.ats-filters-toggle {
		display: flex;
	}

	.ats-filters {
		position: static;
		margin-bottom: 2rem;
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		padding: 0 1.5rem;
		transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
	}

	.ats-filters.active {
		max-height: 2000px;
		opacity: 1;
		padding: 1.5rem;
	}

	/* Job card stacks vertically */
	.ats-job-card {
		flex-direction: column;
		align-items: stretch;
	}
	
	.ats-job-card-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.ats-job-card-button {
		width: 100%;
		text-align: center;
		margin-top: 0.5rem;
		padding-left: 0;
		padding-right: 0;
	}

	/* Single job page: show sidebar first on mobile */
	.ats-job-main .ats-row {
		flex-direction: column-reverse;
	}

	.ats-job-main .ats-col-25 {
		position: static;
		margin-bottom: 30px;
	}

	.ats-single-job .ats-job-header {
		padding: 30px 0 20px;
	}

	.ats-job-main,
	.ats-job-apply,
	.ats-job-share,
	.ats-job-footer {
		margin-bottom: 30px;
	}

	.ats-job-apply {
		padding: 40px 0;
	}

	.ats-sort-bar {
		justify-content: flex-start;
	}
}


/* =====================================================
   Brand Styles
   ===================================================== */

/* Job card — logo as its own column, sits between card edge and content */
.ats-brand-logo-col {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.ats-brand-logo-card {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 4px;
	border: 1px solid #e5e7eb;
}

/* Brand name inline with badges */
.ats-brand-name {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ats-color-primary, #2563eb);
}

.ats-brand-name-sep {
	color: #d1d5db;
	font-size: 0.8rem;
}

/* Single job brand header */
.ats-job-brand-header {
	padding: 0.875rem 0;
}

.ats-job-brand-header .ats-container {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.ats-brand-logo-single {
	width: 100px;
	height: 100px;
	object-fit: contain;
	border-radius: 6px;
	flex-shrink: 0;
	border: 1px solid #e5e7eb;
}

.ats-brand-name-single {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ats-color-primary, #2563eb);
}

@media (min-width: 768px) {
	.ats-brand-logo-single {
		width: 150px;
		height: 150px;
	}

	.ats-brand-name-single {
		font-size: 1.5rem;
	}
}
