/* Syngenta - Resultados NK : front-end */

.nk-res {
    --nk-blue: #00558c;
    --nk-green: #00936f;
    --nk-badge: #04936f;
    --nk-text: #212121;
    --nk-cell: #5a5a5a;
    --nk-muted: #787878;
    --nk-placeholder: #828282;
    --nk-border: #d9d9d9;
    --nk-row-border: #f0f0f0;
    font-family: Helvetica, Arial, sans-serif;
    color: var(--nk-text);
    width: 100%;
}
.nk-res *,
.nk-res *::before,
.nk-res *::after {
    box-sizing: border-box;
}
.nk-res :where(p) {
    margin: 0;
}
.nk-res button {
    font-family: inherit;
    background: none;
    cursor: pointer;
}
.nk-res .nk-res__tab,
.nk-res .nk-res__page,
.nk-res .nk-res__modal-close {
    border: 0;
}
/* The theme's reset.css paints [type=button]:hover/:focus pink (#c36);
   every interactive state below overrides it explicitly. */
.nk-res button:hover,
.nk-res button:focus {
    background: transparent;
    color: inherit;
    outline: none;
}
.nk-res .nk-res__tab:hover,
.nk-res .nk-res__tab:focus {
    background: #C3C3C3;
    color: var(--nk-text);
}
.nk-res .nk-res__tab.is-active:hover,
.nk-res .nk-res__tab.is-active:focus {
    background: var(--nk-blue);
    color: #fff;
}
.nk-res .nk-res__select-btn:hover,
.nk-res .nk-res__select-btn:focus {
    background: #fff;
    color: inherit;
    border-color: var(--nk-border);
}
.nk-res .nk-res__page:hover,
.nk-res .nk-res__page:focus {
    background: #f0f0f0;
    color: #1e1e1e;
}
.nk-res .nk-res__page.is-active:hover,
.nk-res .nk-res__page.is-active:focus {
    background: var(--nk-green);
    color: #fff;
}
.nk-res .nk-res__page--next:hover,
.nk-res .nk-res__page--next:focus {
    background: #f0f0f0;
}
.nk-res .nk-res__btn--share:hover,
.nk-res .nk-res__btn--share:focus {
    background: #037D5F;
    color: #eee;
}
.nk-res .nk-res__btn--download:hover,
.nk-res .nk-res__btn--download:focus {
    background: #f5f5f5;
    color: #212121;
}
.nk-res .nk-res__modal-close:hover,
.nk-res .nk-res__modal-close:focus {
    background: transparent;
}

/* ---------- Filters ---------- */
.nk-res__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
}
.nk-res__tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 4px;
    background: #fff;
    border: 1px solid var(--nk-border);
    border-radius: 8px;
}
.nk-res__tab {
    width: 80px;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    color: var(--nk-placeholder);
    text-align: center;
    transition: background 0.15s, color 0.15s;
}
.nk-res__tab:disabled,
.nk-res__tab.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.nk-res__tab.is-active {
    background: var(--nk-blue);
    color: #fff;
}

.nk-res__select {
    position: relative;
    width: 196px;
}
.nk-res__select[data-filter="estado"],
.nk-res__select[data-filter="safra"] {
    width: 160px;
}
.nk-res__select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--nk-border);
    border-radius: 8px;
    text-align: left;
}
.nk-res__select-label {
    flex: 1;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    color: var(--nk-placeholder);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nk-res__select.has-value .nk-res__select-label {
    color: var(--nk-text);
}
.nk-res__select-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: center / contain no-repeat;
}
.nk-res__select-icon--produto {
    background-image: url(../img/icon-sacaria.png);
    background-size: contain;
    background-position: center;
}
.nk-res__select-icon--estado {
    background-image: url(../img/icon-pin-estado.svg);
    background-size: contain;
}
.nk-res__select-icon--safra {
    background-image: url(../img/icon-calendar.svg);
    background-size: contain;
}
.nk-res__select-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background-color: #A4A4A4;
    mask: url(../img/icon-chevron.svg) center / contain no-repeat;
    -webkit-mask: url(../img/icon-chevron.svg) center / contain no-repeat;
    transition: transform 0.15s, background-color 0.15s;
}
.nk-res__select.is-open .nk-res__select-chevron {
    transform: rotate(180deg);
}
.nk-res__select.is-open .nk-res__select-btn {
    border-color: #00558C;
}
.nk-res__select.is-open .nk-res__select-label {
    color: #212121;
}
.nk-res__select.is-open .nk-res__select-chevron {
    background-color: #212121;
}
/* Higher-specificity safety net: opening the dropdown focuses the button,
   so the :hover/:focus shield above must never be able to win this fight. */
