/*
 * The apply modal (resources/views/components/website/apply-modal.blade.php,
 * docs/apply-modal.md). A native <dialog> in the top layer, so no z-index
 * contest with the page. Every rule is under #wdApplyModal: linkedin-theme.css
 * styles bare body.li-app input/textarea/label/a at (0,2,2) with !important,
 * and a class-only rule here would lose to it.
 */

#wdApplyModal {
    --am-card: #ffffff;
    --am-card-2: #f7f9fc;
    --am-border: #e3e8f0;
    --am-input-border: #cfd7e3;
    --am-text: #121a2b;
    --am-muted: #5f6b7f;
    --am-brand: #3664d1;
    --am-brand-hover: #2b55bb;
    --am-brand-text: #ffffff;
    --am-brand-tint: #e9eefc;
    --am-green: #14804a;
    --am-green-tint: #e3f5eb;
    --am-amber: #9a5b00;
    --am-amber-tint: #fdf1dc;
    --am-red: #b42318;
    --am-red-tint: #fde9e7;
    --am-overlay: rgba(5, 10, 20, .55);
    --am-ring: rgba(54, 100, 209, .18);
    --am-pdf: #c2362b;
    --am-doc: #2f5fbd;
    --am-radius: 16px;
    --am-radius-sm: 9px;

    box-sizing: border-box;
    width: min(600px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--am-radius);
    background: var(--am-card);
    color: var(--am-text);
    box-shadow: 0 24px 64px rgba(5, 10, 20, .28), 0 2px 8px rgba(5, 10, 20, .12);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

html[data-theme="dark"] #wdApplyModal {
    --am-card: #141c2c;
    --am-card-2: #182234;
    --am-border: #25314a;
    --am-input-border: #33425f;
    --am-text: #e9eef7;
    --am-muted: #97a3b9;
    --am-brand: #8aa8ee;
    --am-brand-hover: #a3bbf3;
    --am-brand-text: #0b1430;
    --am-brand-tint: #1a2850;
    --am-green: #4cc98a;
    --am-green-tint: #123425;
    --am-amber: #f0b45a;
    --am-amber-tint: #3a2a10;
    --am-red: #f28b82;
    --am-red-tint: #3d1a18;
    --am-ring: rgba(138, 168, 238, .25);
    --am-pdf: #f28b82;
    --am-doc: #8aa8ee;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}

#wdApplyModal[open] {
    display: flex;
}

#wdApplyModal::backdrop {
    background: rgba(5, 10, 20, .55);
}

html.wd-am-lock,
html.wd-am-lock body {
    overflow: hidden !important;
}

#wdApplyModal *,
#wdApplyModal *::before,
#wdApplyModal *::after {
    box-sizing: border-box;
}

#wdApplyModal [hidden] {
    display: none !important;
}

#wdApplyModal h2,
#wdApplyModal h3,
#wdApplyModal h4,
#wdApplyModal p,
#wdApplyModal ol,
#wdApplyModal ul,
#wdApplyModal fieldset {
    margin: 0;
    padding: 0;
}

#wdApplyModal fieldset {
    border: 0;
    min-width: 0;
}

/* The site sets h1-h6 { font-weight: 600 !important } and heading colours
   with !important. */
#wdApplyModal h2,
#wdApplyModal h3,
#wdApplyModal h4 {
    font-family: inherit !important;
    font-weight: 700 !important;
    color: var(--am-text) !important;
    letter-spacing: normal;
}

#wdApplyModal h3.wd-am-sent__title {
    font-weight: 800 !important;
}

#wdApplyModal legend {
    float: none;
    width: auto;
    padding: 0;
}

#wdApplyModal ol,
#wdApplyModal ul {
    list-style: none;
}

#wdApplyModal :focus-visible {
    outline: 2px solid var(--am-brand);
    outline-offset: 2px;
}

#wdApplyModal .wd-am-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------------------------------------------------------------- frame */

#wdApplyModal .wd-am__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: inherit;
    min-height: 0;
}

