/*
 * File: wp-content/themes/remotiko-astra-child/assets/css/job-single.css
 * Styles for the single job listing page (single-job_listing.php).
 * Depends on CSS variables in style.css and shared classes in job-card.css.
 */

/* ============================================================
   OUTER WRAPPER
   ============================================================ */
.remotiko-single-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 72px;
    box-sizing: border-box;
}

/* ============================================================
   1. BREADCRUMB
   ============================================================ */
.remotiko-breadcrumb {
    margin-bottom: 24px;
}

.remotiko-breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #9CA3AF;
    line-height: 1.4;
}

.remotiko-breadcrumb__item a {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.12s ease;
}

.remotiko-breadcrumb__item a:hover {
    color: var(--remotiko-purple);
}

.remotiko-breadcrumb__item--current {
    color: #374151;
    font-weight: 500;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remotiko-breadcrumb__sep {
    color: #D1D5DB;
    font-size: 11px;
    user-select: none;
}

/* ============================================================
   2. PAGE HEADER
   ============================================================ */
.remotiko-single__header {
    margin-bottom: 24px;
}

.remotiko-single__header-top {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.remotiko-single__logo {
    flex-shrink: 0;
    padding-top: 3px; /* optical alignment with company name text */
}

.remotiko-single__header-text {
    flex: 1;
    min-width: 0;
}

/* Company name */
.remotiko-single__company {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 6px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.remotiko-single__company a {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.12s ease;
}

.remotiko-single__company a:hover {
    color: var(--remotiko-purple);
    text-decoration: underline;
}

.remotiko-single__verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

/* Job title H1 */
.remotiko-single__title {
    font-size: 26px;
    font-weight: 500;
    color: #111827;
    line-height: 1.25;
    margin: 0 0 12px;
    font-family: 'Inter', sans-serif;
}

/* Tags row */
.remotiko-single__tags {
    margin-bottom: 12px;
}

/* Meta row */
.remotiko-single__meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.remotiko-single__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9CA3AF;
    line-height: 1;
    white-space: nowrap;
}

.remotiko-single__meta-item svg {
    flex-shrink: 0;
    color: #D1D5DB;
}

/* ============================================================
   3. TWO-COLUMN BODY  [1fr main | 340px sidebar]
   ============================================================ */
.remotiko-single__body {
    display: grid;
    grid-template-columns: 1fr 340px;
    column-gap: 40px;
    align-items: start;
}

/* ============================================================
   4. MAIN CONTENT COLUMN
   ============================================================ */
.remotiko-single__main {
    min-width: 0; /* prevent grid blowout */
}

/* ── Dividers ─────────────────────────────────────────────── */
.remotiko-divider {
    border: none;
    border-top: 0.5px solid var(--remotiko-card-border);
    margin: 28px 0;
}

/* ── Job description typography ─────────────────────────────── */
.remotiko-job-description {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    max-width: 680px;
}

.remotiko-job-description h1,
.remotiko-job-description h2,
.remotiko-job-description h3,
.remotiko-job-description h4,
.remotiko-job-description h5,
.remotiko-job-description h6 {
    color: #111827;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 1.6em 0 0.5em;
}

.remotiko-job-description h1:first-child,
.remotiko-job-description h2:first-child,
.remotiko-job-description h3:first-child {
    margin-top: 0;
}

.remotiko-job-description h2 { font-size: 18px; }
.remotiko-job-description h3 { font-size: 16px; }
.remotiko-job-description h4 { font-size: 15px; font-weight: 600; }

.remotiko-job-description p {
    margin: 0 0 1em;
}

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

.remotiko-job-description ul,
.remotiko-job-description ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.remotiko-job-description li {
    margin-bottom: 0.35em;
}

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

.remotiko-job-description a {
    color: var(--remotiko-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.remotiko-job-description a:hover {
    text-decoration: none;
}

.remotiko-job-description strong,
.remotiko-job-description b {
    color: #111827;
    font-weight: 600;
}

.remotiko-job-description em,
.remotiko-job-description i {
    font-style: italic;
}

.remotiko-job-description blockquote {
    border-left: 3px solid var(--remotiko-card-border);
    margin: 1.2em 0;
    padding: 0.6em 1em;
    color: #6B7280;
    font-style: italic;
}

.remotiko-job-description hr {
    border: none;
    border-top: 0.5px solid var(--remotiko-card-border);
    margin: 1.6em 0;
}

.remotiko-job-description code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background: #F3F4F6;
    padding: 2px 5px;
    border-radius: 4px;
    color: #111827;
}

.remotiko-job-description pre {
    background: #F9FAFB;
    border: 0.5px solid var(--remotiko-card-border);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

/* ── Related / More jobs sections ───────────────────────────── */
.remotiko-related-section {
    margin-bottom: 32px;
}

.remotiko-related-section__title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 14px;
    font-family: 'Inter', sans-serif;
}

.remotiko-related-section__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Back to all jobs link ───────────────────────────────────── */
.remotiko-back-link {
    padding-top: 24px;
    border-top: 0.5px solid var(--remotiko-card-border);
    margin-top: 8px;
}

.remotiko-back-link__anchor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    text-decoration: none;
    transition: color 0.12s ease;
}

.remotiko-back-link__anchor:hover {
    color: var(--remotiko-purple);
}

.remotiko-back-link__anchor svg {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.remotiko-back-link__anchor:hover svg {
    transform: translateX(-3px);
}

/* ============================================================
   5. STICKY SIDEBAR
   ============================================================ */
.remotiko-single__sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 24px;
}

/* ── Base card ──────────────────────────────────────────────── */
.remotiko-sidebar-card {
    background: #FFFFFF;
    border: 0.5px solid var(--remotiko-card-border);
    border-radius: var(--remotiko-card-radius);
    padding: 18px;
    box-sizing: border-box;
}

.remotiko-sidebar-card__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 14px;
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
}

/* ── Apply card ─────────────────────────────────────────────── */
.remotiko-sidebar-card--apply {
    border-color: var(--remotiko-purple);
    border-width: 1px;
}

.remotiko-sidebar-card__eyebrow {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--remotiko-purple);
    margin: 0 0 12px;
    line-height: 1;
}