.nk-res__select.is-open .nk-res__select-btn:hover,
.nk-res__select.is-open .nk-res__select-btn:focus {
    border-color: #00558C;
    background: #fff;
}
.nk-res__select-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    min-width: 100%;
    width: max-content;
    max-width: 320px;
    max-height: 320px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid var(--nk-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.nk-res__select-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    font-size: 16px;
    color: #171717;
    cursor: pointer;
}
.nk-res__select-list li::after {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #b6bcc3;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}
.nk-res__select-list li:hover {
    background: #f7f7f7;
}
.nk-res__select-list li.is-selected {
    background: #f5f5f5;
}
.nk-res__select-list li.is-selected::after {
    border-color: var(--nk-blue);
    background: radial-gradient(circle, var(--nk-blue) 0 5px, #fff 5.5px);
}
/* Radio indicator is a mobile-only affordance (Figma's desktop dropdown
   has no circle); the ::after itself stays defined above so mobile keeps it. */
@media (min-width: 768px) {
    .nk-res__select-list li::after {
        display: none;
    }
}

.nk-res__check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.nk-res__check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.nk-res__check-box {
    width: 16px;
    height: 16px;
    background: #f2f2f2;
    border: 1px solid var(--nk-border);
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.nk-res__check input:checked + .nk-res__check-box {
    background: var(--nk-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
    border-color: var(--nk-green);
}
.nk-res__check-label {
    font-size: 14px;
    line-height: 1.2;
    color: var(--nk-text);
}

/* ---------- Meta / divider ---------- */
.nk-res__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 24px;
    font-size: 14px;
    color: var(--nk-muted);
}
.nk-res__count strong {
    font-weight: 400;
    color: var(--nk-text);
}
.nk-res__divider {
    width: 100%;
    height: 1px;
    margin: 24px 0;
    background: var(--nk-row-border);
}

/* ---------- Table (desktop) ---------- */
.nk-res__table {
    width: 100%;
    overflow-x: auto;
}
.nk-res__thead,
.nk-res__tbody {
    min-width: 800px;
}
.nk-res__thead,
.nk-res__row {
    display: grid;
    grid-template-columns: 128px 180px 128px 72px 136px 136px;
    width: 100%;
}
.nk-res__th {
    padding: 12px 8px;
    border-bottom: 1px solid var(--nk-row-border);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--nk-muted);
}
.nk-res__th.nk-res__col--resultado {
    text-align: right;
}
.nk-res__row {
    min-height: 60px;
    cursor: pointer;
    transition: background 0.12s;
}
.nk-res__row:hover {
    background: #f7fafc;
}
.nk-res__cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    padding: 8px;
    border-bottom: 1px solid var(--nk-row-border);
    font-size: 14px;
    line-height: 1;
    color: var(--nk-cell);
}
.nk-res__cell > span {
    max-width: 100%;
    overflow: hidden;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nk-res__cell--resultado {
    flex-direction: row;
    gap: 4px;
    align-items: baseline;
    justify-content: flex-end;
    font-size: 14px;
    font-weight: 700;
    color: var(--nk-blue);
}
/* Units differ per row (sc/ha, ton/ha, sc/alq), so they are printed
   next to each value instead of once in the column header. */
.nk-res__cell--resultado .nk-res__unidade {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 400;
    color: var(--nk-muted);
}
.nk-res__badge {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 8px;
    background: var(--nk-badge);
    box-shadow: 0 0 5px rgba(16, 16, 16, 0.1);
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    color: #fff;
}
.nk-res__empty {
    padding: 32px 8px;
    font-size: 14px;
    color: var(--nk-muted);
    text-align: center;
}

/* Mobile-only bits inside a row */
.nk-res__cell--mobile,
.nk-res__row-chevron {
    display: none;
}

/* ---------- Showing / pagination ---------- */
.nk-res__showing {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1;
    color: var(--nk-muted);
}
.nk-res__showing strong {
    font-weight: 400;
    color: var(--nk-text);
}
.nk-res__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
}
.nk-res__page {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    color: #1e1e1e;
}
.nk-res__page.is-active {
    background: var(--nk-green);
    color: #fff;
}
.nk-res__page--gap {
    padding: 8px 16px;
    font-weight: 700;
    cursor: default;
}
.nk-res__page--next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
}
.nk-res__page--next::after {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231e1e1e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nk-res__page--next:disabled {
    opacity: 0.35;
    cursor: default;
}

/* ---------- Modal ---------- */
.nk-res__overlay[hidden] {
    display: none;
}
.nk-res__overlay {
    --nk-blue: #00558c;
    --nk-green: #00936f;
    --nk-badge: #04936f;
    --nk-text: #212121;
    --nk-cell: #5a5a5a;
    --nk-muted: #787878;
    --nk-placeholder: #828282;
    --nk-border: #d9d9d9;
    --nk-row-border: #f0f0f0;
    position: fixed;
    inset: 0;
    z-index: 2147483000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 27, 42, 0.55);
}
.nk-res__modal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 498px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    padding: 16px 24px;
    overflow-y: auto;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}
