/**
 * TikTok Brand Identity Variables
 */
:root {
    --pxsync-bg: #121212;        /* Deep black background */
    --pxsync-card: #1f1f1f;      /* Dark gray for content cards */
    --pxsync-cyan: #25F4EE;      /* TikTok's signature cyan accent */
    --pxsync-pink: #FE2C55;      /* TikTok's signature pink/red accent */
    --pxsync-text: #ffffff;      /* Pure white text */
    --pxsync-dim: #888888;       /* Muted text for help hints */
    --pxsync-border: #333333;    /* Subtle borders for cards */
    --pxsync-orange: #ff9800;    /* Warning color for Test mode */
}

/* Scoped container */
#pxsync-bridge-settings {
    background-color: var(--pxsync-bg);
    color: var(--pxsync-text);
    padding: 30px;
    border-radius: 12px;
    margin: 20px;
    font-family: 'Inter', -apple-system, sans-serif;
    max-width: 1000px;
}

#pxsync-bridge-settings h1, #pxsync-bridge-settings h3 {
    color: var(--pxsync-text);
    margin-top: 0;
}

/* Cards */
.pxsync-card {
    background: var(--pxsync-card);
    border: 1px solid var(--pxsync-border);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* Form Elements */
.pxsync-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.pxsync-input {
    width: 100%;
    background: #111 !important;
    color: #fff !important;
    border: 1px solid var(--pxsync-border) !important;
    padding: 12px !important;
    border-radius: 6px;
    font-family: monospace;
}

.pxsync-help {
    color: var(--pxsync-dim);
    font-size: 12px;
    margin-top: 8px;
}


/* Normal state for the test field when no code is entered */
.pxsync-field-standard {
    padding: 0;
    border: none;
    background: transparent;
}

/* Ensure the warning box only appears when the class is present */
.pxsync-test-warning-box {
    background: rgba(255, 152, 0, 0.05);
    border: 1px dashed var(--pxsync-orange);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Buttons */
.pxsync-btn-save {
    background: transparent !important;
    border: 1px solid var(--pxsync-pink) !important;
    color: var(--pxsync-pink) !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.pxsync-btn-save:hover {
    background: var(--pxsync-pink) !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.3);
}

/* Never forget comments: Styles for the Regenerate Feed button */
#pxsync-regenerate-feed-btn {
    background: var(--pxsync-cyan) !important;
    color: #000 !important;
    border: none !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: transform 0.1s;
}

#pxsync-regenerate-feed-btn:active {
    transform: scale(0.95);
}

#pxsync-feed-spinner {
    color: var(--pxsync-cyan);
    font-size: 12px;
    font-weight: bold;
}

/* Test Code Warning Box */
.pxsync-test-warning-box {
    background: rgba(255, 152, 0, 0.05);
    border: 1px dashed var(--pxsync-orange);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.pxsync-test-warning-box .pxsync-label {
    color: var(--pxsync-orange);
}

/* Toggle Switch Styles */
.pxsync-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.pxsync-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

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

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

.pxsync-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .pxsync-slider { background-color: #25d366; }
input:checked + .pxsync-slider:before { transform: translateX(22px); }

/* Diagnostic Log Table Scrollbar */
#pxsync-live-log-container::-webkit-scrollbar {
    width: 6px;
}
#pxsync-live-log-container::-webkit-scrollbar-thumb {
    background: var(--pxsync-border);
    border-radius: 10px;
}
#pxsync-live-log-container::-webkit-scrollbar-thumb:hover {
    background: var(--pxsync-cyan);
}