#wdApplyModal .wd-am__head {
    flex: 0 0 auto;
    padding: 20px 24px 0;
    border-bottom: 1px solid var(--am-border);
    background: var(--am-card);
}

#wdApplyModal .wd-am__id {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
}

#wdApplyModal .wd-am__logo {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--am-border);
    background: var(--am-brand-tint);
    color: var(--am-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    font-size: 16px;
}

#wdApplyModal .wd-am__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    opacity: 1 !important;
}

#wdApplyModal .wd-am__headtext {
    flex: 1 1 auto;
    min-width: 0;
}

#wdApplyModal .wd-am__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--am-muted);
}

#wdApplyModal .wd-am__title {
    margin-top: 2px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--am-text);
    overflow-wrap: anywhere;
}

#wdApplyModal .wd-am__meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin: -4px -8px 0 0;
    border: 0;
    border-radius: var(--am-radius-sm);
    background: transparent;
    color: var(--am-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#wdApplyModal .wd-am__close:hover {
    background: var(--am-card-2);
    color: var(--am-text);
}

/* Progress: equal bars; the current and the done ones in brand blue. */
#wdApplyModal .wd-am__progress {
    display: flex;
    gap: 8px;
    padding-bottom: 14px;
}

#wdApplyModal .wd-am-progress__item {
    flex: 1 1 0;
    min-width: 0;
}

#wdApplyModal .wd-am-progress__bar {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--am-border);
}

#wdApplyModal .wd-am-progress__item.is-current .wd-am-progress__bar,
#wdApplyModal .wd-am-progress__item.is-done .wd-am-progress__bar {
    background: var(--am-brand);
}

#wdApplyModal .wd-am-progress__label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am-progress__item.is-current .wd-am-progress__label,
#wdApplyModal .wd-am-progress__item.is-done .wd-am-progress__label {
    color: var(--am-brand);
}

#wdApplyModal .wd-am-progress__label .wd-am-icon svg {
    width: 13px;
    height: 13px;
}

#wdApplyModal .wd-am__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 24px 24px;
    background: var(--am-card);
}

#wdApplyModal .wd-am__foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid var(--am-border);
    background: var(--am-card);
}

#wdApplyModal .wd-am-foot__side {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

#wdApplyModal .wd-am-foot__note {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-size: 12px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- buttons */

#wdApplyModal .wd-am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: var(--am-radius-sm) !important;
    border: 1px solid var(--am-input-border) !important;
    background: var(--am-card) !important;
    color: var(--am-text) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
    transition: background-color .15s, border-color .15s;
}

#wdApplyModal .wd-am-btn:hover {
    background: var(--am-card-2) !important;
}

#wdApplyModal .wd-am-btn--primary {
    border-color: var(--am-brand) !important;
    background: var(--am-brand) !important;
    color: var(--am-brand-text) !important;
}

#wdApplyModal .wd-am-btn--primary:hover {
    border-color: var(--am-brand-hover) !important;
    background: var(--am-brand-hover) !important;
}

#wdApplyModal .wd-am-btn--soft {
    border-color: transparent !important;
    background: var(--am-brand-tint) !important;
    color: var(--am-brand) !important;
}

#wdApplyModal .wd-am-btn--soft:hover {
    border-color: var(--am-brand) !important;
    background: var(--am-brand-tint) !important;
}

#wdApplyModal .wd-am-btn--sm {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
}

#wdApplyModal .wd-am-btn[disabled] {
    opacity: .7;
    cursor: progress;
}

#wdApplyModal .wd-am-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--am-brand) !important;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

#wdApplyModal .wd-am-iconbtn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--am-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--am-muted) !important;
    text-decoration: none !important;
}

#wdApplyModal .wd-am-iconbtn:hover {
    background: var(--am-card-2);
    color: var(--am-brand) !important;
}

#wdApplyModal .wd-am-icon {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

#wdApplyModal .wd-am-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: wd-am-spin .8s linear infinite;
}

#wdApplyModal .wd-am-spinner--sm {
    width: 14px;
    height: 14px;
}

@keyframes wd-am-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #wdApplyModal .wd-am-spinner { animation-duration: 2s; }
}

