/* ===========================================================
   SilentSnipe — popup.css
   Dark dashboard theme. Narrow = stacked popup, wide = 2-col tab.
   All original element IDs / classes kept so popup.bundle.js
   keeps working untouched.
   =========================================================== */

:root {
    --bg: #0a0e17;
    --bg-raised: #11161f;
    --bg-card: #131927;
    --bg-card-hover: #161d2c;
    --border: #1f2a3a;
    --border-soft: #1a2330;
    --accent: #2196f3;
    --accent-strong: #1576d6;
    --accent-soft: rgba(33, 150, 243, 0.12);
    --text: #f3f6fb;
    --text-dim: #93a1b6;
    --text-faint: #5d6b80;
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --success-border: rgba(52, 211, 153, 0.35);
    --danger: #f87171;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 360px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.4;
}

body {
    position: relative;
}

a {
    color: var(--accent);
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

h2 {
    font-size: 16px;
    color: var(--accent);
    letter-spacing: 0.2px;
}

h3 {
    font-size: 13px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

p {
    color: var(--text-dim);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 9px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    width: 100%;
    resize: vertical;
}

/* ---------- Page shell ---------- */

#app-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 760px) {
    #app-shell {
        display: grid;
        grid-template-columns: 320px 1fr;
        align-items: start;
        padding: 24px;
        gap: 24px;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.sidebar,
.main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Brand header ---------- */

#header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 2px 8px;
}

#logo {
    max-width: 36px;
    max-height: 36px;
    width: auto;
    height: auto;
}

#header .brand-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

#header .brand-name .accent {
    color: var(--accent);
}

/* ---------- Status / login ---------- */

#status_container {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#status_text {
    font-weight: 700;
    font-size: 13px;
}

#user_info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#email_text {
    color: var(--text-dim);
    font-size: 12px;
}

#user_details {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#logout_icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
    background: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}

#logout_icon svg {
    width: 14px;
    height: 14px;
}

#login_status {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

#login_container {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    z-index: 1001;
    width: min(320px, 90vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#login_container h2 {
    margin-bottom: 14px;
}

#login_container label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
    margin-top: 10px;
}

#login_container input[type="text"],
#login_container input[type="password"] {
    width: 100%;
}

#login_button {
    margin-top: 16px;
    width: 100%;
}

/* ---------- Credits card ---------- */

.credits-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 4px;
}

.credits-card .coin-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: #f5b942;
}

#subscription_text {
    font-size: 11px;
    color: var(--text-faint);
}

#credits_text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

/* ---------- Buttons (generic) ---------- */

button {
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    background: var(--accent);
    padding: 8px 14px;
    transition: background-color 0.15s ease;
}

button:hover {
    background: var(--accent-strong);
}

button:disabled {
    background: var(--border);
    color: var(--text-faint);
    cursor: not-allowed;
}

/* ---------- User Features panel ---------- */

#user_features_containers {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.save_features {
    display: flex;
    align-items: center;
    gap: 8px;
}

.save_features input[type="text"] {
    flex-grow: 1;
}

.save_features button {
    flex-shrink: 0;
}

.watermark-container {
    display: flex;
    justify-content: center;
}

.watermark {
    position: relative;
    display: inline-block;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.watermark img {
    display: block;
    width: 180px;
    height: 180px;
    object-fit: cover;
    background: var(--bg-raised);
}

.watermark .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

.price-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price-container label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
}

.price-container input {
    flex: 1;
    max-width: 130px;
    text-align: right;
    background: var(--bg-raised);
    box-shadow: none;
}

.price-container input:focus {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 0;
}

.toggle-row span,
.toggle-row label:not(.switch) {
    font-size: 13px;
    color: var(--text-dim);
}

.toggle-row select {
    min-width: 90px;
}

/* ---------- Toggle switches ---------- */

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 21px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a3344;
    transition: 0.2s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    left: 3px;
    bottom: 3px;
    background-color: #f3f6fb;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:focus+.slider {
    box-shadow: 0 0 0 2px var(--accent-soft);
}

input:checked+.slider:before {
    transform: translateX(17px);
}

/* ---------- Vero brand fetch bar ---------- */

#veroBrandContainer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tasteful-button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.tasteful-button:hover {
    background: var(--accent-strong);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
}

.status:empty {
    display: none;
}

.status strong {
    color: var(--success);
}

.loader-container {
    width: 22px;
    height: 22px;
}

.loader {
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
}

.icon.success {
    color: var(--success);
    font-size: 18px;
}

.icon.fail {
    color: var(--danger);
    font-size: 18px;
}

.counter {
    font-weight: 700;
    color: var(--text);
    margin-left: auto;
    text-align: right;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---------- Feature row list (Ultimate Features etc.) ---------- */

#ultimate-buttons,
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

#ultimate-buttons button,
.feature-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#ultimate-buttons button:hover,
.feature-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.feature-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.feature-label {
    flex: 1;
}

.feature-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    flex-shrink: 0;
}

/* ---------- Dev tools ---------- */

#dev_tools button {
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 7px 12px;
}

/* ---------- Bulk lister ---------- */

#bulk-list h2 {
    font-size: 16px;
    margin-bottom: 4px;
}

#bulk-list p {
    font-size: 12px;
    margin-bottom: 8px;
}

#amazon-links {
    width: 100%;
    height: 90px;
    margin-bottom: 8px;
}

#list-btn {
    background: var(--success);
    color: #06241a;
    font-weight: 700;
}

#list-btn:hover {
    background: #28b386;
}

#pause_resume_buttons {
    margin-top: 8px;
}

#position-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-dim);
}

#position-label {
    margin-right: 0;
}

#position-value {
    font-weight: 700;
    color: var(--text);
}

#position-input {
    width: 70px;
}

#amazon-search-position-container {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-dim);
}

/* ---------- Settings groups ---------- */

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-group+.settings-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.field-row label {
    font-size: 13px;
    color: var(--text-dim);
}

.field-row input[type="number"],
.field-row input[type="text"],
.field-row select {
    max-width: 140px;
}

#agent_name_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#agent_name_container input[type="text"] {
    width: 100%;
    max-width: 180px;
}

#virtual_clipboard_container .form-group {
    margin-bottom: 10px;
}

#virtual_clipboard_container label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

#virtual_clipboard_container textarea.textarea {
    width: 100%;
    min-height: 50px;
}

#image_template_container_options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#duplicate-skus-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#api_key_container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

#api_key_display {
    color: var(--text-dim);
    font-size: 12px;
}