@font-face {
    font-family: "THJ Noto Sans Thai";
    src: url("../fonts/NotoSansThai.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

.thj-cvb,
.thj-cvb * {
    box-sizing: border-box;
}

.thj-cvb {
    --thj-navy: #1b294b;
    --thj-navy-2: #24375f;
    --thj-orange: #e86c3a;
    --thj-ink: #202633;
    --thj-muted: #626b7a;
    --thj-line: #d9dee7;
    --thj-soft: #f3f5f8;
    --thj-orange-soft: #fff2ec;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    container-type: inline-size;
    color: var(--thj-ink);
    font-family: "THJ Noto Sans Thai", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.thj-cvb button,
.thj-cvb input,
.thj-cvb select,
.thj-cvb textarea {
    font: inherit;
}

.thj-cvb button {
    cursor: pointer;
}

.thj-cvb-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 38px;
    border-radius: 18px;
    background: var(--thj-navy);
    color: #fff;
}

.thj-cvb-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--thj-orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.thj-cvb-hero h1 {
    margin: 0 0 9px;
    color: #fff;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 650;
    line-height: 1.12;
}

.thj-cvb-hero p {
    max-width: 660px;
    margin: 0;
    color: #c9d0de;
    font-size: 15px;
    line-height: 1.6;
}

.thj-cvb-language {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
}

.thj-cvb-language button {
    padding: 8px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #c9d0de;
    font-size: 13px;
}

.thj-cvb-language button.is-active {
    background: var(--thj-orange);
    color: #fff;
}

.thj-cvb-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
    margin-top: 24px;
}

.thj-cvb-download-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 22px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--thj-line);
    border-left: 5px solid var(--thj-orange);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(27, 41, 75, .07);
}

.thj-cvb-download-panel strong,
.thj-cvb-download-panel small {
    display: block;
}

.thj-cvb-download-panel strong {
    color: var(--thj-navy);
    font-size: 17px;
}

.thj-cvb-download-panel small {
    margin-top: 4px;
    color: var(--thj-muted);
    font-size: 12px;
    line-height: 1.5;
}

.thj-cvb-download-panel .thj-cvb-status {
    grid-column: 1 / -1;
    margin: 0;
    border-radius: 8px;
}

.thj-cvb-form {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 15px;
}

.thj-cvb-card {
    padding: 22px;
    border: 1px solid var(--thj-line);
    border-top: 4px solid var(--thj-navy);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(27, 41, 75, .055);
}

.thj-cvb-card h2 {
    margin: 0 0 18px;
    color: var(--thj-navy);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: .06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.thj-cvb-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.thj-cvb-card-heading h2 {
    margin: 0;
}

.thj-cvb-card label {
    display: block;
    margin-bottom: 13px;
    color: #4f5867;
    font-size: 13px;
    font-weight: 600;
}

.thj-cvb-card label:last-child {
    margin-bottom: 0;
}

.thj-cvb-card label > span {
    display: block;
    margin-bottom: 6px;
}

.thj-cvb-card input:not([type="file"]),
.thj-cvb-card select,
.thj-cvb-card textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd2df;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: var(--thj-ink);
    font-size: 14px;
    font-weight: 400;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.thj-cvb-card textarea {
    min-height: 116px;
    resize: vertical;
    line-height: 1.55;
}

.thj-cvb-card input:focus,
.thj-cvb-card select:focus,
.thj-cvb-card textarea:focus,
.thj-cvb button:focus-visible {
    border-color: var(--thj-orange);
    box-shadow: 0 0 0 3px rgba(232, 108, 58, .18);
}

.thj-cvb-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.thj-cvb-photo-field {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 17px;
    padding: 12px;
    border-radius: 10px;
    background: var(--thj-soft);
}

.thj-cvb-photo-field label {
    margin: 0 0 4px;
}

.thj-cvb-photo-field input {
    max-width: 100%;
    font-size: 12px;
}

.thj-cvb-photo-field small {
    display: block;
    margin-top: 4px;
    color: var(--thj-muted);
    font-size: 11px;
    line-height: 1.4;
}

.thj-cvb-photo-thumb {
    display: grid;
    width: 64px;
    height: 80px;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--thj-orange);
    border-radius: 8px;
    background: var(--thj-navy);
    color: #fff;
    font-size: 22px;
}

.thj-cvb-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thj-cvb-add {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #cbd2df;
    border-radius: 8px;
    background: #fff;
    color: var(--thj-navy);
    font-size: 12px;
    font-weight: 700;
}

.thj-cvb-add:hover {
    border-color: var(--thj-orange);
    color: var(--thj-orange);
}

.thj-cvb-repeat {
    position: relative;
    margin-top: 13px;
    padding: 15px;
    border: 1px solid var(--thj-line);
    border-radius: 10px;
    background: var(--thj-soft);
}

.thj-cvb-repeat:first-child {
    margin-top: 0;
}

.thj-cvb-repeat-title {
    margin: 0 36px 13px 0;
    color: var(--thj-navy);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.thj-cvb-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #8992a2;
    font-size: 17px;
}

