/* NorthSea Tools - Grading cost calculator */

.nst-grading {
    --nstg-accent: #6d4eec;
    --nstg-ink: #14161c;
    --nstg-muted: #616a7d;
    --nstg-line: #e2e5ec;
    --nstg-bg: #ffffff;
    --nstg-soft: #f6f7fa;
    --nstg-accent-soft: #f2effe;
    --nstg-warn: #c02b1f;
    --nstg-warn-soft: #fdecea;
    --nstg-radius: 10px;

    max-width: 960px;
    margin: 0 auto;
    color: var(--nstg-ink);
    font-size: 16px;
    line-height: 1.55;
    box-sizing: border-box;
}

.nst-grading *,
.nst-grading *::before,
.nst-grading *::after {
    box-sizing: inherit;
}

.nst-grading.nst-g-theme-dark {
    --nstg-ink: #f3f5f9;
    --nstg-muted: #a6aec0;
    --nstg-line: #333b4a;
    --nstg-bg: #171a21;
    --nstg-soft: #1f232c;
    --nstg-accent-soft: #241f3d;
    --nstg-warn: #ff7468;
    --nstg-warn-soft: #3a1e1b;
}

.nst-grading .nst-g-title,
.nst-grading .nst-g-result-title,
.nst-grading .nst-g-sub,
.nst-grading .nst-g-field label,
.nst-grading .nst-g-table th,
.nst-grading .nst-g-table td {
    color: var(--nstg-ink);
}

.nst-grading .nst-g-intro,
.nst-grading .nst-g-hint,
.nst-grading .nst-g-note,
.nst-grading .nst-g-disclaimer,
.nst-grading .nst-g-updated {
    color: var(--nstg-muted);
}

.nst-g-head {
    margin-bottom: 18px;
}

.nst-g-title {
    margin: 0 0 6px;
    font-size: 1.6em;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.nst-g-intro {
    margin: 0;
}

/* Neutrale opmerking voor bezoekers */
.nst-g-notice {
    margin: 0 0 10px;
    padding: 11px 14px;
    border-radius: 6px;
    border-left: 3px solid var(--nstg-accent);
    background: var(--nstg-accent-soft);
    color: var(--nstg-ink);
    font-size: 0.86em;
    line-height: 1.5;
}

.nst-g-updated {
    margin: 0 0 18px;
    font-size: 0.8em;
}

/* Alleen zichtbaar voor ingelogde beheerders */
.nst-g-adminwarn {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 4px solid var(--nstg-warn);
    background: var(--nstg-warn-soft);
    color: var(--nstg-warn);
    font-size: 0.84em;
    font-weight: 700;
}

/* Form */

.nst-g-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--nstg-line);
    border-radius: var(--nstg-radius);
    background: var(--nstg-soft);
}

.nst-g-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nst-g-field label {
    font-size: 0.86em;
    font-weight: 700;
}

.nst-g-field select,
.nst-g-field input[type="number"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--nstg-line);
    border-radius: 6px;
    background: var(--nstg-bg);
    color: var(--nstg-ink);
    font: inherit;
    font-size: 0.92em;
}

.nst-g-field select:focus,
.nst-g-field input:focus {
    outline: 2px solid var(--nstg-accent);
    outline-offset: 1px;
}

.nst-g-hint {
    font-size: 0.76em;
    line-height: 1.4;
}

.nst-g-field-check {
    justify-content: flex-end;
}

.nst-g-field-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.nst-g-warning {
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--nstg-warn-soft);
    color: var(--nstg-warn);
    font-size: 0.88em;
    font-weight: 600;
}

/* Result */

.nst-g-result {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid var(--nstg-line);
    border-radius: var(--nstg-radius);
    background: var(--nstg-bg);
}

.nst-g-result-title {
    margin: 0 0 14px;
    font-size: 1.2em;
}

