/* NorthSea Tools - AI card analyzer */

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

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

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

.nst-analyzer.nst-a-theme-dark {
    --nsta-ink: #f3f5f9;
    --nsta-muted: #a6aec0;
    --nsta-line: #333b4a;
    --nsta-bg: #171a21;
    --nsta-soft: #1f232c;
    --nsta-accent-soft: #241f3d;
    --nsta-bad: #ff7468;
    --nsta-bad-soft: #3a1e1b;
    --nsta-warn: #ffc46b;
    --nsta-warn-soft: #3a2e14;
}

.nst-analyzer .nst-a-title,
.nst-analyzer .nst-a-howto-title,
.nst-analyzer .nst-a-login-title,
.nst-analyzer .nst-a-drop-hint,
.nst-analyzer .nst-a-block h4,
.nst-analyzer .nst-a-obs li,
.nst-analyzer .nst-a-howto li {
    color: var(--nsta-ink);
}

.nst-analyzer .nst-a-intro,
.nst-analyzer .nst-a-drop-sub,
.nst-analyzer .nst-a-note,
.nst-analyzer .nst-a-est,
.nst-analyzer .nst-a-quota,
.nst-analyzer .nst-a-card-meta {
    color: var(--nsta-muted);
}

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

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

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

/* Login gate */

.nst-a-login {
    padding: 24px;
    border: 1px solid var(--nsta-line);
    border-radius: var(--nsta-radius);
    background: var(--nsta-accent-soft);
}

.nst-a-login-title {
    margin: 0 0 6px;
    font-size: 1.1em;
}

.nst-a-login p {
    margin: 0 0 12px;
}

.nst-a-login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

/* How-to */

.nst-a-howto {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: var(--nsta-radius);
    border-left: 3px solid var(--nsta-accent);
    background: var(--nsta-accent-soft);
}

.nst-a-howto-title {
    margin: 0 0 8px;
    font-size: 0.95em;
}

.nst-a-howto ol {
    margin: 0;
    padding-left: 20px;
}

.nst-a-howto li {
    font-size: 0.88em;
    margin-bottom: 4px;
}

.nst-a-quota {
    margin: 0 0 10px;
    font-size: 0.84em;
    font-weight: 600;
}

/* Dropzone */

.nst-a-drop {
    border: 2px dashed var(--nsta-line);
    border-radius: var(--nsta-radius);
    background: var(--nsta-soft);
    padding: 34px 22px;
    text-align: center;
    cursor: pointer;
}

.nst-a-drop.is-over {
    border-color: var(--nsta-accent);
}

.nst-a-drop-hint {
    margin: 0 0 4px;
    font-weight: 600;
}

.nst-a-drop-sub {
    margin: 0 0 14px;
    font-size: 0.86em;
}

.nst-a-file {
    display: none;
}

/* Buttons */

.nst-a-btn {
    display: inline-block;
    border: 1px solid var(--nsta-accent);
    background: var(--nsta-accent);
    color: #fff;
    border-radius: 6px;
    padding: 9px 18px;
    font: inherit;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.nst-a-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.nst-a-btn-ghost {
    background: transparent;
    border-color: var(--nsta-line);
    color: var(--nsta-ink);
}

.nst-a-btn-ghost:hover {
    border-color: var(--nsta-muted);
    color: var(--nsta-ink);
}

/* Stage */

.nst-a-canvas-wrap {
    position: relative;
    background: #10121a;
    border-radius: var(--nsta-radius);
    overflow: hidden;
}

.nst-a-canvas {
    display: block;
    width: 100%;
}

.nst-a-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.nst-a-busy {
    margin: 12px 0 0;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--nsta-accent);
}

.nst-a-error {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--nsta-bad-soft);
    color: var(--nsta-bad);
    font-size: 0.9em;
    font-weight: 600;
}

/* Result */

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

.nst-a-warn {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 4px solid var(--nsta-warn);
    background: var(--nsta-warn-soft);
    color: var(--nsta-warn);
    font-size: 0.88em;
}

.nst-a-card {
    margin-bottom: 16px;
}

.nst-a-card-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--nsta-muted);
}

.nst-a-card strong {
    display: block;
    font-size: 1.1em;
}

.nst-a-card-meta {
    display: block;
    font-size: 0.85em;
}

/* Band, the headline figure */

.nst-a-band {
    padding: 18px;
    border-radius: 8px;
    background: var(--nsta-accent-soft);
    margin-bottom: 20px;
}

.nst-a-band-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--nsta-muted);
}