.thj-cvb-remove:hover {
    color: var(--thj-orange);
}

.thj-cvb-preview-column {
    width: 100%;
    min-width: 0;
}

.thj-cvb-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 17px;
    border: 1px solid var(--thj-line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: #fff;
}

.thj-cvb-preview-toolbar strong {
    flex: 0 0 auto;
    color: var(--thj-navy);
    font-size: 15px;
}

.thj-cvb-preview-toolbar small {
    color: var(--thj-muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.thj-cvb-download {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--thj-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 5px 15px rgba(232, 108, 58, .25);
}

.thj-cvb-download:hover {
    background: #d95e2d;
}

.thj-cvb-download:disabled {
    cursor: wait;
    opacity: .62;
}

.thj-cvb-status {
    display: none;
    padding: 10px 14px;
    background: var(--thj-orange-soft);
    color: #9a3f1d;
    font-size: 12px;
    line-height: 1.4;
}

.thj-cvb-status:not(:empty) {
    display: block;
}

.thj-cvb-sheet {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--thj-line);
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(27, 41, 75, .1);
}

.thj-cvb-sheet-header {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    min-height: 130px;
    padding: 24px 30px;
    background: var(--thj-navy);
    color: #fff;
}

.thj-cvb-sheet-avatar {
    display: grid;
    width: 64px;
    height: 80px;
    place-items: center;
    overflow: hidden;
    border: 3px solid var(--thj-orange);
    border-radius: 7px;
    background: var(--thj-navy-2);
    color: #fff;
    font-size: 18px;
}

.thj-cvb-sheet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thj-cvb-sheet-identity {
    min-width: 0;
}

.thj-cvb-sheet-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(27px, 5.2cqw, 38px);
    font-weight: 500;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.thj-cvb-sheet-header p {
    margin: 8px 0 0;
    color: var(--thj-orange);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.thj-cvb-sheet-body {
    display: grid;
    grid-template-columns: minmax(180px, 31%) minmax(0, 1fr);
    gap: 25px;
    padding: 27px 30px 34px;
}

.thj-cvb-sheet-body > aside {
    min-height: 410px;
    padding: 17px;
    border-radius: 10px;
    background: var(--thj-soft);
}

.thj-cvb-preview-section {
    margin-bottom: 18px;
}

.thj-cvb-preview-section:last-child {
    margin-bottom: 0;
}

.thj-cvb-preview-section h3 {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--thj-orange);
    color: var(--thj-navy);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.thj-cvb-preview-section p,
.thj-cvb-preview-section dd {
    color: var(--thj-ink);
    font-size: 10.5px;
    line-height: 1.5;
}

.thj-cvb-preview-section p {
    margin: 0;
}

.thj-cvb-preview-section p.is-placeholder {
    color: var(--thj-muted);
}

.thj-cvb-preview-section dl {
    margin: 0;
}

.thj-cvb-preview-section dt {
    margin-top: 9px;
    color: var(--thj-muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.thj-cvb-preview-section dt:first-child {
    margin-top: 0;
}

.thj-cvb-preview-section dd {
    margin: 1px 0 0;
    overflow-wrap: anywhere;
}

.thj-cvb-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.thj-cvb-preview-tags span {
    padding: 4px 7px;
    border-radius: 5px;
    background: #fff;
    color: var(--thj-navy);
    font-size: 8.5px;
}

.thj-cvb-preview-job,
.thj-cvb-preview-education {
    margin-bottom: 17px;
}

.thj-cvb-preview-job:last-child,
.thj-cvb-preview-education:last-child {
    margin-bottom: 0;
}

.thj-cvb-preview-job-heading,
.thj-cvb-preview-education-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.thj-cvb-preview-job strong,
.thj-cvb-preview-education strong {
    color: var(--thj-ink);
    font-size: 11px;
}

.thj-cvb-preview-job time,
.thj-cvb-preview-education time {
    flex: 0 0 auto;
    color: var(--thj-muted);
    font-size: 8px;
}

.thj-cvb-preview-org {
    margin: 2px 0 4px !important;
    color: var(--thj-orange) !important;
    font-size: 9.5px !important;
    font-style: italic;
}

.thj-cvb-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 620px) {
    .thj-cvb-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 27px 21px;
        border-radius: 12px;
    }

    .thj-cvb-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .thj-cvb-card {
        padding: 18px;
    }

    .thj-cvb-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .thj-cvb-preview-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .thj-cvb-preview-toolbar small {
        text-align: left;
    }

    .thj-cvb-sheet-header {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 14px;
        min-height: 112px;
        padding: 19px;
    }

    .thj-cvb-sheet-avatar {
        width: 54px;
        height: 68px;
    }

    .thj-cvb-sheet-header h2 {
        font-size: 25px;
    }

    .thj-cvb-sheet-body {
        grid-template-columns: 1fr;
        padding: 20px 18px 27px;
    }

    .thj-cvb-sheet-body > aside {
        min-height: auto;
    }

    .thj-cvb-download {
        width: 100%;
    }

    .thj-cvb-download-panel {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .thj-cvb * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
