/* =============================================================================
   SitePilot demo template — design panel chrome

   This file styles the panel itself and uses NO theme token. That is
   deliberate: the panel has to stay legible while the client is halfway
   through picking an unreadable colour scheme. If it drew its own background
   from --surface, a client who set the page black would lose the controls that
   let them set it back.

   Everything here is prefixed .dp- so it cannot collide with the site.
   ========================================================================== */

.dp-launch {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 17px;
    border: 0;
    border-radius: 999px;
    background: #16181d;
    color: #fff;
    font: 500 .88rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
    cursor: pointer;
}
.dp-launch:hover { background: #24272e; }
.dp-launch .dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    /* The one place the panel does read a token — the swatch has to show the
       current brand colour or it is not telling you anything. */
    background: var(--brand);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
}
.dp-open .dp-launch { display: none; }

.dp-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 358px;
    max-width: 100vw;
    z-index: 9001;
    background: #16181d;
    color: #e8eaed;
    font: 400 .88rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}
.dp-open .dp-panel { transform: none; }

/* prefers-reduced-motion is honoured for the site's animations; the panel's own
   slide is chrome, and a user who asked for less motion gets it instantly. */
@media (prefers-reduced-motion: reduce) {
    .dp-panel { transition: none; }
}

.dp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 16px;
    border-bottom: 1px solid #2a2e36;
    flex: none;
}
/* Written out longhand, not as the `font` shorthand: `font: 600 .95rem/1.2
   inherit` is invalid — `inherit` is not a legal family inside the shorthand —
   so the whole declaration is dropped and the site's serif heading rule wins.
   Which is exactly what it did, until it was caught in the browser. */
.dp-head h2 { margin: 0; font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; color: #fff; }
.dp-head p { margin: 2px 0 0; font-size: .76rem; color: #98a0ad; }
.dp-close {
    background: none; border: 0; color: #98a0ad;
    font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0 2px;
}
.dp-close:hover { color: #fff; }

.dp-body { overflow-y: auto; padding: 4px 16px 20px; flex: 1; }

.dp-group { border-top: 1px solid #2a2e36; padding: 15px 0 4px; }
.dp-group:first-child { border-top: 0; }
.dp-group > h3 {
    margin: 0 0 11px;
    font-family: inherit;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #8b93a1;
}

/* --- presets ------------------------------------------------------------- */

.dp-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dp-preset {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 9px;
    border: 1px solid #2a2e36;
    border-radius: 7px;
    background: #1c1f26;
    color: #d5d9e0;
    font: inherit; font-size: .8rem;
    cursor: pointer;
    text-align: left;
}
.dp-preset:hover { border-color: #454b57; }
.dp-preset[aria-pressed="true"] { border-color: #7aa2ff; background: #1f2533; color: #fff; }
.dp-chips { display: flex; flex: none; }
.dp-chips i {
    width: 11px; height: 18px;
    display: block;
    border: 1px solid rgba(255, 255, 255, .18);
    border-right: 0;
}
.dp-chips i:last-child { border-right: 1px solid rgba(255, 255, 255, .18); border-radius: 0 3px 3px 0; }
.dp-chips i:first-child { border-radius: 3px 0 0 3px; }

/* --- colour rows --------------------------------------------------------- */

.dp-color {
    display: grid;
    grid-template-columns: 1fr 66px 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.dp-color label { font-size: .82rem; color: #c6ccd6; }
.dp-color label small { display: block; font-size: .68rem; color: #79818e; }
.dp-color input[type="text"] {
    font: 400 .76rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: uppercase;
    padding: 7px 6px;
    border: 1px solid #2a2e36;
    border-radius: 5px;
    background: #1c1f26;
    color: #e8eaed;
    width: 100%;
}
.dp-color input[type="text"]:focus { outline: none; border-color: #7aa2ff; }
.dp-color input[type="text"].bad { border-color: #e06060; }
/* The native swatch is the picker; stripping its chrome makes it read as a
   colour tile rather than a form control. */
.dp-color input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 34px; height: 30px;
    padding: 0;
    border: 1px solid #3a3f49;
    border-radius: 5px;
    background: none;
    cursor: pointer;
}
.dp-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.dp-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.dp-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 3px; }

/* --- selects and sliders ------------------------------------------------- */

.dp-field { margin-bottom: 11px; }
.dp-field > label { display: block; font-size: .82rem; color: #c6ccd6; margin-bottom: 5px; }
.dp-field select {
    font: inherit; font-size: .82rem;
    width: 100%;
    padding: 8px 9px;
    border: 1px solid #2a2e36;
    border-radius: 6px;
    background: #1c1f26;
    color: #e8eaed;
}
.dp-field select:focus { outline: none; border-color: #7aa2ff; }
.dp-field input[type="range"] { width: 100%; accent-color: #7aa2ff; }
.dp-field .val { float: right; font-size: .76rem; color: #8b93a1; font-variant-numeric: tabular-nums; }

.dp-switch { display: flex; align-items: center; gap: 9px; font-size: .82rem; color: #c6ccd6; margin-bottom: 11px; }
.dp-switch input { accent-color: #7aa2ff; width: 15px; height: 15px; }

/* --- actions ------------------------------------------------------------- */

.dp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dp-btn {
    font: inherit; font-size: .8rem;
    padding: 9px 13px;
    border: 1px solid #2a2e36;
    border-radius: 6px;
    background: #1c1f26;
    color: #e8eaed;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.dp-btn:hover { border-color: #454b57; background: #232732; }
.dp-btn.primary { background: #3b5bdb; border-color: #3b5bdb; color: #fff; }
.dp-btn.primary:hover { background: #4c6ae8; }

.dp-note { font-size: .74rem; color: #79818e; margin: 10px 0 0; }

/* --- export dialog ------------------------------------------------------- */

.dp-export { display: none; }
.dp-export[open] { display: block; }
.dp-export {
    position: fixed;
    inset: 0;
    z-index: 9002;
    background: rgba(8, 10, 14, .62);
    padding: 6vh 16px;
    overflow-y: auto;
}
.dp-export-inner {
    max-width: 620px;
    margin: 0 auto;
    background: #16181d;
    border: 1px solid #2a2e36;
    border-radius: 10px;
    padding: 20px;
    color: #e8eaed;
    font: 400 .88rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.dp-export-inner h3 { margin: 0 0 4px; font-family: inherit; font-size: 1rem; font-weight: 600; color: #fff; }
.dp-export-inner p { margin: 0 0 12px; font-size: .8rem; color: #98a0ad; }
.dp-export textarea {
    width: 100%;
    min-height: 300px;
    font: 400 .78rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding: 12px;
    border: 1px solid #2a2e36;
    border-radius: 7px;
    background: #0f1115;
    color: #d5d9e0;
    resize: vertical;
}

@media (max-width: 420px) {
    .dp-panel { width: 100vw; }
}
