/* =========================================================
   ADVAN CAREER — halaman publik pendaftaran Promotor
   Mobile-first. Memakai token warna dari style.css
   (--primary, --ink, --line, dst.) supaya identitas Advan sama
   dengan dashboard HR.
   ========================================================= */

.career-body {
    background: var(--paper);
    min-height: 100vh;
    color: var(--ink);
}

.career-topbar {
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
}

.career-topbar-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.career-logo {
    height: 30px;
    width: auto;
}

.career-topbar-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
}

.career-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

/* --- langkah ---------------------------------------------------- */

.career-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 0;
    list-style: none;
}

.career-step {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    border-top: 3px solid var(--line-strong);
    padding-top: 8px;
}

.career-step.done,
.career-step.active {
    color: var(--ink);
    border-top-color: var(--primary);
}

.career-step.active {
    color: var(--primary);
}

/* --- kartu ------------------------------------------------------ */

.career-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-top: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
}

.career-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
}

.career-lead {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 20px;
}

.career-card .form-label {
    font-weight: 600;
    font-size: 14px;
}

/* tinggi minimum 48px = target sentuh nyaman di smartphone;
   font 16px mencegah iOS melakukan auto-zoom saat fokus. */
.career-card .form-control,
.career-card .form-select {
    min-height: 48px;
    font-size: 16px;
}

.career-card textarea.form-control {
    min-height: 96px;
}

.career-btn {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    font-weight: 600;
}

.career-privacy {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 13px;
    max-height: 190px;
    overflow-y: auto;
}

.career-privacy h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
}

.career-privacy ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.career-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

/* --- perekam video ---------------------------------------------- */

.career-attempts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 14px;
}

.career-attempt-dots {
    display: flex;
    gap: 6px;
}

.career-attempt-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
}

.career-attempt-dot.used {
    background: var(--primary);
}

.career-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 70vh;
    background: #151215;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.career-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #151215;
}

/* kamera depan ditampilkan seperti cermin (hanya saat live) */
.career-stage video.mirror {
    transform: scaleX(-1);
}

.career-stage-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    color: #E8E4E7;
    font-size: 14px;
}

.career-timer {
    position: absolute;
    top: 12px;
    left: 12px;
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 15px;
}

.career-timer.show {
    display: inline-flex;
}

.career-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b3b;
    animation: career-pulse 1s infinite;
}

@keyframes career-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.career-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
}

.career-progress.show {
    display: block;
}

.career-progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
}

.career-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.career-status {
    font-size: 14px;
    margin-top: 12px;
}

.career-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--paper);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    user-select: all;
}

/* ---------------------------------------------------------
   Autocomplete kabupaten/kota (wilayah-autocomplete.js)
   --------------------------------------------------------- */

.wilayah-field {
    position: relative;
}

.wilayah-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    background: var(--paper-raised, #fff);
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.wilayah-list[hidden] {
    display: none;
}

.wilayah-option {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    /* area sentuh nyaman di HP */
    min-height: 44px;
    justify-content: center;
}

.wilayah-option:hover,
.wilayah-option.is-active {
    background: rgba(0, 0, 0, 0.05);
}

.wilayah-name {
    font-weight: 600;
    color: var(--ink, #111);
}

.wilayah-province {
    font-size: 12px;
    color: #6b7280;
}

.wilayah-empty {
    padding: 10px 12px;
    font-size: 13px;
    color: #6b7280;
}

/* =========================================================
   Promotor flow additions
   ========================================================= */

/* section headings inside the long form */
.career-section {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 22px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.career-section:first-of-type {
    margin-top: 6px;
}

/* "Sebelum mulai" box */
.career-intro {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.career-intro-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.career-intro ul {
    margin: 0;
    padding-left: 18px;
}

/* collapsible privacy notice */
.career-privacy-details > summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 0;
}

.career-privacy-details[open] > summary {
    margin-bottom: 8px;
}

/* video assessment tips */
.career-tips {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
    background: var(--paper);
}

.career-tips-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.career-tips-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.career-tips-grid li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.career-tips-grid li span {
    color: var(--ink-soft);
}

.career-tips-foot {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-soft);
}

@media (max-width: 420px) {
    .career-tips-grid {
        grid-template-columns: 1fr;
    }
}

.career-attempt-note {
    font-size: 13px;
    color: var(--ink-soft);
    margin: -6px 0 14px;
}

/* 3-2-1 countdown overlay on the camera stage */
.career-countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.career-countdown[hidden] {
    display: none;
}

.career-countdown span {
    font-size: 96px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* progress checklist under the buttons */
.career-checklist {
    list-style: none;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 0;
    font-size: 14px;
}

.career-checklist li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
}

.career-checklist li::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    box-sizing: border-box;
}

.career-checklist li.done {
    color: var(--ink);
    font-weight: 600;
}

.career-checklist li.done::before {
    border-color: var(--success);
    background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* done page */
.career-success-icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-soft);
    color: var(--success);
}

.career-success-icon svg {
    width: 32px;
    height: 32px;
}

.career-ref-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.career-next {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 14px;
}

.career-next-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.career-next ol {
    margin: 0;
    padding-left: 18px;
}

.career-next li + li {
    margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .career-rec-dot {
        animation: none;
    }
}

/* =========================================================
   LOWONGAN (daftar, detail) — Advan Career
   ========================================================= */

.career-topbar-link {
    text-decoration: none;
}

.career-hero {
    margin-bottom: 18px;
}

.career-back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.career-back:hover {
    text-decoration: underline;
}

.career-job {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 10px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.career-job:hover,
.career-job:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: var(--ink);
}

.career-job-featured {
    border-top: 2px solid var(--primary);
    margin-bottom: 22px;
}

.career-job-main {
    min-width: 0;
}

.career-job-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}

.career-job-title {
    font-size: 17px;
    font-weight: 700;
}

.career-job-sub {
    margin-top: 2px;
    font-size: 13px;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.career-job-cta {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.career-list {
    padding-left: 20px;
    margin: 0;
    font-size: 15px;
}

.career-list li + li {
    margin-top: 6px;
}