.remotiko-sidebar-card__company-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    min-height: 36px;
}

.remotiko-sidebar-card__company-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

/* Apply button — full width, icon on the right */
.remotiko-sidebar-card__apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
    text-align: center;
}

.remotiko-sidebar-card__note {
    font-size: 11px;
    color: #9CA3AF;
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

/* ── Job details list (dl) ──────────────────────────────────── */
.remotiko-details-list {
    margin: 0;
    padding: 0;
}

.remotiko-details-list__row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 0.5px solid #F3F4F6;
}

.remotiko-details-list__row:first-child {
    padding-top: 0;
}

.remotiko-details-list__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.remotiko-details-list__row dt {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9CA3AF;
    line-height: 1.5;
}

.remotiko-details-list__row dd {
    font-size: 12px;
    color: #374151;
    margin: 0;
    line-height: 1.5;
}

/* Verified row — green text + dot */
.remotiko-details-list__row--verified dd {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #16A34A;
    font-weight: 500;
}

/* ── Share card ─────────────────────────────────────────────── */
.remotiko-share-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.remotiko-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1 1 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    border: 1px solid transparent;
    box-sizing: border-box;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    /* reset button defaults */
    background-color: transparent;
    font-family: inherit;
}

.remotiko-share-btn svg {
    flex-shrink: 0;
}

/* Copy link */
.remotiko-share-btn--copy {
    background: #F3F4F6;
    color: #374151;
    border-color: #E5E7EB;
}

.remotiko-share-btn--copy:hover,
.remotiko-share-btn--copy.is-copied {
    background: #E5E7EB;
    border-color: #D1D5DB;
}

.remotiko-share-btn--copy.is-copied {
    color: #16A34A;
}

/* LinkedIn */
.remotiko-share-btn--linkedin {
    background: #EFF6FF;
    color: #0A66C2;
    border-color: #BFDBFE;
}

.remotiko-share-btn--linkedin:hover {
    background: #DBEAFE;
    border-color: #93C5FD;
}

/* X / Twitter */
.remotiko-share-btn--twitter {
    background: #F9FAFB;
    color: #111827;
    border-color: #E5E7EB;
}

.remotiko-share-btn--twitter:hover {
    background: #111827;
    color: #FFFFFF;
    border-color: #111827;
}

/* ============================================================
   6. MOBILE  ≤ 768px — single column, sidebar below main
   ============================================================ */
@media (max-width: 768px) {

    .remotiko-single-wrap {
        padding: 20px 16px 48px;
    }

    /* Stack to single column; sidebar moves below main */
    .remotiko-single__body {
        grid-template-columns: 1fr;
        row-gap: 28px;
    }

    .remotiko-single__sidebar {
        position: static; /* remove sticky on mobile */
    }

    /* Smaller title on mobile */
    .remotiko-single__title {
        font-size: 21px;
    }

    .remotiko-single__header-top {
        gap: 12px;
    }

    /* Truncate long breadcrumb titles */
    .remotiko-breadcrumb__item--current {
        max-width: 160px;
    }

    /* Tighter meta row */
    .remotiko-single__meta-row {
        gap: 10px;
    }

    /* Narrower label column in details list */
    .remotiko-details-list__row {
        grid-template-columns: 68px 1fr;
    }

    /* Stack share buttons vertically on very narrow screens */
    .remotiko-share-row {
        flex-direction: column;
    }

    .remotiko-share-btn {
        width: 100%;
        flex: none;
    }

    /* Description max-width fills column */
    .remotiko-job-description {
        max-width: 100%;
    }
}

/* ============================================================
   7. EXTRA SMALL  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {

    .remotiko-single__title {
        font-size: 19px;
    }

    .remotiko-job-description {
        font-size: 14px;
        line-height: 1.75;
    }

    .remotiko-single__meta-row {
        gap: 8px;
    }

    .remotiko-single__meta-item {
        font-size: 11px;
    }

    .remotiko-sidebar-card {
        padding: 14px;
    }
}
