/**
 * Bullhorn Public Integration Plugin CSS
 * Provides styling for job listings, filters, details, and application forms.
 */

/* ==========================================================================
   Global Font Styles
   -------------------------------------------------------------------------- */
.bullhorn-jobs-container,
.bullhorn-job-details,
.bullhorn-application-form-wrapper,
.bullhorn-jobs-pagination {
    font-family: inherit;
}

/* ==========================================================================
   General Styles
   ========================================================================== */
.bullhorn-jobs-container {
    margin: 30px 0;
}

/* ==========================================================================
   Global Form Field Styles
   ========================================================================== */

.bullhorn-filter-field input,
.bullhorn-filter-field select,
.bullhorn-form-group input,
.bullhorn-form-group textarea,
.bullhorn-form-group select,
.bullhorn-filter-button {
    font-family: inherit;
    font-size: inherit;
    border-radius: inherit;
    padding: 15px 30px;
}
.bullhorn-filter-button {
    background-color: inherit;
    color: inherit;
    border: 0;
    text-transform: uppercase !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bullhorn-filter-button:hover {
    background-color: inherit;
    color: inherit;
}

/* Container alignment */
.bullhorn-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Button styling */
.bullhorn-submit-button {
  background-color: #0066cc; /* Adjust to your primary brand color */
  color: #ffffff;
  border: none !important;
  padding: 10px 20px 10px 20px !important;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase !important;
  transition: all 0.2s ease;
 }

.bullhorn-submit-button:hover {
  background-color: #0052a3;
  transform: translateY(-1px);
/*  box-shadow: 0 4px 6px rgba(0,0,0,0.15); */
}

.bullhorn-submit-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Spinner styling */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #0066cc; /* Matches button color */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Job Filters & Application Form – Common Field Styling
   ========================================================================== */
.bullhorn-filter-field input,
.bullhorn-filter-field select,
.bullhorn-form-group input[type="text"],
.bullhorn-form-group input[type="email"],
.bullhorn-form-group input[type="tel"],
.bullhorn-form-group textarea,
.bullhorn-form-group select {
    border: 1px solid #333333; 
    border-radius:3px;
    width: 100%;
    transition: border-color 0.2s ease-in-out;
    padding: 10px 15px !important;
}

.bullhorn-filter-field input:focus,
.bullhorn-filter-field select:focus,
.bullhorn-form-group input[type="text"]:focus,
.bullhorn-form-group input[type="email"]:focus,
.bullhorn-form-group input[type="tel"]:focus,
.bullhorn-form-group textarea:focus,
.bullhorn-form-group select:focus {
    outline: none;
    border-color: #11123C;
}

/* ==========================================================================
   Job Filters – Layout
   ========================================================================== */
.bullhorn-jobs-filters {
    margin-bottom: 30px;

}

.bullhorn-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.bullhorn-filter-field {
    flex: 1 1 200px;
}

.bullhorn-filter-submit {
    flex-basis: auto;
}

.bullhorn-filter-button {
    padding: 10px 15px !important;
    border: none !important;
}

.bullhorn-filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Job List & Grid Styles
   ========================================================================== */
.bullhorn-job-item,
.bullhorn-job-card {
  /*  border: 1px solid #E0E0E0;*/
    border-radius: 1px;
    padding: 20px;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.bullhorn-job-item:hover,
.bullhorn-job-card:hover {
  /*  border: 1px solid #BB2253; */
}


.bullhorn-jobs-list .bullhorn-job-item:last-child {
  /*  margin-bottom: 0; */
    margin-top: 10px !important;
}

.bullhorn-job-item .bullhorn-job-header,
.bullhorn-job-card .bullhorn-job-header {
    padding: 0;
    margin: 0;
    border: none;
}

.bullhorn-job-item .bullhorn-job-excerpt,
.bullhorn-job-card .bullhorn-job-excerpt {
    margin-top: 10px;
    margin-bottom: 20px;
}

.bullhorn-job-item .bullhorn-job-actions,
.bullhorn-job-card .bullhorn-job-actions {
    margin-top: auto;
    padding-top: 10px;
}

.bullhorn-job-item .bullhorn-job-actions {
    text-align: left;
}

.bullhorn-job-card .bullhorn-job-actions {
    text-align: right;
}

/* ==========================================================================
   Common Job Item Styles
   ========================================================================== */
.bullhorn-job-title, .wpex-h4 {
    margin-top: inherit;
    margin-bottom: 10px;
    line-height: inherit;
    font-family: inherit;
    font-weight: 700;
    font-size: 21px;
    color: #333333;
}

.bullhorn-job-title a {
    text-decoration: inherit;
    color: inherit;
}

.bullhorn-job-title a:hover {
    text-decoration: inherit;
}

.bullhorn-job-meta {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #333333;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 15px;
}

.bullhorn-meta-label {
    font-weight: 600;
    margin-right: 5px;
}

/* View Details & Apply Now Buttons */
a.bullhorn-job-view-button.button,
a.bullhorn-apply-button.button {
    display: inline-block;
    text-decoration: none;
    line-height: 1;
    padding: 10px 15px;
    border-radius: inherit;
    background-color: #333333;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: inherit;
}

a.bullhorn-job-view-button.button:hover,
a.bullhorn-apply-button.button:hover {
    background-color: #fdcb15;
    color: #000000;
}

a.bullhorn-job-view-button.button::before,
a.bullhorn-apply-button.button::before {
    content: inherit;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.bullhorn-jobs-empty {
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 1px;
    margin-top: 20px;
}

/* ==========================================================================
   Job Details Page
   ========================================================================== */
.bullhorn-job-details {
    margin: 30px 0;
}

.bullhorn-job-back-link {
    margin-bottom: 20px;
    font-size: 0.9em;
}

.bullhorn-job-back-link a {
    color: #333333;
    text-decoration: none;
}

.bullhorn-job-back-link a:hover {
    text-decoration: underline;
}

.bullhorn-job-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.bullhorn-job-content {
    margin-bottom: 30px;
    line-height: 1.6;
}

.bullhorn-job-content p:last-child {
    margin-bottom: 0;
}

.bullhorn-job-apply {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.bullhorn-application-form-container {
    margin-top: 40px;
}

.bullhorn-application-form-container h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5em;
    text-align: center;
}

/* ==========================================================================
   Application Form – Layout
   ========================================================================== */
.bullhorn-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.bullhorn-form-group {
    flex: 1 1 200px;
    min-width: 200px;
}

.bullhorn-form-group.full-width {
    flex-basis: 100%;
}

.bullhorn-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.bullhorn-form-group label .required {
    color: #dc3232;
    font-weight: bold;
    margin-left: 3px;
}

.bullhorn-form-group .description {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666666;
    line-height: 1.4;
}

.bullhorn-privacy-policy {
    margin-top: 10px;
    font-size: 0.9em;
}

.bullhorn-privacy-policy label {
    font-weight: normal;
    display: flex;
    align-items: flex-start;
}

.bullhorn-privacy-policy input[type="checkbox"] {
    margin-top: 0.2em;
    margin-right: 8px;
    flex-shrink: 0;
}

.bullhorn-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bullhorn-back-to-job-button {
    color: #0073aa;
    text-decoration: none;
    font-size: 0.9em;
}

.bullhorn-back-to-job-button:hover {
    text-decoration: underline;
}

.bullhorn-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   Form Feedback (Errors, Success, Spinner)
   ========================================================================== */
.bullhorn-privacy-policy input[type="checkbox"].error + span {
    color: #dc3232;
}

.bullhorn-loading-spinner {
    width: 20px;
    height: 20px;
}

.bullhorn-loading-spinner .spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: bullhorn-spin 1s ease-in-out infinite;
    box-sizing: border-box;
}

@keyframes bullhorn-spin {
    to {
        transform: rotate(360deg);
    }
}

.bullhorn-form-messages {
    margin-bottom: 20px;
}

.bullhorn-form-messages div {
    padding: 10px 15px;
    border: 1px solid;
    border-radius: 10px;
    margin-bottom: 1em;
}

.bullhorn-form-messages strong {
    display: block;
    margin-bottom: 0.5em;
}

.bullhorn-form-messages ul {
    margin: 0 0 0 20px;
    padding: 0;
    list-style: disc;
}

.bullhorn-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.bullhorn-success-message {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.bullhorn-warning-message {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.bullhorn-notice-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    /* Stack filter fields */
    .bullhorn-filter-row {
        align-items: stretch;
    }

    .bullhorn-filter-field,
    .bullhorn-filter-submit {
        flex-basis: 100%;
        min-width: auto;
    }

    .bullhorn-filter-submit {
        justify-content: flex-start;
        padding-top: 0;
    }

    /* Stack form fields */
    .bullhorn-form-group {
        flex-basis: 100%;
        min-width: auto;
    }
}

/* ==========================================================================
   Sticky Apply Bar
   ========================================================================== */
.bullhorn-sticky-apply-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.bullhorn-sticky-apply-bar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px; /* Or your site's max width */
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   Job Categories Page
   ========================================================================== */
.bullhorn-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.bullhorn-category-item a {
    display: block;
    padding: 20px;
    border: 1px solid #333333;
    border-radius: 3px;
    text-decoration: none;
    color: #11123C;
    font-weight: 600;
    transition: all 0.3s ease;
}

/*.bullhorn-category-item a:hover {
    border-color: #11123C;
    background-color: #f9f9f9;*/
}

.bullhorn-category-count {
    margin-left: 8px;
    color: #555555;
    font-weight: 400;
}

@media (max-width: 768px) {
    .bullhorn-categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Pagination (Jobs) - FINAL CORRECTED VERSION
   ========================================================================== */

/* Main container for the pagination group - NO WRAPPER */
.bullhorn-jobs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Base styles for all pagination items (a, span) */
.bullhorn-jobs-pagination .page-numbers {
    font-family: inherit;
 /*   font-size: 1rem; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    box-sizing: border-box;
    border-radius: 1px;
    text-decoration: none;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
    white-space: nowrap;
}

/* Default state for numbered links and NEXT button */
.bullhorn-jobs-pagination a.page-numbers {
    color: #ffffff;
    background-color: #333333; 
   /* border: 1px solid #11123C;*/
    cursor: pointer;
}

/* The currently active page number */
.bullhorn-jobs-pagination .page-numbers.current {
    color: #000000;
    background-color: #fdcb15; 
   /* border-color: #05DBD6;  */
    cursor: default;
}

/* The 'Previous' button when it's disabled (on page 1) */
.bullhorn-jobs-pagination span.page-numbers.prev {
    background-color: #333333;
    color: #ffffff; 
   /* border: 1px solid #9FB5C4; */
    cursor: default;
}

/* Completely hide the '...' dots */
.bullhorn-jobs-pagination .page-numbers.dots {
    display: none;
}

/* Hover/focus state for all clickable links */
.bullhorn-jobs-pagination a.page-numbers:hover,
.bullhorn-jobs-pagination a.page-numbers:focus {
    color: #000000;
    background-color: #fdcb15;
   /* border-color: #05DBD6;*/
    outline: none;
}

/* --- Rebuild Previous and Next button text and chevrons --- */

/* Hide the default text characters from WordPress */
.bullhorn-jobs-pagination .page-numbers.prev,
.bullhorn-jobs-pagination .page-numbers.next {
  /*  font-size: 0; */
}

/* Previous Button: Chevron + Text */
.bullhorn-jobs-pagination .page-numbers.prev::before {
    content: "";
/*    font-size: 1rem;*/
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg);
    margin-right: 0.5rem;
    vertical-align: middle;
}
.bullhorn-jobs-pagination .page-numbers.prev::after {
  /*  content: 'Previous';
    font-size: 1rem;*/
}

/* Next Button: Text + Chevron */
.bullhorn-jobs-pagination .page-numbers.next::before {
   /* content: 'Next';
    font-size: 1rem;*/
}
.bullhorn-jobs-pagination .page-numbers.next::after {
    content: "";
/*    font-size: 1rem; */
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.5rem;
    vertical-align: middle;
}