.nk-res__modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 24px;
    height: 24px;
    padding: 0;
}
.nk-res__modal-close span {
    display: block;
    width: 100%;
    height: 100%;
    background: url(../img/icon-x.svg) center / contain no-repeat;
}
.nk-res__card {
    background: #fff;
}
.nk-res__card-header {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 0;
}
.nk-res__card-left {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.nk-res__card-logo {
    align-self: flex-start;
    max-width: 170px;
    max-height: 48px;
    object-fit: contain;
}
.nk-res__card-produto-nome {
    margin: 0;
    font-family: Branding, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: var(--nk-blue);
}
.nk-res__card-label {
    margin: 0;
    font-size: 14px;
    line-height: 1;
    color: #888;
}
.nk-res__card-numero {
    margin: 4px 0 -4px;
    font-family: Branding, Helvetica, sans-serif;
    font-size: 80px;
    font-weight: bold;
    line-height: 0.95;
    color: var(--nk-blue);
    white-space: nowrap;
}
.nk-res__card-unidade {
    margin: 0;
    font-size: 16px;
    line-height: 1;
    color: #888;
}
.nk-res__card-mapa {
    flex-shrink: 0;
    width: 218.64px;
    height: 220px;
}
.nk-res__card-mapa img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.nk-res__card-mapa.is-empty {
    display: none;
}
.nk-res__card-body {
    padding-bottom: 24px;
}
.nk-res__card-produtor {
    margin: 0;
    font-family: Branding, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    color: #171717;
}
.nk-res__card-local {
    margin-top: 8px;
    padding-bottom: 8px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1;
    color: #171717;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nk-res__card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.nk-res__card-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid var(--nk-row-border);
    font-size: 16px;
    line-height: 1;
}
.nk-res__card-line span:first-child {
    color: #888;
}
.nk-res__card-line span:last-child {
    color: #171717;
}
.nk-res__card-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 16px auto 18px;
    padding-top: 0;
    text-align: center;
}
.nk-res__card-brand img {
    display: block;
    width: min(100%, 506px);
    max-height: none;
    margin: 0 auto;
    object-fit: contain;
}
.nk-res__card-actions {
    display: flex;
    gap: 8px;
}
.nk-res .nk-res__btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    box-sizing: border-box;
    min-height: 56px;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    padding: 0 20px;
    border-radius: 48px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.15px;
    line-height: 1;
    white-space: nowrap;
}
.nk-res .nk-res__btn--share {
    background: var(--nk-green);
    color: #eee;
}
.nk-res .nk-res__btn--download {
    border: 1px solid #212121;
    color: #212121;
}
.nk-res .nk-res__btn-icon {
    width: 16px;
    height: 16px;
    background: center / contain no-repeat;
}
.nk-res .nk-res__btn-icon--share {
    background-image: url(../img/icon-share.svg);
}
.nk-res .nk-res__btn-icon--download {
    background-image: url(../img/icon-download.svg);
}
.nk-res .nk-res__btn.is-busy {
    opacity: 0.6;
    pointer-events: none;
}
.nk-res .nk-res__image-status {
    margin: 12px 0 0;
    color: #4b4b4b;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}
.nk-res .nk-res__image-status.is-error {
    color: #b42318;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .nk-res__tabs {
        width: 100%;
    }
    .nk-res__tab {
        flex: 1;
        width: auto;
    }
    .nk-res__select,
    .nk-res__select[data-filter="estado"],
    .nk-res__select[data-filter="safra"] {
        width: calc(50% - 8px);
    }
    .nk-res__meta {
        margin-top: 16px;
    }
    .nk-res__divider {
        margin: 16px 0;
    }

    .nk-res__thead {
        display: none;
    }
    .nk-res__tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-height: 780px;
        overflow-y: auto;
        padding: 4px 14px 4px 4px;
        scrollbar-width: thin;
        scrollbar-color: #aeb6bd transparent;
    }
    .nk-res__tbody::-webkit-scrollbar {
        width: 8px;
    }
    .nk-res__tbody::-webkit-scrollbar-thumb {
        background: #aeb6bd;
        border-radius: 8px;
    }
    .nk-res__tbody::-webkit-scrollbar-track {
        background: transparent;
    }
    .nk-res__cell--produto .nk-res__badge {
        display: none;
    }
    .nk-res__showing,
    .nk-res__pagination {
        display: none;
    }
    .nk-res__row {
        position: relative;
        display: flex;
        flex-shrink: 0;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        min-height: 0;
        padding: 16px 40px 16px 16px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 2px 10px rgba(16, 16, 16, 0.08);
    }
    .nk-res__row:hover {
        background: #fff;
    }
    .nk-res__cell {
        display: none;
        padding: 0;
        border-bottom: 0;
    }
    .nk-res__cell--produto {
        display: flex;
        order: 4;
        width: 100%;
        margin-top: 8px;
    }
    .nk-res__cell--produto .nk-res__produto-nome {
        display: inline-block;
        padding: 6px 10px;
        border: 1px solid var(--nk-border);
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        color: var(--nk-text);
    }
    .nk-res__cell--mobile {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 6px;
        order: 1;
        min-width: 0;
    }
    .nk-res__mobile-nome {
        overflow: hidden;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
        color: #171717;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .nk-res__mobile-local {
        overflow: hidden;
        font-size: 12px;
        line-height: 1.2;
        color: var(--nk-muted);
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .nk-res__thead,
    .nk-res__tbody {
        min-width: 0;
    }
    .nk-res__cell--resultado {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        order: 2;
        font-family: Branding, Helvetica, sans-serif;
        font-size: 32px;
        font-weight: bold;
        line-height: 1.15;
        color: var(--nk-green);
    }
    .nk-res__cell--resultado .nk-res__unidade {
        font-family: Helvetica, Arial, sans-serif;
        font-size: 13px;
        font-weight: 400;
        line-height: 1;
        color: var(--nk-green);
    }
    .nk-res__select-list {
        position: fixed;
        top: 50%;
        left: 16px;
        right: 16px;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: 76vh;
        transform: translateY(-50%);
        z-index: 100000;
        border-radius: 16px;
        box-shadow: 0 0 0 100vmax rgba(13, 27, 42, 0.45);
    }
    .nk-res__row-chevron {
        content: "";
        position: absolute;
        top: 50%;
        right: 14px;
        display: block;
        width: 16px;
        height: 16px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23787878' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M5 3l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
        transform: translateY(-50%);
    }

    /* Bottom sheet */
    .nk-res__overlay {
        align-items: flex-end;
        padding: 0;
    }
    .nk-res__modal {
        width: 100%;
        max-height: 88vh;
        padding: 24px 16px 16px;
        border-radius: 30px 30px 0 0;
        transition: transform 0.25s ease;
    }
    .nk-res__modal-handle {
        position: absolute;
        top: 16px;
        left: 50%;
        z-index: 2;
        width: 42px;
        height: 3px;
        background: var(--nk-border);
        border-radius: 3px;
        transform: translateX(-50%);
        touch-action: none;
    }
    .nk-res__modal-handle::before {
        /* Enlarge the touch target well past the visible 3px bar without
           affecting layout. */
        content: "";
        position: absolute;
        inset: -16px -24px;
    }
    .nk-res__modal.is-dragging {
        transition: none;
    }
    .nk-res__card-header {
        flex-wrap: wrap;
    }
    .nk-res__card-mapa {
        width: 150px;
        height: 152px;
        margin-left: auto;
    }
    .nk-res__card-numero {
        font-size: 64px;
    }
    .nk-res__card-actions {
        flex-direction: column;
    }
}

/* The site's global "CSS Adicional" forces every h1-h6 to the Branding
   font with !important; nothing short of !important here can win against
   that, regardless of selector specificity. Scoped to our own stable class
   (not Elementor's random per-render element id) so it survives page
   regeneration and never leaks onto any other heading on the site. */
.nk-res-promo-title .elementor-heading-title,
.nk-res-promo-title.elementor-heading-title {
    font-family: Helvetica, Arial, sans-serif !important;
    font-weight: bold !important;
}