/* ---------------------------------------------------------------- fields */

#wdApplyModal .wd-am-step > * + * {
    margin-top: 22px;
}

/* The screen-reader heading takes no room, so neither does the gap after it. */
#wdApplyModal .wd-am-step > .wd-am-sr + * {
    margin-top: 0;
}

#wdApplyModal .wd-am-field {
    min-width: 0;
}

#wdApplyModal .wd-am-group > * + * {
    margin-top: 14px;
}

#wdApplyModal .wd-am-label,
#wdApplyModal label.wd-am-label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700 !important;
    color: var(--am-text) !important;
}

#wdApplyModal .wd-am-sublabel,
#wdApplyModal label.wd-am-sublabel {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600 !important;
    color: var(--am-text) !important;
}

#wdApplyModal .wd-am-req {
    color: var(--am-red);
    font-weight: 700;
}

#wdApplyModal .wd-am-opt {
    color: var(--am-muted);
    font-weight: 400;
    font-size: 13px;
}

#wdApplyModal .wd-am-hint {
    font-size: 13px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-hint--sm {
    font-size: 12px;
}

#wdApplyModal .wd-am-fieldhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

#wdApplyModal .wd-am-fieldhead .wd-am-label {
    margin: 0;
}

#wdApplyModal .wd-am-input,
#wdApplyModal input.wd-am-input,
#wdApplyModal textarea.wd-am-input {
    display: block;
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--am-input-border) !important;
    border-radius: var(--am-radius-sm) !important;
    background: var(--am-card) !important;
    color: var(--am-text) !important;
    font: inherit;
    font-size: 14px;
    box-shadow: none !important;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

#wdApplyModal textarea.wd-am-input {
    height: auto;
    min-height: 96px;
    resize: vertical;
    line-height: 1.55;
}

#wdApplyModal .wd-am-input::placeholder {
    color: var(--am-muted) !important;
    opacity: .8;
}

#wdApplyModal .wd-am-input:focus,
#wdApplyModal input.wd-am-input:focus,
#wdApplyModal textarea.wd-am-input:focus {
    border-color: var(--am-brand) !important;
    box-shadow: 0 0 0 3px var(--am-ring) !important;
}

#wdApplyModal .is-invalid .wd-am-input,
#wdApplyModal .is-invalid input.wd-am-input,
#wdApplyModal .is-invalid textarea.wd-am-input,
#wdApplyModal .is-invalid .wd-am-phone {
    border-color: var(--am-red) !important;
}

#wdApplyModal .wd-am-err {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-red);
}

#wdApplyModal .wd-am-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#wdApplyModal .wd-am-phone {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--am-input-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-card);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}

#wdApplyModal .wd-am-phone:focus-within {
    border-color: var(--am-brand);
    box-shadow: 0 0 0 3px var(--am-ring);
}

#wdApplyModal .wd-am-phone__cc {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid var(--am-border);
    background: var(--am-card-2);
    color: var(--am-muted);
    font-weight: 600;
}

#wdApplyModal .wd-am-phone input.wd-am-input,
#wdApplyModal .wd-am-phone input.wd-am-input:focus {
    height: 38px;
    min-height: 38px;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#wdApplyModal .wd-am-counter {
    margin-top: 4px;
    text-align: right;
    font-size: 12px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-note {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: var(--am-radius-sm);
    background: var(--am-brand-tint);
    color: var(--am-text);
    font-size: 13px;
}

/* Chips: real radios and checkboxes under a pill. */
#wdApplyModal .wd-am-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#wdApplyModal .wd-am-chip,
#wdApplyModal label.wd-am-chip {
    position: relative;
    display: inline-flex;
    margin: 0;
    font-weight: 600 !important;
    color: var(--am-text) !important;
    cursor: pointer;
}

#wdApplyModal .wd-am-chip__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

#wdApplyModal .wd-am-chip__text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--am-input-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-card);
    font-size: 13px;
    line-height: 1.3;
    transition: background-color .15s, border-color .15s;
}

#wdApplyModal .wd-am-chip:hover .wd-am-chip__text {
    border-color: var(--am-brand);
}

