/* Perspective grid generator page styles. Theme tokens only; the only literal color is the
   user-picked line color, which lives on the <input type="color"> and is applied to the
   canvas by the controller. */

.perspective-grid .tool-title {
    margin-bottom: 0.25rem;
}

.perspective-grid .tool-intro {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* --- Layout: controls beside the canvas -------------------------------- */

.pg-layout {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 760px) {
    .pg-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Controls ---------------------------------------------------------- */

.pg-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.pg-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pg-field--row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pg-label {
    font-size: 0.85rem;
    color: var(--muted);
}

.pg-sublabel {
    font-size: 0.8rem;
    color: var(--muted);
}

.pg-val {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pg-range {
    width: 100%;
    accent-color: var(--accent);
}

.pg-num {
    width: 100%;
}

.pg-select {
    width: 100%;
}

.pg-custom {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-top: 0.5rem;
}

.pg-color {
    width: 2.75rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.pg-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

.pg-check input {
    accent-color: var(--accent);
}

.pg-dir {
    margin-top: 0.5rem;
}

.pg-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.pg-actions .btn,
.pg-actions .btn-outline {
    flex: 1;
}

/* --- Canvas ------------------------------------------------------------ */

.pg-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.pg-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    /* A subtle checker hint is not needed; transparent exports still read fine over surface. */
    background: var(--surface);
}
