/*
 * Next Vaga vacancy browsing and detail presentation.
 *
 * This stylesheet extends site.css without changing the shared brand.
 * All components use the nv- prefix to avoid unrelated page overrides.
 */

.nv-browser {
    padding-bottom: 48px;
}

/* Keep labels visible instead of relying on placeholder text. */
.nv-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) auto;
    align-items: end;
    gap: 16px;
}

.nv-filter-grid .form-field {
    margin: 0;
}

.nv-filter-grid input,
.nv-filter-grid select {
    min-height: 50px;
    background: var(--soft);
    border-radius: 8px;
}

.nv-filter-grid .button {
    min-height: 50px;
}

.nv-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.nv-category {
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.nv-category:hover {
    border-color: var(--wine);
    color: var(--wine);
}

.nv-category[aria-pressed="true"] {
    background: var(--wine);
    border-color: var(--wine);
    color: var(--paper);
}

.nv-reset {
    margin-top: 16px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--wine);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.nv-results-status {
    margin-block: 24px 18px;
}

/* One vacancy per row, regardless of screen width. */
.nv-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

/*
 * The card establishes the positioning context for the stretched link.
 * Isolation keeps its link and independent sharing control in one layer.
 */
.nv-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
    box-shadow: 0 3px 12px rgb(36 35 38 / 6%);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.nv-card-body {
    min-width: 0;
}

@media (hover: hover) {
    .nv-card:hover {
        transform: translateY(-2px);
        border-color: var(--wine);
        box-shadow: 0 12px 28px rgb(36 35 38 / 10%);
    }
}

/* Keyboard users receive a card-level highlight as well. */
.nv-card:focus-within {
    border-color: var(--wine);
    box-shadow: 0 0 0 3px rgb(116 31 53 / 18%);
}

.nv-reference {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.nv-demo-tag {
    color: var(--wine);
}

.nv-card-title {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.nv-company-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.6;
}

.nv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nv-chips li {
    max-width: 100%;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.83rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.nv-chips .nv-salary {
    background: #f0e2e6;
    border-color: #f0e2e6;
    color: var(--wine);
    font-weight: 600;
}

.nv-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/*
 * The visible link remains a real anchor with normal browser behaviour:
 * keyboard activation, opening in another tab and copying its address.
 */
.nv-card-link {
    position: static;
    white-space: nowrap;
}

.nv-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 14px;
}

/* This sibling button sits above the stretched anchor. */
.nv-share-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--wine);
    font-weight: 600;
    cursor: pointer;
}

.nv-share-button:hover {
    border-color: var(--wine);
    background: #f0e2e6;
}

.nv-share-button svg {
    flex-shrink: 0;
}

/* Detail content and application form align at the top. */
.nv-detail-page {
    padding-top: 38px;
    padding-bottom: 60px;
}

.nv-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(320px, 1fr);
    align-items: start;
    gap: 28px;
    margin-top: 24px;
}

.nv-detail-panel,
.nv-application {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.nv-detail-panel {
    background: var(--paper);
}

.nv-detail-panel .nv-title {
    max-width: none;
    margin: 12px 0 22px;
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.nv-detail-summary {
    margin-top: 26px;
    color: var(--muted);
}

.nv-description-section {
    margin-top: 30px;
}

.nv-description-section h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.nv-description-section ul {
    padding-left: 22px;
}

.nv-description-section li {
    margin-bottom: 10px;
    color: var(--muted);
}

.nv-paragraph {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.nv-application {
    background: var(--soft);
    box-shadow: 0 3px 12px rgb(36 35 38 / 6%);
}

.nv-application h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.nv-application .button {
    width: 100%;
}

.nv-application input {
    min-width: 0;
}

.nv-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-block: 20px;
}

.nv-consent input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 5px 0 0;
    padding: 0;
    accent-color: var(--wine);
}

.nv-consent label {
    font-size: 0.85rem;
    line-height: 1.6;
}

.nv-consent a {
    color: var(--wine);
}

.nv-detail-share {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.nv-copy {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.nv-copy label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

@media (max-width: 950px) {
    .nv-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .nv-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nv-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px;
        gap: 20px;
    }

    .nv-card-actions .nv-card-link {
        flex: 1;
        justify-content: center;
    }

    .nv-detail-panel,
    .nv-application {
        padding: 22px;
    }
}

/* Respect operating-system preferences for reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .nv-card {
        transition: none;
    }

    .nv-card:hover {
        transform: none;
    }
}
