/* Job cards. Load after card-job.min.css and the listing styles. */
.asap-card {
    --asap-card-ink: #17365d;
    --asap-card-muted: #52647b;
    --asap-card-border: #d5e0ec;
    --asap-card-surface: #f5f8fc;

    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    color: var(--asap-card-ink);
    background: #fff;
    border: 1px solid var(--asap-card-border);
    border-radius: 16px;
    overflow: visible;
    font-size: 14px;
    line-height: 1.5;
    transform: none;
    transition: none;
}

.asap-card,
.asap-card * {
    box-sizing: border-box;
}

/* Neutralize the previous unconditional hover and scale effects. */
.asap-card:hover {
    border-color: var(--asap-card-border);
    box-shadow: none;
    transform: none;
}

.asap-card .asap-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background: var(--asap-card-surface);
    border-bottom: 1px solid var(--asap-card-border);
    border-radius: 15px 15px 0 0;
}

.asap-card .asap-card__entity {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* The entity text wrapper has no dedicated class in the PHP component. */
.asap-card .asap-card__entity > div {
    flex: 1 1 auto;
    min-width: 0;
}

.asap-card .asap-card__entity-logo {
    display: block;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    max-width: none;
    aspect-ratio: 1;
    padding: 4px;
    object-fit: contain;
    object-position: center;
    background: #fff;
    border: 1px solid var(--asap-card-border);
    border-radius: 10px;
}

.asap-card .asap-card__entity-name,
.asap-card .asap-card__entity-location {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    text-decoration: none;
}

.asap-card .asap-card__entity-name {
    color: var(--asap-card-ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

.asap-card .asap-card__entity-location {
    margin-top: 3px;
    color: var(--asap-card-muted);
    font-size: 14px;
    line-height: 1.4;
}

.asap-card .asap-card__save-btn {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    color: var(--asap-card-ink);
    background: #fff;
    border: 1px solid #bccddd;
    border-radius: 10px;
    cursor: pointer;
    transform: none;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.asap-card .asap-card__save-btn.saved {
    color: #9d3154;
    background: #fff0f4;
    border-color: #e5b6c5;
    animation: none;
    transform: none;
}

.asap-card .asap-card__save-btn.astro-fav-loading {
    cursor: progress;
}

.asap-card .asap-card__save-btn:disabled,
.asap-card .asap-card__save-btn[aria-disabled="true"] {
    cursor: not-allowed;
}

.asap-card .asap-card__save-btn svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}

.asap-card .asap-card__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 18px 16px;
}

.asap-card .asap-card__heading {
    margin: 0 0 10px;
    padding: 0;
    font: inherit;
}

.asap-card .asap-card__title {
    display: block;
    margin: 0;
    color: var(--asap-card-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: normal;
    text-decoration: none;
}

.asap-card .asap-card__salary {
    margin: 0 0 14px;
    color: var(--asap-card-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.asap-card .asap-card__salary span {
    margin-left: 5px;
    color: var(--asap-card-muted);
    font-size: 14px;
    font-weight: 400;
}

.asap-card .asap-card__careers {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    margin: 0 0 14px;
    padding: 0;
}

.asap-card .asap-card__career-tag {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    padding: 9px 12px;
    color: #244e79;
    background: #f1f6fb;
    border: 1px solid #cfdeed;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: left;
    text-decoration: none;
    transition: none;
}

.asap-card .asap-card__career-more {
    min-width: 0;
    max-width: 100%;
}

.asap-card .asap-card__career-more[open] {
    flex-basis: 100%;
}

.asap-card .asap-card__career-tag--more {
    justify-content: center;
    color: #fff;
    background: var(--asap-card-ink);
    border-color: var(--asap-card-ink);
    cursor: pointer;
    list-style: none;
}

.asap-card .asap-card__career-tag--more::-webkit-details-marker {
    display: none;
}

.asap-card .asap-card__careers--expanded {
    margin: 8px 0 0;
}

.asap-card .asap-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 18px;
    min-width: 0;
}

.asap-card .asap-card__meta-item,
.asap-card .asap-card__deadline {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    color: var(--asap-card-muted);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: normal;
}

.asap-card .asap-card__meta-item {
    max-width: 100%;
}

.asap-card .asap-card__meta-item svg,
.asap-card .asap-card__deadline svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.asap-card .asap-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid var(--asap-card-border);
    border-radius: 0 0 15px 15px;
}

.asap-card .asap-card__deadline {
    flex: 1 1 180px;
}

.asap-card .asap-card__deadline time {
    min-width: 0;
    overflow-wrap: anywhere;
}

.asap-card .asap-card__deadline--urgent {
    color: #a1392e;
    font-weight: 600;
}

.asap-card .asap-card__btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    margin-left: auto;
    padding: 10px 16px;
    color: #fff;
    background: var(--asap-card-ink);
    border: 1px solid var(--asap-card-ink);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
    text-decoration: none;
    transform: none;
    transition: none;
}

.asap-card .asap-card__btn svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    transform: none;
    transition: none;
}

.asap-card :is(a, button, summary):focus-visible {
    outline: 3px solid #2673b8;
    outline-offset: 3px;
}

/* Hover feedback is limited to devices with a precise pointing device. */
@media (hover: hover) and (pointer: fine) {
    .asap-card:hover {
        border-color: #a9bfd6;
        box-shadow: 0 6px 18px rgb(23 54 93 / 8%);
    }

    .asap-card a.asap-card__entity-name:hover,
    .asap-card .asap-card__title:hover {
        color: #205f9c;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .asap-card .asap-card__save-btn:hover {
        background: #eaf1f8;
        border-color: #98b2ce;
    }

    .asap-card .asap-card__save-btn.saved:hover {
        background: #fbe3eb;
        border-color: #d89bb0;
    }

    .asap-card .asap-card__career-tag:hover {
        color: var(--asap-card-ink);
        background: #e4edf7;
        border-color: #a9bfd6;
    }

    .asap-card .asap-card__career-tag--more:hover,
    .asap-card .asap-card__btn:hover {
        color: #fff;
        background: #244e79;
        border-color: #244e79;
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .asap-card {
        transition: border-color 160ms ease, box-shadow 160ms ease;
    }

    .asap-card .asap-card__save-btn,
    .asap-card .asap-card__career-tag,
    .asap-card .asap-card__btn {
        transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
    }
}

@media (max-width: 480px) {
    .asap-card .asap-card__top {
        gap: 10px;
        padding: 14px;
    }

    .asap-card .asap-card__entity {
        gap: 10px;
    }

    .asap-card .asap-card__body {
        padding: 16px 14px;
    }

    .asap-card .asap-card__footer {
        align-items: stretch;
        padding: 14px;
    }

    .asap-card .asap-card__deadline,
    .asap-card .asap-card__btn {
        flex-basis: 100%;
    }

    .asap-card .asap-card__btn {
        width: 100%;
    }
}