.nst-g-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.nst-g-table th,
.nst-g-table td {
    padding: 9px 4px;
    border-bottom: 1px solid var(--nstg-line);
    font-size: 0.94em;
}

.nst-g-table th {
    text-align: left;
    font-weight: 400;
}

.nst-g-table td {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.nst-g-table .nst-g-total th,
.nst-g-table .nst-g-total td {
    font-size: 1.1em;
    font-weight: 700;
    border-bottom: 2px solid var(--nstg-ink);
}

.nst-g-table .nst-g-percard th,
.nst-g-table .nst-g-percard td {
    border-bottom: 0;
}

.nst-g-table .nst-g-percard td {
    color: var(--nstg-accent);
    font-size: 1.05em;
    font-weight: 700;
}

.nst-g-verdict {
    margin-top: 20px;
    padding: 15px 17px;
    border-radius: 8px;
    background: var(--nstg-accent-soft);
}

.nst-g-sub {
    margin: 0 0 5px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.nst-g-verdict p {
    margin: 0;
    font-size: 0.95em;
    font-weight: 600;
}

.nst-g-note,
.nst-g-disclaimer {
    margin: 14px 0 0;
    font-size: 0.78em;
}

@media (max-width: 600px) {
    .nst-g-form {
        grid-template-columns: 1fr;
        padding: 16px;
    }
}

/* Modusschakelaar */

.nst-g-modes {
    display: inline-flex;
    margin-bottom: 14px;
    border: 1px solid var(--nstg-line);
    border-radius: 6px;
    overflow: hidden;
}

.nst-g-mode-btn {
    border: 0;
    background: var(--nstg-bg);
    color: var(--nstg-muted);
    font: inherit;
    font-size: 0.86em;
    font-weight: 600;
    padding: 9px 16px;
    cursor: pointer;
    line-height: 1.2;
}

.nst-g-mode-btn + .nst-g-mode-btn {
    border-left: 1px solid var(--nstg-line);
}

.nst-g-mode-btn.is-active {
    background: var(--nstg-accent);
    color: #fff;
}

/* Rijentabel */

.nst-g-rows {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--nstg-line);
    border-radius: var(--nstg-radius);
    background: var(--nstg-soft);
}

.nst-g-rows-hint {
    margin: 0 0 12px;
    font-size: 0.82em;
    color: var(--nstg-muted);
}

.nst-g-rows-table {
    width: 100%;
    border-collapse: collapse;
}

.nst-g-rows-table th {
    text-align: left;
    padding: 0 6px 6px 0;
    font-size: 0.76em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nstg-muted);
}

.nst-g-rows-table td {
    padding: 3px 6px 3px 0;
}

.nst-g-rows-table td:last-child,
.nst-g-rows-table th:last-child {
    width: 34px;
    padding-right: 0;
}

.nst-g-rows-table input {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid var(--nstg-line);
    border-radius: 5px;
    background: var(--nstg-bg);
    color: var(--nstg-ink);
    font: inherit;
    font-size: 0.9em;
}

.nst-g-delrow {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--nstg-line);
    border-radius: 5px;
    background: transparent;
    color: var(--nstg-muted);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}

.nst-g-delrow:hover {
    border-color: var(--nstg-warn);
    color: var(--nstg-warn);
}

.nst-g-rows-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.nst-g-addrow {
    border: 1px dashed var(--nstg-line);
    background: transparent;
    color: var(--nstg-ink);
    border-radius: 6px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.86em;
    font-weight: 600;
    cursor: pointer;
}

.nst-g-addrow:hover {
    border-color: var(--nstg-accent);
    border-style: solid;
}

.nst-g-rows-total {
    font-size: 0.86em;
    font-weight: 700;
    color: var(--nstg-ink);
}

.nst-g-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .nst-g-rows-table th {
        font-size: 0.68em;
    }

    .nst-g-rows-table input {
        font-size: 0.82em;
        padding: 6px 7px;
    }
}