#wdApplyModal .wd-am-chip__input:checked + .wd-am-chip__text {
    border-color: var(--am-brand);
    background: var(--am-brand-tint);
    color: var(--am-brand);
}

#wdApplyModal .wd-am-chip__input:focus-visible + .wd-am-chip__text {
    outline: 2px solid var(--am-brand);
    outline-offset: 2px;
}

#wdApplyModal .wd-am-chip__tick {
    display: none;
}

#wdApplyModal .wd-am-chip__input:checked + .wd-am-chip__text .wd-am-chip__tick {
    display: inline-flex;
}

#wdApplyModal .is-invalid .wd-am-chip__text {
    border-color: var(--am-red);
}

/* Yes | No: one segmented control. */
#wdApplyModal .wd-am-seg {
    display: inline-flex;
    border: 1px solid var(--am-input-border);
    border-radius: var(--am-radius-sm);
    overflow: hidden;
}

#wdApplyModal .wd-am-seg__opt,
#wdApplyModal label.wd-am-seg__opt {
    position: relative;
    margin: 0;
    font-weight: 600 !important;
    color: var(--am-text) !important;
    cursor: pointer;
}

#wdApplyModal .wd-am-seg__opt + .wd-am-seg__opt {
    border-left: 1px solid var(--am-input-border);
}

#wdApplyModal .wd-am-seg__opt .wd-am-chip__text {
    min-width: 72px;
    justify-content: center;
    border: 0;
    border-radius: 0;
}

#wdApplyModal .is-invalid .wd-am-seg {
    border-color: var(--am-red);
}

#wdApplyModal .wd-am-chipbtn {
    min-height: 30px;
    padding: 4px 12px;
    border: 1px dashed var(--am-input-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-card);
    color: var(--am-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#wdApplyModal .wd-am-chipbtn:hover {
    border-color: var(--am-brand);
    color: var(--am-brand);
}

#wdApplyModal .wd-am-templates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* ---------------------------------------------------------------- resumes */

/* minmax(0, 1fr): a long resume name ellipsises instead of widening the
   card past the modal on a phone. */
#wdApplyModal .wd-am-resumes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

#wdApplyModal .wd-am-resume,
#wdApplyModal label.wd-am-resume {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: var(--am-card);
    font-weight: 400 !important;
    color: var(--am-text) !important;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

#wdApplyModal .wd-am-resume:hover {
    border-color: var(--am-input-border);
}

#wdApplyModal .wd-am-resume:has(.wd-am-resume__radio:checked) {
    border-color: var(--am-brand);
    background: var(--am-brand-tint);
}

#wdApplyModal .is-invalid .wd-am-resume {
    border-color: var(--am-red);
}

#wdApplyModal .wd-am-resume__radio {
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--am-input-border);
    border-radius: 50%;
    background: var(--am-card);
    cursor: pointer;
}

#wdApplyModal .wd-am-resume__radio:checked {
    border-color: var(--am-brand);
    box-shadow: inset 0 0 0 3px var(--am-card);
    background: var(--am-brand);
}

#wdApplyModal .wd-am-filetile {
    flex: 0 0 auto;
    width: 36px;
    height: 44px;
    border-radius: 6px;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #ffffff;
}

#wdApplyModal .wd-am-filetile--pdf { background: var(--am-pdf); }
#wdApplyModal .wd-am-filetile--doc { background: var(--am-doc); }

html[data-theme="dark"] #wdApplyModal .wd-am-filetile {
    color: #0b1430;
}

#wdApplyModal .wd-am-resume__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#wdApplyModal .wd-am-resume__name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#wdApplyModal .wd-am-resume__title {
    min-width: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am-resume__facts {
    font-size: 12px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am-pill {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--am-green-tint);
    color: var(--am-green);
    font-size: 11px;
    font-weight: 700;
}

#wdApplyModal .wd-am-drop {
    position: relative;
    margin-top: 8px;
}

#wdApplyModal .wd-am-drop__label,
#wdApplyModal label.wd-am-drop__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 14px 12px;
    border: 1.5px dashed var(--am-input-border);
    border-radius: 12px;
    background: var(--am-card-2);
    color: var(--am-text) !important;
    font-weight: 600 !important;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

