/**
 * Paylocity Jobs Feed Styles
 * Version: 2.4
 */

/* Filters */
.paylocity-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.paylocity-filter {
    flex: 1;
    min-width: 200px;
}

.paylocity-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.paylocity-filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.paylocity-filter-select:hover {
    border-color: #999;
}

.paylocity-filter-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* No Results Message */
.paylocity-no-results {
    padding: 2rem;
    text-align: center;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.paylocity-no-results p {
    margin: 0;
    color: #856404;
    font-size: 1rem;
}

/* Main Container */
.paylocity-jobs-accordion {
    max-width: 100%;
    margin: 0 auto;
}

/* Job Item */
.paylocity-job-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    background-color: #ffffff;
}

.paylocity-job-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.paylocity-job-item:last-child {
    margin-bottom: 0;
}

/* Job Header (Button) */
.paylocity-job-header {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.paylocity-job-header:hover {
    background-color: #f8f9fa;
}

.paylocity-job-header:focus {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
}

.paylocity-job-header[aria-expanded="true"] {
    background-color: #f0f0f0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Job Title Section */
.paylocity-job-title {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.paylocity-job-title h4 {
    margin: 0 0 0.5rem 0;
    /* font-size: 1.25rem;
    font-weight: 600;
    color: #333; */
    line-height: 1.3;
}

/* Job Meta Information */
.paylocity-job-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.paylocity-job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.paylocity-job-meta svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Accordion Icon */
.paylocity-accordion-icon {
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.3s ease;
    color: #666;
}

.paylocity-job-header[aria-expanded="true"] .paylocity-accordion-icon {
    transform: rotate(180deg);
}

/* Job Content */
.paylocity-job-content {
    overflow: hidden;
}

.paylocity-job-content[hidden] {
    display: none;
}

.paylocity-job-content-inner {
    padding: 1.5rem;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

/* Job Description */
.paylocity-job-description {
    margin-bottom: 5rem;
    line-height: 1.6;
    color: #444;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.paylocity-job-description:last-child {
    margin-bottom: 0;
}

.paylocity-job-description h5,
.paylocity-job-requirements h5 {
    margin-top: 0rem;
    margin-bottom: 0.75rem;
    /* font-size: 1.1rem;
    font-weight: 600;
    color: #333; */
}

.paylocity-job-description p,
.paylocity-job-requirements p {
    margin: 0 0 1rem 0;
}

.paylocity-job-description p:last-child,
.paylocity-job-requirements p:last-child {
    margin-bottom: 0;
}

.paylocity-job-description ul,
.paylocity-job-requirements ul,
.paylocity-job-description ol,
.paylocity-job-requirements ol {
    margin: 0.5rem 0 1rem 0;
    padding-left: 1.5rem;
}

.paylocity-job-description li,
.paylocity-job-requirements li {
    margin-bottom: 0.5rem;
}

.paylocity-job-description li:last-child,
.paylocity-job-requirements li:last-child {
    margin-bottom: 0;
}

/* Job Requirements */
.paylocity-job-requirements {
    margin-bottom: 5rem;
    line-height: 1.6;
    color: #444;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.paylocity-job-requirements:last-child {
    margin-bottom: 0;
}

/* Job Content Header Actions */
.paylocity-job-header-actions {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.paylocity-job-apply-top {
    margin: 0;
    padding: 0;
    border: none;
}

.paylocity-job-share-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Apply Section */
.paylocity-job-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.paylocity-job-apply {
    margin-bottom: 1rem;
}

.paylocity-job-salary {
    padding: 1rem;
    background-color: #e8f4f8;
    border-left: 4px solid #0066cc;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.paylocity-job-salary strong {
    color: #0066cc;
    font-weight: 600;
}

.paylocity-apply-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #0066cc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    /* font-weight: 600; */
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

a.paylocity-apply-button.rr-cf-button2 {
    font-size: clamp(1.25rem, 1.202rem + 0.204vw, 1.406rem) !important;
    font-weight: 500;
    width: fit-content !important;
}

.paylocity-apply-button:hover {
    background-color: #0052a3;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
}

.paylocity-apply-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 102, 204, 0.3);
}

.paylocity-apply-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.paylocity-apply-button svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Social Sharing */
.paylocity-job-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.paylocity-share-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.paylocity-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
    opacity: 0.8;
}

.paylocity-share-button:hover {
    transform: scale(1.1);
    opacity: 1;
    text-decoration: none;
}

.paylocity-share-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.paylocity-share-linkedin {
    background-color: #0077b5;
    color: #ffffff;
}

.paylocity-share-linkedin:hover {
    background-color: #006399;
}

.paylocity-share-facebook {
    background-color: #1877f2;
    color: #ffffff;
}

.paylocity-share-facebook:hover {
    background-color: #145dbf;
}

.paylocity-share-twitter {
    background-color: #000000;
    color: #ffffff;
}

.paylocity-share-twitter:hover {
    background-color: #333333;
}

.paylocity-share-email {
    background-color: #666666;
    color: #ffffff;
}

.paylocity-share-email:hover {
    background-color: #444444;
}

.paylocity-share-button svg {
    width: 20px;
    height: 20px;
}

/* No Jobs Message */
.paylocity-no-jobs {
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.paylocity-no-jobs p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .paylocity-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .paylocity-filter {
        min-width: 100%;
    }

    .paylocity-job-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .paylocity-job-share-top {
        margin-left: 0;
        justify-content: center;
    }

    .paylocity-job-header {
        padding: 1rem;
    }

    .paylocity-job-title h3 {
        font-size: 1.1rem;
    }

    .paylocity-job-meta {
        font-size: 0.85rem;
        gap: 1rem;
    }

    .paylocity-job-content-inner {
        padding: 1rem;
    }

    .paylocity-accordion-icon {
        margin-left: 0.5rem;
        width: 20px;
        height: 20px;
    }

    .paylocity-apply-button {
        width: 100%;
        justify-content: center;
    }

    a.paylocity-apply-button.rr-cf-button2 {
       width: 100% !important;
    }

    .paylocity-job-share {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .paylocity-job-header {
        padding: 0.875rem;
    }

    .paylocity-job-title h3 {
        font-size: 1rem;
    }

    .paylocity-job-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .paylocity-job-content-inner {
        padding: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .paylocity-job-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }

    .paylocity-job-header {
        background-color: #f0f0f0 !important;
    }

    .paylocity-job-content {
        display: block !important;
    }

    .paylocity-job-content[hidden] {
        display: block !important;
    }

    .paylocity-accordion-icon {
        display: none;
    }

    .paylocity-apply-button {
        border: 1px solid #000;
    }
}

/* Kadence Theme Compatibility */
.kb-row .paylocity-jobs-accordion,
.kb-blocks-accordion .paylocity-jobs-accordion {
    margin-top: 0;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .paylocity-job-item,
    .paylocity-job-header,
    .paylocity-accordion-icon,
    .paylocity-apply-button {
        transition: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .paylocity-job-item {
        border: 2px solid currentColor;
    }

    .paylocity-apply-button {
        border: 2px solid currentColor;
    }
}