.nst-a-band-range {
    display: block;
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.nst-a-band-text {
    display: block;
    font-size: 0.88em;
    margin-top: 2px;
}

.nst-a-band-point,
.nst-a-band-limit {
    display: inline-block;
    margin-top: 8px;
    margin-right: 14px;
    font-size: 0.85em;
}

.nst-a-block {
    margin-bottom: 20px;
}

.nst-a-block h4 {
    margin: 0 0 8px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.nst-a-block p {
    margin: 0 0 8px;
}

.nst-a-cent,
.nst-a-subs,
.nst-a-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nst-a-cent span,
.nst-a-subs span,
.nst-a-services span {
    flex: 1 1 130px;
    padding: 11px 13px;
    border-radius: 8px;
    background: var(--nsta-soft);
}

.nst-a-cent em,
.nst-a-subs em,
.nst-a-services em {
    display: block;
    font-style: normal;
    font-size: 0.74em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--nsta-muted);
}

.nst-a-cent b,
.nst-a-subs b,
.nst-a-services b {
    font-size: 1.15em;
    font-variant-numeric: tabular-nums;
}

.nst-a-est {
    font-size: 0.8em;
    color: var(--nsta-muted);
}

.nst-a-obs {
    margin: 0 0 8px;
    padding-left: 22px;
}

.nst-a-obs li {
    font-size: 0.9em;
    margin-bottom: 6px;
}

.nst-a-sev {
    display: inline-block;
    margin-right: 7px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.74em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #10121a;
}

.nst-a-sev-minor { background: #ffd23f; }
.nst-a-sev-moderate { background: #ff9f1c; }
.nst-a-sev-major { background: #ff3b30; color: #fff; }

.nst-a-note {
    margin: 12px 0 0;
    font-size: 0.78em;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .nst-a-band-range {
        font-size: 1.8em;
    }
}

.nst-a-region {
    font-weight: 700;
}

.nst-a-confirm {
    margin-top: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--nsta-accent);
    background: var(--nsta-accent-soft);
}

.nst-a-confirm strong {
    display: block;
    color: var(--nsta-ink);
}

.nst-a-confirm span {
    display: block;
    font-size: 0.86em;
    line-height: 1.45;
    color: var(--nsta-muted);
}

.nst-a-canvas {
    touch-action: none;
}

.nst-a-stop {
    padding: 16px 18px;
    border-radius: 8px;
    border-left: 4px solid var(--nsta-bad);
    background: var(--nsta-bad-soft);
}

.nst-a-stop strong {
    display: block;
    margin-bottom: 4px;
    color: var(--nsta-bad);
}

.nst-a-stop p {
    margin: 0;
    color: var(--nsta-ink);
    font-size: 0.9em;
}

.nst-a-stop ul,
.nst-a-warn ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 0.86em;
}

.nst-a-warn strong {
    display: block;
}

.nst-a-service-out b {
    color: var(--nsta-muted);
    font-weight: 400;
    font-size: 0.9em;
}

/* Het hidden-attribuut moet altijd winnen. Zonder deze regel overschreef
 * .nst-a-btn { display: inline-block } het attribuut en stonden knoppen die
 * verborgen hoorden te zijn gewoon in beeld. */
.nst-analyzer [hidden] {
    display: none !important;
}

.nst-a-status {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--nsta-accent-soft);
    color: var(--nsta-ink);
    font-size: 0.9em;
    font-weight: 600;
}

.nst-a-instant {
    margin-top: 14px;
}

.nst-a-instant-block {
    margin-bottom: 4px;
}

.nst-a-instant-verdict {
    margin: 10px 0 0;
    font-size: 0.92em;
    font-weight: 700;
}

.nst-a-instant-verdict.is-pass {
    color: #3ddc97;
}

.nst-a-instant-verdict.is-fail {
    color: var(--nsta-bad);
}

.nst-a-theme-light .nst-a-instant-verdict.is-pass {
    color: #11875a;
}

.nst-a-warn p {
    margin: 4px 0 0;
    font-size: 0.9em;
}


/* Voortgang over de foto heen: daar kijkt de bezoeker na het drukken. */
.nst-a-progress {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 11, 16, 0.72);
    z-index: 2;
}

.nst-a-progress-box {
    width: 100%;
    max-width: 340px;
    padding: 20px 22px;
    border-radius: 12px;
    background: #171a21;
    color: #f3f5f9;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.nst-a-spinner {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #6d4eec;
    border-radius: 50%;
    animation: nst-a-spin 0.8s linear infinite;
}

.nst-a-progress-step {
    display: block;
    font-size: 0.95em;
    line-height: 1.35;
    color: #f3f5f9;
}

.nst-a-bar {
    height: 6px;
    margin: 14px 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.nst-a-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #6d4eec;
    transition: width 0.25s linear;
}