#wdApplyModal .wd-am-drop__label:hover,
#wdApplyModal .wd-am-drop.is-over .wd-am-drop__label,
#wdApplyModal #wdAmFile:focus-visible + .wd-am-drop__label {
    border-color: var(--am-brand);
    background: var(--am-brand-tint);
}

#wdApplyModal #wdAmFile:focus-visible + .wd-am-drop__label {
    outline: 2px solid var(--am-brand);
    outline-offset: 2px;
}

#wdApplyModal .is-invalid .wd-am-drop__label {
    border-color: var(--am-red);
}

#wdApplyModal .wd-am-drop.is-busy .wd-am-drop__label {
    cursor: progress;
    opacity: .75;
}

#wdApplyModal .wd-am-drop__icon {
    color: var(--am-brand);
}

#wdApplyModal .wd-am-drop__hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--am-muted);
}

/* Skill match */
#wdApplyModal .wd-am-match {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: var(--am-card-2);
}

#wdApplyModal .wd-am-ring {
    position: relative;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
}

#wdApplyModal .wd-am-ring__track {
    stroke: var(--am-border);
}

#wdApplyModal .wd-am-ring--good .wd-am-ring__value { stroke: var(--am-green); }
#wdApplyModal .wd-am-ring--fair .wd-am-ring__value { stroke: var(--am-amber); }
#wdApplyModal .wd-am-ring--low .wd-am-ring__value { stroke: var(--am-red); }

#wdApplyModal .wd-am-ring__num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--am-text);
}

#wdApplyModal .wd-am-match__body {
    flex: 1 1 auto;
    min-width: 0;
}

#wdApplyModal .wd-am-match__text {
    font-size: 13px;
    color: var(--am-text);
}

#wdApplyModal .wd-am-match__tip {
    margin-top: 8px;
    font-size: 13px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

#wdApplyModal .wd-am-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

#wdApplyModal .wd-am-tag svg {
    width: 12px;
    height: 12px;
}

#wdApplyModal .wd-am-tag--found {
    background: var(--am-green-tint);
    color: var(--am-green);
}

#wdApplyModal .wd-am-tag--missing {
    background: var(--am-red-tint);
    color: var(--am-red);
}

/* ---------------------------------------------------------------- questions */

#wdApplyModal .wd-am-steptitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--am-text);
}

#wdApplyModal .wd-am-steptitle + .wd-am-hint {
    margin-top: 4px;
}

#wdApplyModal .wd-am-step > .wd-am-q + .wd-am-q {
    margin-top: 12px;
}

#wdApplyModal .wd-am-q {
    padding: 14px 16px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: var(--am-card);
}

#wdApplyModal .wd-am-q.is-invalid {
    border-color: var(--am-red);
    box-shadow: 0 0 0 3px var(--am-red-tint);
}

#wdApplyModal .wd-am-q__head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

#wdApplyModal .wd-am-q__num {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--am-brand-tint);
    color: var(--am-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

#wdApplyModal .wd-am-q__title {
    font-weight: 600;
    color: var(--am-text);
    overflow-wrap: anywhere;
}

#wdApplyModal .wd-am-q > .wd-am-seg,
#wdApplyModal .wd-am-q > .wd-am-chips,
#wdApplyModal .wd-am-q > .wd-am-num,
#wdApplyModal .wd-am-q > .wd-am-textarea {
    margin-left: 34px;
}

#wdApplyModal .wd-am-q > .wd-am-textarea {
    width: calc(100% - 34px);
}

#wdApplyModal .wd-am-q > .wd-am-err {
    margin-left: 34px;
}

#wdApplyModal .wd-am-num {
    display: flex;
    align-items: center;
    gap: 8px;
}

#wdApplyModal input.wd-am-input--num {
    width: 120px;
}

#wdApplyModal .wd-am-num__unit {
    color: var(--am-muted);
    font-size: 13px;
}

/* ---------------------------------------------------------------- review */

