
/* NUJIZ PALETTE CONTRAST V2 */

/* Main action */
body[data-tool-id="palette"] #processButton,
body[data-tool-id="palette"] #processButton *,
body[data-tool-id="palette"] .process-btn,
body[data-tool-id="palette"] .process-btn * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 800 !important;
}

/* Download buttons: dark text on bright backgrounds */
body[data-tool-id="palette"] #downloadButton,
body[data-tool-id="palette"] #downloadButton *,
body[data-tool-id="palette"] .download-btn,
body[data-tool-id="palette"] .download-btn * {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

/* Copy button: readable even before results exist */
body[data-tool-id="palette"] .action-stack button:disabled,
body[data-tool-id="palette"] .action-stack button:disabled *,
body[data-tool-id="palette"] .control-list button:disabled,
body[data-tool-id="palette"] .control-list button:disabled * {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    background-color: #e2e8f0;
    opacity: 1 !important;
    text-shadow: none !important;
    cursor: not-allowed;
}

/* Text and guidance */
body[data-tool-id="palette"] .control-list p,
body[data-tool-id="palette"] .control-list small,
body[data-tool-id="palette"] .control-list label,
body[data-tool-id="palette"] .control-list span,
body[data-tool-id="palette"] .privacy-line {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
}

/* Current file and statistics */
body[data-tool-id="palette"] #fileName,
body[data-tool-id="palette"] .image-stats strong,
body[data-tool-id="palette"] .image-stats span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Avoid faded labels */
body[data-tool-id="palette"] .controls-panel {
    opacity: 1 !important;
}


/* NUJIZ PALETTE BUTTON CONTRAST FINAL */

/* Download: lime background with dark text */
body[data-tool-id="palette"] #downloadPalettePng {
    background: #b9ff39 !important;
    border: 1px solid #d5ff8c !important;
    color: #142018 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #142018 !important;
}

/* Copy: white background with dark text */
body[data-tool-id="palette"] #copyAllPaletteColors {
    background: #ffffff !important;
    border: 1px solid #d5d9e5 !important;
    color: #172033 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #172033 !important;
}

/* Include icons and nested labels */
body[data-tool-id="palette"] #downloadPalettePng *,
body[data-tool-id="palette"] #copyAllPaletteColors * {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
}

/* Keep disabled controls visibly distinguishable */
body[data-tool-id="palette"] #downloadPalettePng:disabled,
body[data-tool-id="palette"] #copyAllPaletteColors:disabled {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

/* Hover */
body[data-tool-id="palette"] #downloadPalettePng:not(:disabled):hover {
    background: #d0ff76 !important;
}

body[data-tool-id="palette"] #copyAllPaletteColors:not(:disabled):hover {
    background: #e9edf5 !important;
}


/* NUJIZ PALETTE DARK UI V3 */

body[data-tool-id="palette"] .smart-result,
body[data-tool-id="palette"] .smart-result.visible {
    background: #151c2b !important;
    border: 1px solid #34415b !important;
    border-radius: 14px !important;
    padding: 16px !important;
    color: #f8fafc !important;
}

body[data-tool-id="palette"] .palette-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body[data-tool-id="palette"] .palette-colour {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 56px !important;
    padding: 10px 12px !important;
    background: #222c40 !important;
    border: 1px solid #41506a !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    cursor: pointer !important;
    transition: background .2s, border-color .2s, transform .2s;
}

body[data-tool-id="palette"] .palette-colour:hover {
    background: #303d57 !important;
    border-color: #a78bfa !important;
    transform: translateY(-2px);
}

body[data-tool-id="palette"] .palette-colour i {
    display: block !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,.5) !important;
}

body[data-tool-id="palette"] .palette-colour b {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    letter-spacing: .4px !important;
}

body[data-tool-id="palette"] .result-hint {
    display: block !important;
    margin-top: 12px !important;
    color: #cbd5e1 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
}

@media (max-width: 480px) {
    body[data-tool-id="palette"] .palette-grid {
        grid-template-columns: 1fr !important;
    }
}