.nst-a-progress-meta {
    display: block;
    font-size: 0.8em;
    line-height: 1.4;
    color: #a6aec0;
}

/* Spinner in de knop zelf, zodat de druk direct zichtbaar reageert. */
.nst-a-btn.is-busy {
    position: relative;
    padding-left: 40px;
    opacity: 0.85;
    cursor: progress;
}

.nst-a-btn.is-busy::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nst-a-spin 0.8s linear infinite;
}

@keyframes nst-a-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .nst-a-spinner,
    .nst-a-btn.is-busy::before {
        animation-duration: 2.4s;
    }
    .nst-a-bar span {
        transition: none;
    }
}

/* Twijfelgevallen en eerlijkheidsblok */

.nst-a-conf {
    font-size: 0.8em;
    color: var(--nsta-muted);
    white-space: nowrap;
}

.nst-a-doubt {
    margin: 4px 0 18px;
    padding: 12px 14px;
    border: 1px dashed var(--nsta-line);
    border-radius: 8px;
}

.nst-a-doubt summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    color: var(--nsta-ink);
}

.nst-a-obs-doubt li {
    color: var(--nsta-muted);
}

.nst-a-honest {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--nsta-muted);
    background: var(--nsta-soft);
}

.nst-a-honest strong {
    display: block;
    margin-bottom: 4px;
    color: var(--nsta-ink);
}

.nst-a-honest p {
    margin: 0;
    font-size: 0.86em;
    line-height: 1.5;
    color: var(--nsta-muted);
}

/* Tweede foto */

.nst-a-views {
    display: inline-flex;
    margin-bottom: 10px;
    border: 1px solid var(--nsta-line);
    border-radius: 6px;
    overflow: hidden;
}

.nst-a-view-btn {
    border: 0;
    background: var(--nsta-bg);
    color: var(--nsta-muted);
    font: inherit;
    font-size: 0.86em;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
}

.nst-a-view-btn + .nst-a-view-btn {
    border-left: 1px solid var(--nsta-line);
}

.nst-a-view-btn.is-active {
    background: var(--nsta-accent);
    color: #fff;
}

.nst-a-second {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px dashed var(--nsta-accent);
    border-radius: 10px;
    background: var(--nsta-accent-soft);
}

.nst-a-second-title {
    margin: 0 0 6px;
    font-size: 0.95em;
    color: var(--nsta-ink);
}

.nst-a-second-text {
    margin: 0 0 12px;
    font-size: 0.86em;
    line-height: 1.5;
    color: var(--nsta-muted);
}

.nst-a-second-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nst-a-second-status {
    margin: 12px 0 0;
    font-size: 0.86em;
    font-weight: 600;
    color: var(--nsta-ink);
}

.nst-a-second-status.is-ok {
    color: #3ddc97;
}

.nst-a-theme-light .nst-a-second-status.is-ok {
    color: #11875a;
}

.nst-a-second-status.is-bad {
    color: var(--nsta-bad);
}

.nst-a-second-status.is-warn {
    color: var(--nsta-warn);
}

.nst-a-verified {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(61, 220, 151, 0.15);
    color: #3ddc97;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nst-a-theme-light .nst-a-verified {
    background: #e6f6ee;
    color: #11875a;
}

/* Vergrootglas tijdens het aanpassen van de kaders */

.nst-a-loupe {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 3;
}

.nst-a-canvas:focus-visible {
    outline: 2px solid var(--nsta-accent);
    outline-offset: -2px;
}

/* Pijltjes voor verschuiven per pixel */

.nst-a-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 12px;
}

.nst-a-nudge-label {
    flex: 1 1 200px;
    font-size: 0.84em;
    font-weight: 600;
    color: var(--nsta-ink);
}

.nst-a-nudge-pad {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(2, 44px);
    gap: 4px;
}

.nst-a-nudge-btn {
    border: 1px solid var(--nsta-line);
    border-radius: 8px;
    background: var(--nsta-bg);
    color: var(--nsta-ink);
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

.nst-a-nudge-btn:active {
    background: var(--nsta-accent);
    color: #fff;
}

/* Kruisindeling: omhoog boven het midden, links/omlaag/rechts op de tweede rij */
.nst-a-nudge-btn[data-nst-a-nudge="up"] { grid-column: 2; grid-row: 1; }
.nst-a-nudge-btn[data-nst-a-nudge="left"] { grid-column: 1; grid-row: 2; }
.nst-a-nudge-btn[data-nst-a-nudge="down"] { grid-column: 2; grid-row: 2; }
.nst-a-nudge-btn[data-nst-a-nudge="right"] { grid-column: 3; grid-row: 2; }
