/* ============================================================
   공개 공고 페이지 (/jobs/{uuid}) — 공유 링크·검색으로 처음 들어오는 화면
   값은 sm-ui.css 의 --sm-* 와 common.css 의 --tp-* 를 쓴다.
   ============================================================ */

body.pj-page {
    background: #f8fafc;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.pj-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pj-head__link {
    font-size: 14px;
    font-weight: 600;
    color: var(--sm-brand-600, #0d9488);
    text-decoration: none;
    padding: 8px 4px;
}

.pj-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px var(--sm-page-x, 20px) 32px;
}

.pj-card {
    background: #fff;
    border-radius: var(--tp-radius-xl, 16px);
    box-shadow: 0 0 0 1px var(--sm-card-ring, rgba(226, 232, 240, 0.7)), var(--tp-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
    padding: 24px 20px;
}

.pj-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.pj-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.pj-pill--open { background: #ccfbf1; color: var(--sm-brand-900, #134e4a); }
.pj-pill--closed { background: #e2e8f0; color: #475569; }
.pj-pill--tag { background: #f1f5f9; color: #334155; }

.pj-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-primary, #0f172a);
    margin: 0 0 12px;
    word-break: keep-all;
}

.pj-company {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.pj-company__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex: none;
    box-shadow: 0 0 0 1px var(--sm-card-ring, rgba(226, 232, 240, 0.7));
}
.pj-company__logo--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0fdfa;
    color: var(--sm-brand-600, #0d9488);
    font-weight: 700;
}
.pj-company__name {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.pj-wage {
    margin: 0 0 16px;
    font-size: 15px;
    color: #475569;
}
.pj-wage strong {
    font-size: var(--sm-font-size-amount-lg, 20px);
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}

.pj-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}
.pj-facts--plain { background: transparent; padding: 0; }
.pj-fact {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.pj-fact dt { color: #64748b; margin: 0; }
.pj-fact dd { color: var(--text-primary, #0f172a); margin: 0; font-weight: 500; word-break: keep-all; }

.pj-section { margin-top: 24px; }
.pj-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 0 0 8px;
}
.pj-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pj-note {
    margin: 24px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f0fdfa;
    color: var(--sm-brand-900, #134e4a);
    font-size: 13px;
    line-height: 1.5;
}

.pj-more {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}
.pj-more p { margin: 0 0 6px; }
.pj-more__link {
    color: var(--sm-brand-600, #0d9488);
    font-weight: 600;
}

/* ---------- 하단 고정 지원 바 ---------- */
.pj-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -1px 0 rgba(226, 232, 240, 0.9), 0 -8px 24px -12px rgba(15, 23, 42, 0.18);
    padding: 12px var(--sm-page-x, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
}
.pj-cta__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}
.pj-cta__inner .pj-btn--primary { flex: 1; }

.pj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 12px;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}
.pj-btn svg { width: 18px; height: 18px; }
.pj-btn--primary {
    background: var(--sm-brand-600, #0d9488);
    color: #fff;
    box-shadow: var(--sm-shadow-brand, 0 12px 28px -10px rgba(15, 118, 110, 0.45));
}
.pj-btn--primary:hover { background: #0f766e; color: #fff; }
.pj-btn--ghost {
    background: #fff;
    color: #334155;
    box-shadow: 0 0 0 1px #cbd5e1;
}
.pj-btn--ghost:hover { background: #f8fafc; color: #0f172a; }
.pj-btn:focus-visible { outline: none; box-shadow: var(--sm-focus-ring, 0 0 0 2px #14b8a6); }
.pj-btn--block { width: 100%; }

/* ---------- 가입 전 지원하기 시트 ---------- */
.pj-sheet[hidden] { display: none; }
.pj-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.pj-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.pj-sheet__panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--sm-shadow-modal, 0 24px 48px -12px rgba(15, 23, 42, 0.28));
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: pj-sheet-up 200ms ease-out;
}
.pj-sheet__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 999px;
    cursor: pointer;
}
.pj-sheet__title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}
.pj-sheet__desc {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}
body.pj-sheet-open { overflow: hidden; }

@keyframes pj-sheet-up {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.sm-share-toast {
    position: fixed;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 70;
    max-width: calc(100% - 40px);
    padding: 12px 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    box-shadow: var(--sm-shadow-lift, 0 10px 24px -8px rgba(15, 23, 42, 0.14));
    transition: opacity 300ms ease;
}
.sm-share-toast.is-leaving { opacity: 0; }

@media (min-width: 640px) {
    .pj-card { padding: 32px; }
    .pj-title { font-size: 26px; }
    .pj-facts { grid-template-columns: 1fr 1fr; column-gap: 24px; }
    .pj-facts--plain { grid-template-columns: 1fr; }
    .pj-sheet { align-items: center; }
    .pj-sheet__panel { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .pj-sheet__panel { animation: none; }
}
