/**
 * Job Board Custom Styles
 *
 * Custom styles for Simple Job Board plugin template overrides.
 * Used alongside Tailwind utility classes in the templates.
 *
 * @package QTC-Theme
 */

/* ========================================
   0. Hero Section — Archive Page
   ======================================== */

/* Hero geometric pattern overlay */
.hero-pattern {
    background-color: #242021;
    position: relative;
    overflow: hidden;
}

/* Left decorative arc */
.hero-pattern::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 40px solid rgba(134, 118, 74, 0.18);
    pointer-events: none;
}

/* Right decorative arc */
.hero-pattern::after {
    content: '';
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 40px solid rgba(134, 118, 74, 0.18);
    pointer-events: none;
}

/* Inner rings wrapper */
.hero-inner-rings {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-inner-rings span {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(134, 118, 74, 0.12);
}

/* Left ring cluster */
.hero-inner-rings span:nth-child(1) { width: 180px; height: 180px; left: -50px;  top: 50%; transform: translateY(-50%); }
.hero-inner-rings span:nth-child(2) { width: 300px; height: 300px; left: -100px; top: 50%; transform: translateY(-50%); }
.hero-inner-rings span:nth-child(3) { width: 400px; height: 400px; left: -150px; top: 50%; transform: translateY(-50%); }

/* Right ring cluster */
.hero-inner-rings span:nth-child(4) { width: 180px; height: 180px; right: -50px;  top: 50%; transform: translateY(-50%); }
.hero-inner-rings span:nth-child(5) { width: 300px; height: 300px; right: -100px; top: 50%; transform: translateY(-50%); }
.hero-inner-rings span:nth-child(6) { width: 400px; height: 400px; right: -150px; top: 50%; transform: translateY(-50%); }

/* Gold dot clusters — left */
.hero-inner-rings span:nth-child(7)  { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; left: 80px;  top: 30px; }
.hero-inner-rings span:nth-child(8)  { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; left: 110px; top: 50px; }
.hero-inner-rings span:nth-child(9)  { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; left: 95px;  top: 70px; }

/* Gold dot clusters — right */
.hero-inner-rings span:nth-child(10) { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; right: 80px;  top: 30px; }
.hero-inner-rings span:nth-child(11) { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; right: 110px; top: 50px; }
.hero-inner-rings span:nth-child(12) { width: 6px; height: 6px; background: rgba(134, 118, 74, 0.5); border: none; right: 95px;  top: 70px; }

/* ========================================
   1. Job Listings Archive Page
   ======================================== */

/* Job card hover state */
.sjb-job-card:hover .sjb-company-logo-wrap img {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.job-card:hover { background: #f9fafb; }
.job-card:hover .job-title { color: #4a1f61; }

.sjb-company-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
    transition: transform 0.2s ease;
}

/* Job card circular logo with gold border */
.sjb-logo-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    border: 2px solid var(--color-secColor, #86764a);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    flex-shrink: 0;
}

.sjb-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
}

/* Default company logo placeholder when no image */
.sjb-company-logo-wrap:empty::before {
    content: "\f0b1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--color-secColor, #86764a);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Line clamp for job descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   2. Pagination Styles
   ======================================== */

.sjb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sjb-pagination .page-numbers:hover {
    color: var(--color-mainColor, #4a1f61);
    border-color: var(--color-mainColor, #4a1f61);
    background: rgba(74, 31, 97, 0.05);
}

.sjb-pagination .page-numbers.current {
    color: #fff;
    background: var(--color-mainColor, #4a1f61);
    border-color: var(--color-mainColor, #4a1f61);
}

.sjb-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.sjb-pagination .page-numbers.prev,
.sjb-pagination .page-numbers.next {
    font-size: 1rem;
}

/* ========================================
   3. Single Job Detail Page
   ======================================== */

/* Job content prose styling */
.sjb-job-content h1,
.sjb-job-content h2,
.sjb-job-content h3,
.sjb-job-content h4,
.sjb-job-content h5,
.sjb-job-content h6 {
    color: var(--color-textColor, #242021);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.sjb-job-content h2:first-child,
.sjb-job-content h3:first-child {
    margin-top: 0;
}

.sjb-job-content ul,
.sjb-job-content ol {
    padding-inline-start: 1.5rem;
    margin-bottom: 1rem;
}

.sjb-job-content ul {
    list-style-type: disc;
}

.sjb-job-content ol {
    list-style-type: decimal;
}

.sjb-job-content li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
}

.sjb-job-content p {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.sjb-job-content strong,
.sjb-job-content b {
    color: var(--color-textColor, #242021);
    font-weight: 600;
}

/* Hide SJB default application form on single page (we use separate apply page) */
.jobpost-form,
.sjb-application,
form.jobpost-form,
#sjb-application-form.jobpost-form,
.sjb-job-application {
    display: none !important;
}

/* SJB company logo/thumbnail on single page */
.sjb-page .company-logo img,
.sjb-detail .company-logo img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
}

/* SJB job features section styling */
.sjb-fetures-list {
    margin-top: 2rem;
}

.sjb-fetures-list .sjb-feature-heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-textColor, #242021);
    margin-bottom: 0.75rem;
}

.sjb-fetures-list .sjb-feature-value {
    color: #4b5563;
    font-size: 0.875rem;
}

/* ========================================
   4. Application Form Page
   ======================================== */

/* Custom select chevron — suppresses browser default arrow */
.sjb-apply-form select,
.sjb-apply-form select.sjb-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1rem;
    padding-right: 2.5rem !important;
}

/* RTL: flip chevron to the left */
[dir="rtl"] .sjb-apply-form select,
[dir="rtl"] .sjb-apply-form select.sjb-select {
    background-position: left 0.85rem center;
    padding-right: 0.875rem !important;
    padding-left: 2.5rem !important;
}

/* File upload row */
.sjb-apply-form .sjb-file-upload-row {
    min-height: 2.75rem;
}

/* Form focus ring */
.sjb-apply-form input:focus,
.sjb-apply-form select:focus {
    box-shadow: 0 0 0 3px rgba(74, 31, 97, 0.1);
}

/* Submit button loading state */
#sjb-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success toast transition */
#success-toast {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ========================================
   5. SJB Plugin Override Styles
   ======================================== */

/* Override SJB default styles that may conflict */
.sjb-page,
.sjb-archive-page {
    width: 100% !important;
    max-width: 100% !important;
}

/* Hide SJB default filters if showing on archive */
.sjb-filters {
    display: none;
}

/* Job features section on single page */
.sjb-fetures-list {
    margin-top: 2rem;
}

.sjb-fetures-list .sjb-feature-heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-textColor, #242021);
    margin-bottom: 0.75rem;
}

.sjb-fetures-list .sjb-feature-value {
    color: #4b5563;
    font-size: 0.875rem;
}

/* ========================================
   6. LTR Overrides (English)
   ======================================== */

[dir="ltr"] .sjb-job-card .flex {
    flex-direction: row;
}

/* ========================================
   7. Responsive Styles
   ======================================== */

@media (max-width: 768px) {
    /* Archive: Stack meta items vertically on small screens */
    .sjb-job-card .flex-wrap {
        gap: 0.25rem;
    }

    /* Single: Full width sidebar on mobile */
    .sjb-job-content h2 {
        font-size: 1.125rem;
    }

    /* Form: single column on mobile (handled by Tailwind grid) */
    .sjb-apply-form .sjb-file-upload-area {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .sjb-pagination .page-numbers {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   8. Print Styles
   ======================================== */

@media print {
    .sjb-bookmark-btn,
    .sjb-copy-link,
    .sjb-submit-btn,
    .sjb-pagination {
        display: none !important;
    }
}