#wdApplyModal .wd-am-review {
    display: grid;
    gap: 12px;
}

#wdApplyModal .wd-am-sum {
    border: 1px solid var(--am-border);
    border-radius: 12px;
    overflow: hidden;
}

#wdApplyModal .wd-am-sum__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--am-card-2);
    border-bottom: 1px solid var(--am-border);
}

#wdApplyModal .wd-am-sum__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--am-text);
}

#wdApplyModal .wd-am-sum__body {
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

#wdApplyModal .wd-am-sum__row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    font-size: 13px;
}

#wdApplyModal .wd-am-sum__key {
    color: var(--am-muted);
}

#wdApplyModal .wd-am-sum__val {
    color: var(--am-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

#wdApplyModal .wd-am-sum__letter {
    font-size: 13px;
    color: var(--am-text);
    white-space: pre-line;
    overflow-wrap: anywhere;
    max-height: 160px;
    overflow-y: auto;
}

#wdApplyModal .wd-am-sum__qa {
    display: grid;
    gap: 2px;
    font-size: 13px;
}

#wdApplyModal .wd-am-sum__qa + .wd-am-sum__qa {
    padding-top: 8px;
    border-top: 1px solid var(--am-border);
}

#wdApplyModal .wd-am-sum__q {
    color: var(--am-muted);
}

#wdApplyModal .wd-am-sum__a {
    color: var(--am-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

#wdApplyModal .is-muted {
    color: var(--am-muted) !important;
    font-weight: 400 !important;
}

#wdApplyModal .wd-am-consent,
#wdApplyModal label.wd-am-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: var(--am-card-2);
    font-size: 13px;
    font-weight: 400 !important;
    color: var(--am-text) !important;
    cursor: pointer;
}

#wdApplyModal .wd-am-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--am-brand);
}

#wdApplyModal .is-invalid .wd-am-consent {
    border-color: var(--am-red);
}

/* ---------------------------------------------------------------- states */

#wdApplyModal .wd-am__alert {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: var(--am-radius-sm);
    background: var(--am-red-tint);
    color: var(--am-red);
    font-size: 13px;
    font-weight: 600;
}

#wdApplyModal .wd-am-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-panel {
    padding: 24px 8px 8px;
    text-align: center;
}

#wdApplyModal .wd-am-panel__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--am-brand-tint);
    color: var(--am-brand);
}

#wdApplyModal .wd-am-panel__icon svg {
    width: 26px;
    height: 26px;
}

#wdApplyModal .wd-am-panel--muted .wd-am-panel__icon {
    background: var(--am-card-2);
    color: var(--am-muted);
}

#wdApplyModal .wd-am-panel__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--am-text);
}

#wdApplyModal .wd-am-panel__text {
    margin-top: 6px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-panel > .wd-am-link,
#wdApplyModal .wd-am-panel > .wd-am-btn {
    display: inline-flex;
    margin-top: 14px;
}

/* Sent */
#wdApplyModal .wd-am-sent {
    text-align: center;
}

#wdApplyModal .wd-am-sent__icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: var(--am-green-tint);
    color: var(--am-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

#wdApplyModal .wd-am-sent__icon svg {
    width: 30px;
    height: 30px;
}

#wdApplyModal .wd-am-sent__title {
    font-size: 19px;
    font-weight: 800;
    color: var(--am-text);
}

#wdApplyModal .wd-am-sent__lead {
    margin-top: 4px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am-tips {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    text-align: left;
}

#wdApplyModal .wd-am-tips__item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--am-card-2);
    font-size: 13px;
    color: var(--am-text);
}

#wdApplyModal .wd-am-tips__num {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--am-brand-tint);
    color: var(--am-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

#wdApplyModal .wd-am-similar {
    margin-top: 20px;
    text-align: left;
}

#wdApplyModal .wd-am-similar__title {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--am-text);
}

#wdApplyModal .wd-am-similar__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

#wdApplyModal .wd-am-similar__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    color: var(--am-text) !important;
    text-decoration: none !important;
    transition: border-color .15s, background-color .15s;
}

