/*
Theme Name: JobBoard
Theme URI: https://example.com
Author: Ujjwal Shrestha
Author URI: https://example.com
Description: Lightweight custom theme for WP Job Manager job board.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jobboard
*/

/* Custom styles start here */

/* CSS Reset and Base Styles */
/* CSS Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --background: #f9f9f9;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-foreground: #1a1a1a;
  --primary: #1a1a1a;
  --primary-foreground: #fafafa;
  --secondary: #f3f3f3;
  --secondary-foreground: #1a1a1a;
  --muted: #f0f0f0;
  --muted-foreground: #6b6b6b;
  --accent: #eb6131;
  --accent-foreground: #fafafa;
  --border: #e5e5e5;
  --ring: #eb6131;

  /* Typography */
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --radius: 0.5rem;
}

html {
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}

h3 {
  font-size: 1rem;
  line-height: 1.4;
}

p {
  line-height: 1.6;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--primary);
}

.logo-icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary-foreground);
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .header-container {
    padding: 0 1.5rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #333;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background-color: #e5e5e5;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--muted);
}

.btn-ghost {
  background-color: transparent;
  color: var(--muted-foreground);
}

.btn-ghost:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* Main Container */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 3rem 1.5rem;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 1.875rem;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--muted-foreground);
  font-size: 1rem;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.125rem;
  }
}

/* Search and Filter */
.search-section {
  margin-bottom: 2rem;
}

.search-bar {
  position: relative;
  max-width: 32rem;
  margin: 0 auto 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background-color: var(--card);
  color: var(--foreground);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(13, 150, 104, 0.1);
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background-color: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Job Cards */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card {
  display: block;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.2s;
}

.job-card:hover {
  border-color: var(--ring);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.job-card-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.job-logo {
  display: flex;
  flex-shrink: 0;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.job-info {
  flex: 1;
  min-width: 0;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.job-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  transition: color 0.2s;
}

.job-card:hover .job-title {
  color: var(--accent);
}

.job-company {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.job-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.job-meta-item svg {
  width: 1rem;
  height: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-fulltime {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.badge-parttime {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-contract {
  background-color: var(--muted);
  color: var(--muted-foreground);
}

.badge-remote {
  background-color: rgba(26, 26, 26, 0.1);
  color: var(--primary);
}

/* Job Details Page */
.job-details-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .job-details-container {
    padding: 3rem 1.5rem;
  }
}

.jobs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.jobs-back-link:hover {
  color: var(--foreground);
}

.jobs-back-link svg {
  width: 1rem;
  height: 1rem;
}

.job-details-header {
  margin-bottom: 2rem;
}

.job-details-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.job-details-logo {
  display: flex;
  flex-shrink: 0;
  height: 4rem;
  width: 4rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: var(--muted);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.job-details-title {
  font-size: 1.5rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .job-details-title {
    font-size: 1.875rem;
  }
}

.job-details-company {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--muted-foreground);
}

.job-details-company svg {
  width: 1rem;
  height: 1rem;
}

.job-details-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.separator {
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

.job-content {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .job-content {
    grid-template-columns: 2fr 1fr;
  }
}

.job-section {
  margin-bottom: 2rem;
}

.job-section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.job-section p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.job-section .job-listing-meta,
.job-section .company,
.job-section .job_application {
  display: none;
}

.requirements-list,
.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.requirements-list li,
.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.requirements-list li svg,
.benefits-list li svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: var(--accent);
}

.requirements-list li span,
.benefits-list li span {
  color: var(--muted-foreground);
}

/* Sidebar Card */
.sidebar-card {
  position: sticky;
  top: 6rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.sidebar-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.sidebar-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Form Page */
.form-container {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .form-container {
    padding: 0 1.5rem;
  }
}

.form-header {
  margin-bottom: 2rem;
}

.form-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .form-header h1 {
    font-size: 1.875rem;
  }
}

.form-header p {
  color: var(--muted-foreground);
}

.form-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .form-card {
    padding: 2rem;
  }
}

.form-card-header {
  margin-bottom: 1.5rem;
}

.form-card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-card-header p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-group.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background-color: var(--card);
  color: var(--foreground);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(13, 150, 104, 0.1);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-foreground);
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
}

.form-actions .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .form-actions .btn {
    flex: none;
  }

  .form-actions .btn-primary {
    min-width: 10rem;
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden-sm {
  display: none;
}

@media (min-width: 640px) {
  .hidden-sm {
    display: inline-flex;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background-color: var(--card);
  margin-top: 4rem;
}

.footer-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

@media (min-width: 640px) {
  .footer-container {
    padding: 3rem 1.5rem;
  }
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .logo {
  display: inline-flex;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 20rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background-color: var(--secondary);
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.footer-social a:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.footer-social a svg {
  width: 1rem;
  height: 1rem;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-column a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--foreground);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--foreground);
}

/* No Results Message */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  text-align: center;
}

.no-results svg {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.no-results p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Form Validation Styles */
.field input.error,
.field textarea.error,
.field select.error {
  border-color: #dc2626;
}

.field input.error:focus,
.field textarea.error:focus,
.field select.error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.error-message {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

/* Button States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.success {
  background-color: var(--accent);
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Save Button */
.btn-save.saved {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-foreground);
}

/* Job Card Animation */
.job-card {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s,
    box-shadow 0.2s;
}

/* Featured Job Card */
.job-card.featured {
  position: relative;
  border-color: var(--accent);
  background: linear-gradient(
    to bottom right,
    rgba(150, 84, 13, 0.03),
    transparent
  );
}

.job-card.featured:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(13, 150, 104, 0.15);
}

.featured-badge {
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: 9999px;
}

.featured-badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Filter Row Layout */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .filter-row {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

/* Location Filter Dropdown */
.location-filter {
  position: relative;
  display: flex;
  align-items: center;
}

.location-filter svg {
  position: absolute;
  left: 0.75rem;
  color: var(--muted-foreground);
  pointer-events: none;
  z-index: 1;
}

.location-select {
  appearance: none;
  padding: 0.5rem 2.5rem 0.5rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  min-width: 10rem;
}

.location-select:hover {
  border-color: var(--ring);
}

.location-select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(13, 150, 104, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--muted);
  border-color: var(--ring);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 1rem;
  height: 1rem;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-number:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.pagination-number.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (max-width: 640px) {
  .pagination {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .pagination-btn span {
    display: none;
  }

  .pagination-btn {
    padding: 0.5rem 0.75rem;
  }
}
