/* ============================================================
   SilentSniper — Duplicate Checker
   Navy / teal control-panel theme (shared system across SilentSniper pages)
   ============================================================ */

:root {
    /* Surfaces */
    --navy-950: #070b14;
    --navy-900: #0b1322;
    --navy-800: #111c30;
    --navy-700: #18253c;
    --navy-600: #213452;

    /* Lines */
    --line: #243551;
    --line-subtle: #1c2940;
    --line-strong: #2c3e5e;

    /* Accent */
    --teal-300: #7fe9da;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-glow: rgba(45, 212, 191, 0.18);

    /* Status colors */
    --success-400: #34d399;
    --success-500: #10b981;
    --danger-400: #fb7185;
    --danger-500: #e11d48;
    --info-400: #60a5fa;
    --info-500: #3b82f6;

    /* Text */
    --ink-100: #eaf2fb;
    --ink-300: #c2d0e4;
    --ink-400: #91a3bd;
    --ink-600: #5a6b85;

    /* Type */
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 7px;

    --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--ink-100);
    margin: 0;
    padding: 0;
    background:
        radial-gradient(900px 420px at 50% -160px, rgba(45, 212, 191, 0.10), transparent 60%),
        var(--navy-950);
    min-height: 100vh;
}

.ss-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ss-brand-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: -8px;
    color: var(--ink-400);
}

.ss-brand__mark {
    width: 16px;
    height: 16px;
    color: var(--teal-400);
}

.ss-brand__name {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--ink-100);
    text-align: center;
    margin: 0;
}

.ss-section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink-300);
    margin: 12px 0 -4px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ss-shell h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink-300);
    margin: 14px 0 8px;
}

.ss-shell label {
    color: var(--ink-300);
    font-size: 0.86rem;
    display: block;
    margin-bottom: 6px;
}

.ss-shell p {
    color: var(--ink-400);
    margin: 0 0 8px;
}

.panel {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}

.panel__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin: 0 0 16px;
    font-weight: 500;
}

/* ============================================================
   Fetch SKUs panel
   ============================================================ */

#fetch-skus-container>div:first-of-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 16px;
}

#fetch-skus-container>div[style*="row"] {
    gap: 24px;
    margin-bottom: 16px;
}

#sku_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

#skus {
    width: 100%;
}

/* ============================================================
   Import & duplicates panel
   ============================================================ */

#add-skus-container #add-skus {
    width: 100%;
    margin-bottom: 10px;
}

#duplicate-skus-container {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

#duplicate-skus-container textarea {
    width: 100%;
}

#duplicate-skus-container p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-300);
    margin: 10px 0;
}

/* ============================================================
   Advanced users — convert tools
   ============================================================ */

.convert-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
}

.convert-container:not(:last-child) {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line-subtle);
}

.convert-container label {
    flex-basis: 100%;
}

.convert-container textarea {
    flex: 1 1 280px;
    min-width: 220px;
}

.convert-container button {
    flex: 0 0 auto;
    align-self: center;
}

/* ============================================================
   Form controls — scoped to .ss-shell
   ============================================================ */

.ss-shell input[type="number"],
.ss-shell select,
.ss-shell textarea {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--ink-100);
    background: var(--navy-700);
    border: 1px solid var(--line-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.ss-shell select {
    font-family: var(--font-body);
}

.ss-shell input[type="number"] {
    width: 90px;
}

.ss-shell textarea::placeholder {
    color: var(--ink-600);
    font-family: var(--font-body);
}

.ss-shell input:focus-visible,
.ss-shell select:focus-visible,
.ss-shell textarea:focus-visible {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px var(--teal-glow);
}

/* ============================================================
   Buttons
   ============================================================ */

.ss-shell button {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-300);
    background: var(--navy-700);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.ss-shell button:hover {
    background: var(--navy-600);
    color: var(--ink-100);
}

.ss-shell button:active {
    transform: translateY(1px);
}

.fetchButtons {
    background: var(--teal-500);
    border-color: var(--teal-500);
    color: var(--navy-950);
}

.fetchButtons:hover {
    background: var(--teal-400);
    border-color: var(--teal-400);
}

#clear-skus,
#remove-duplicates {
    background: transparent;
    border-color: rgba(225, 29, 72, 0.4);
    color: var(--danger-400);
}

#clear-skus:hover,
#remove-duplicates:hover {
    background: rgba(225, 29, 72, 0.1);
    border-color: var(--danger-500);
}

#import-skus,
#open-duplicate-skus-10 {
    background: var(--info-500);
    border-color: var(--info-500);
    color: var(--navy-950);
}

#import-skus:hover,
#open-duplicate-skus-10:hover {
    background: var(--info-400);
    border-color: var(--info-400);
}

.convert-container button {
    background: var(--success-500);
    border-color: var(--success-500);
    color: var(--navy-950);
}

.convert-container button:hover {
    background: var(--success-400);
    border-color: var(--success-400);
}

/* Copy-state toggle on #save-skus (classList swaps these two) */
.un-copied {
    color: var(--navy-950);
    background-color: var(--teal-500);
    border-color: var(--teal-500);
}

.un-copied:hover {
    background-color: var(--teal-400);
    border-color: var(--teal-400);
}

.copied {
    color: var(--navy-950);
    background-color: var(--success-500);
    border-color: var(--success-500);
}

.copied:hover {
    background-color: var(--success-400);
    border-color: var(--success-400);
}

/* ============================================================
   Toast — built and appended directly to <body> by the bundle,
   so this stays unscoped (outside .ss-shell) deliberately.
   ============================================================ */

.animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    color: var(--ink-100);
    border: 1px solid var(--line);
    padding: 18px 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel), 0 16px 40px rgba(0, 0, 0, 0.5);
    animation: fadeOut 3s ease-in-out;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 9999;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .ss-shell {
        padding: 28px 16px 48px;
    }

    .panel {
        padding: 18px;
    }

    .convert-container button {
        align-self: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}