#wdApplyModal .wd-am-similar__row:hover {
    border-color: var(--am-brand);
    background: var(--am-brand-tint);
}

#wdApplyModal .wd-am-similar__logo {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--am-border);
    background: var(--am-brand-tint);
    color: var(--am-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
}

#wdApplyModal .wd-am-similar__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    opacity: 1 !important;
}

#wdApplyModal .wd-am-similar__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#wdApplyModal .wd-am-similar__job {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am-similar__meta {
    font-size: 12px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wdApplyModal .wd-am-similar__arrow {
    color: var(--am-brand);
}

/* Toast and the leave confirm, over the modal's own content. */
#wdApplyModal .wd-am__toast {
    position: absolute;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    max-width: calc(100% - 48px);
    padding: 10px 16px;
    border-radius: var(--am-radius-sm);
    background: var(--am-text);
    color: var(--am-card);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(5, 10, 20, .25);
    z-index: 3;
}

#wdApplyModal .wd-am__confirm {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--am-overlay);
}

#wdApplyModal .wd-am__confirm-card {
    width: min(360px, 100%);
    padding: 20px;
    border-radius: 14px;
    background: var(--am-card);
    border: 1px solid var(--am-border);
    box-shadow: 0 16px 40px rgba(5, 10, 20, .3);
}

#wdApplyModal .wd-am__confirm-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--am-text);
}

#wdApplyModal .wd-am__confirm-text {
    margin-top: 6px;
    color: var(--am-muted);
}

#wdApplyModal .wd-am__confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

/* ---------------------------------------------------------------- phone */

@media (max-width: 639.98px) {
    #wdApplyModal {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }

    #wdApplyModal .wd-am__panel {
        height: 100%;
        max-height: none;
    }

    #wdApplyModal .wd-am__head {
        padding: 16px 16px 0;
    }

    #wdApplyModal .wd-am__body {
        padding: 16px;
    }

    #wdApplyModal .wd-am__foot {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    #wdApplyModal .wd-am-foot__note {
        order: -1;
        flex: 1 0 100%;
    }

    #wdApplyModal .wd-am-foot__note:empty {
        display: none;
    }

    #wdApplyModal .wd-am-foot__side {
        flex: 1 1 0;
    }

    #wdApplyModal .wd-am-foot__side:empty {
        display: none;
    }

    #wdApplyModal .wd-am-foot__side .wd-am-btn {
        flex: 1 1 auto;
        width: 100%;
    }

    #wdApplyModal .wd-am-row2 {
        grid-template-columns: 1fr;
    }

    #wdApplyModal .wd-am-q > .wd-am-seg,
    #wdApplyModal .wd-am-q > .wd-am-chips,
    #wdApplyModal .wd-am-q > .wd-am-num,
    #wdApplyModal .wd-am-q > .wd-am-textarea,
    #wdApplyModal .wd-am-q > .wd-am-err {
        margin-left: 0;
    }

    #wdApplyModal .wd-am-q > .wd-am-textarea {
        width: 100%;
    }

    #wdApplyModal .wd-am-sum__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #wdApplyModal .wd-am-fieldhead {
        flex-wrap: wrap;
    }
}

/* ---------------------------------------------------------------- page */

/* The job page's apply panel: "Applied · View application status" and the
   guest's sign-in link under Apply. */
a.wd-apply-status-link {
    display: inline-flex;
    cursor: pointer;
    text-decoration: none;
}
a.wd-apply-status-link:hover,
a.wd-apply-status-link:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(.95);
}
.wd-apply-signin-link {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* An Apply button once the application is in (apply-modal.js markApplied). */
button.wd-am-applied[aria-disabled="true"],
button.wd-am-applied[aria-disabled="true"]:hover {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #e3f5eb !important;
    border: 1px solid #b7e4c7 !important;
    color: #14804a !important;
    box-shadow: none !important;
    cursor: default !important;
    opacity: 1 !important;
    transform: none !important;
}

html[data-theme="dark"] button.wd-am-applied[aria-disabled="true"] {
    background: #123425 !important;
    border-color: #1f5c3d !important;
    color: #4cc98a !important;
}
