/* ─────────────────────────────────────────────────────────────────────────────
   Declet Palette Preview — Switcher Widget CSS v1.1
───────────────────────────────────────────────────────────────────────────── */

#dpp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Georgia', serif;
}

/* ── Toggle Pill ──────────────────────────────────────────────────────────── */

#dpp-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #715884;
    color: #fdfcf8;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 20px rgba(113,88,132,0.35);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

#dpp-toggle:hover {
    background: #4c375c;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(113,88,132,0.45);
}

/* ── Panel ────────────────────────────────────────────────────────────────── */

#dpp-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 300px;
    background: #fdfcf8;
    border: 1px solid #e3ddd9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 56px rgba(18,17,17,0.16);

    opacity: 0;
    transform: translateY(8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: bottom right;
}

#dpp-widget.dpp-open #dpp-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Tab Bar ──────────────────────────────────────────────────────────────── */

#dpp-tabs {
    display: flex;
    border-bottom: 1px solid #e3ddd9;
}

.dpp-tab {
    flex: 1;
    padding: 11px 8px;
    background: #f2efed;
    border: none;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 12px;
    color: #888;
    letter-spacing: 0.04em;
    transition: background 0.15s, color 0.15s;
}

.dpp-tab:first-child {
    border-right: 1px solid #e3ddd9;
}

.dpp-tab-active {
    background: #fdfcf8;
    color: #4c375c;
    font-weight: 600;
}

.dpp-tab:not(.dpp-tab-active):hover {
    background: #ebe6e3;
    color: #715884;
}

/* ── Shared intro text ────────────────────────────────────────────────────── */

.dpp-intro {
    margin: 0 0 12px;
    padding: 16px 16px 0;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    font-style: italic;
}

/* ── Presets Tab ──────────────────────────────────────────────────────────── */

#dpp-presets-content {
    padding-bottom: 4px;
}

#dpp-swatches {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
}

.dpp-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: #f2efed;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.dpp-swatch:hover {
    background: #ece7e4;
    transform: translateX(-2px);
}

.dpp-swatch.dpp-active {
    border-color: #715884;
    background: #f0e0f4;
}

.dpp-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.dpp-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(18,17,17,0.1);
    transition: transform 0.15s;
}

.dpp-swatch:hover .dpp-dot,
.dpp-swatch.dpp-active .dpp-dot {
    transform: scale(1.12);
}

.dpp-label {
    font-size: 13px;
    color: #121111;
    font-family: 'Georgia', serif;
}

#dpp-note {
    margin: 12px 16px 14px;
    font-size: 11px;
    color: #aaa;
    line-height: 1.5;
    font-style: italic;
}

/* ── Custom Tab ───────────────────────────────────────────────────────────── */

#dpp-custom {
    padding-bottom: 4px;
}

#dpp-fields {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d4c8e0 transparent;
}

#dpp-fields::-webkit-scrollbar {
    width: 4px;
}
#dpp-fields::-webkit-scrollbar-thumb {
    background: #d4c8e0;
    border-radius: 4px;
}

.dpp-field-row {
    display: grid;
    grid-template-columns: 32px 78px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0ebe8;
}

.dpp-field-row:last-child {
    border-bottom: none;
}

/* Native color picker — styled as a square swatch */
.dpp-color-picker {
    width: 30px;
    height: 30px;
    border: 2px solid #e3ddd9;
    border-radius: 6px;
    padding: 1px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.dpp-color-picker:hover {
    border-color: #715884;
}

/* Hex text input */
.dpp-hex-input {
    width: 100%;
    padding: 5px 8px;
    border: 1.5px solid #e3ddd9;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #121111;
    background: #fdfcf8;
    transition: border-color 0.15s;
    text-transform: uppercase;
}

.dpp-hex-input:focus {
    outline: none;
    border-color: #715884;
}

.dpp-hex-input.dpp-error {
    border-color: #c0392b;
    background: #fff5f5;
}

.dpp-field-labels {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dpp-field-label {
    font-size: 12px;
    color: #2a2030;
    font-weight: 600;
    font-family: 'Georgia', serif;
    line-height: 1.2;
}

.dpp-field-hint {
    font-size: 10px;
    color: #aaa;
    font-style: italic;
    line-height: 1.3;
}

/* Apply All button */
#dpp-apply-custom {
    display: block;
    width: calc(100% - 24px);
    margin: 12px 12px 0;
    padding: 10px;
    background: #715884;
    color: #fdfcf8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 13px;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.1s;
}

#dpp-apply-custom:hover {
    background: #4c375c;
    transform: translateY(-1px);
}

#dpp-apply-custom.dpp-applied {
    background: #4a6b4c;
}

/* Copy link section */
#dpp-copy-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 14px;
}

#dpp-copy-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 11px;
    color: #715884;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    transition: color 0.15s;
}

#dpp-copy-link:hover {
    color: #4c375c;
}

#dpp-copy-confirm {
    font-size: 11px;
    color: #4a6b4c;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.2s;
}

#dpp-copy-confirm.dpp-visible {
    opacity: 1;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    #dpp-widget {
        bottom: 16px;
        right: 16px;
    }
    #dpp-panel {
        width: calc(100vw - 32px);
        right: -8px;
    }
    #dpp-fields {
        max-height: 260px;
    }
}

/* ── Reset link (added v1.2) ─────────────────────────────────────────────── */

#dpp-reset-wrap {
    padding: 6px 16px 14px;
    text-align: center;
}

#dpp-reset {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 11px;
    color: #aaa;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    transition: color 0.15s;
}

#dpp-reset:hover {
    color: #715884;
}

#dpp-reset.dpp-reset-done {
    color: #4a6b4c;
    text-decoration: none;
}
