/* ============================================================
   CMUK Smart Tools Pro — Design Tools CSS
   Scoped to #dnstp-colour-identifier, #dnstp-colour-converter,
   #dnstp-button-generator, #dnstp-background-generator
   ============================================================ */

/* ── Shared design tool styles ── */
.dnstp-dt-label {
    font-weight: 600;
    font-size: .88rem;
    color: #374151;
    display: block;
    margin-bottom: 5px;
}

.dnstp-dt-input {
    background: #eaf3f9;
    border: none;
    border-bottom: 2px solid #d1e8f5;
    color: #4d4d4d;
    display: block;
    outline: none;
    padding: 9px 10px;
    box-sizing: border-box;
    height: 40px;
    width: 100%;
    font-size: .88rem;
    transition: border-color .2s;
    border-radius: 4px 4px 0 0;
}
.dnstp-dt-input:focus {
    border-bottom-color: #3b82f6;
    background: #e0f0fa;
}

.dnstp-dt-grid {
    display: grid;
    gap: 14px;
}
.dnstp-dt-grid-2 { grid-template-columns: 1fr 1fr; }
.dnstp-dt-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
    .dnstp-dt-grid-2, .dnstp-dt-grid-3 { grid-template-columns: 1fr; }
}

.dnstp-dt-field { display: flex; flex-direction: column; }

.dnstp-dt-preview-box {
    background: #f3f3f3;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.dnstp-dt-code-box {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.dnstp-dt-copy-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.dnstp-dt-copy-btn:hover { background: #2563eb; }
.dnstp-dt-copy-btn.copied { background: #10b981; }

.dnstp-dt-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    margin: 18px 0 10px;
}

/* ── Colour swatch preview ── */
.dnstp-colour-swatch {
    height: 70px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: background-color .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 700;
}

/* ── Colour Identifier — canvas ── */
#dnstp-ci-canvas-wrap {
    position: relative;
    background: #f3f3f3;
    border-radius: 10px;
    overflow: hidden;
    padding: 10px;
}
#dnstp-ci-canvas {
    display: block;
    max-width: 100%;
    cursor: crosshair;
}
#dnstp-ci-zoom {
    position: absolute;
    border: 1px solid #000;
    box-shadow: 3px 3px 8px rgba(0,0,0,.3);
    border-radius: 4px;
    display: none;
    pointer-events: none;
}
#dnstp-ci-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    transition: background .2s;
    margin-bottom: 16px;
}
#dnstp-ci-upload-label:hover { background: #2563eb; }
#dnstp-ci-file { display: none; }

/* ── Farbtastic colour wheel overrides ── */
.dnstp-dt-picker-wrap {
    position: relative;
    min-height: 10px;
}
.dnstp-dt-picker-wrap .farbtastic {
    display: none;
    position: absolute;
    z-index: 99;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.dnstp-dt-picker-wrap .farbtastic .wheel {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/farbtastic/1.3.1/wheel.png') !important;
}
.dnstp-dt-picker-wrap .farbtastic .overlay {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/farbtastic/1.3.1/mask.png') !important;
}
.dnstp-dt-picker-wrap .farbtastic .marker {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/farbtastic/1.3.1/marker.png') !important;
}

/* ── Button Generator preview ── */
#dnstp-bg-btn-preview-wrap {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
    border-radius: 10px;
    padding: 20px;
}

/* ── Background Generator preview ── */
#dnstp-bggen-preview {
    min-height: 160px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: background .3s;
}

/* ── Checkbox row ── */
.dnstp-dt-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: #374151;
    margin-bottom: 8px;
    cursor: pointer;
}
.dnstp-dt-check-row input[type=checkbox],
.dnstp-dt-check-row input[type=radio] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}