id: road-tunnel-casing
source: spirit-local
source-layer: roads
type: line
filter:
  - all
  - - any
    - - all # Allow certain classifications to appear when they are included in the source
      - - in
        - [get, highway]
        - - literal
          - - motorway
            - trunk
            - primary
            - secondary
            - tertiary
            - unclassified
            - residential
            - living_street
    - - all
      - [==, [get, highway], service]
      - [==, [get, minor], null]
      - [">=", [zoom], 14]
    - - all
      - [==, [get, highway], service]
      - [">=", [zoom], 15]
    - - all
      - - in
        - [get, highway]
        - - literal
          - - footway
            - cycleway
      - [">=", [zoom], 15]
  - [get, tunnel]
paint:
  line-dasharray: [.5, .5]
  line-color:
    - match
    - [get, highway]
    - motorway
    - '#e19991' # 
    - trunk
    - '#bd5c00' # lch(50,70,60)
    - primary
    - '#bd5c00' # lch(50,70,60)
    - secondary
    - '#c9952c' # lch(65,60,80)
    - tertiary
    - '#c9952c' # lch(65,60,80)
    - unclassified
    - '#b7bab4' # lch(75,3,130)
    - residential
    - '#b7bab4' # lch(75,3,130)
    - living_street
    - '#b7bab4' # lch(75,3,130)
    - service
    - '#b7bab4' # lch(75,3,130)
    - footway
    - '#696b67' # lch(75,3,130)
    - cycleway
    - '#696b67' # lch(75,3,130)
    - red
  line-width:
    - interpolate
    - - exponential
      - 1.35
    - - zoom
    - 12
    - - match
      - [get, highway]
      - motorway
      - 4
      - trunk
      - 3.5
      - primary
      - 3.5
      - secondary
      - 2
      - tertiary
      - 2
      - unclassified
      - 1.5
      - residential
      - 1.5
      - living_street
      - 1.5
      - service
      - - match
        - [to-string, [get, minor]]
        - "true"
        - 0.5
        - 1
      - footway
      - .2
      - cycleway
      - .2
      - 1.5
    - 20
    - - match
      - [get, highway]
      - motorway
      - 40
      - trunk
      - 30
      - primary
      - 30
      - secondary
      - 25
      - tertiary
      - 25
      - unclassified
      - 20
      - residential
      - 20
      - living_street
      - 20
      - service
      - - match
        - [to-string, [get, minor]]
        - "true"
        - 10
        - 14
      - footway
      - 4
      - cycleway
      - 4
      - 20
layout:
  line-cap: butt
  line-sort-key:
    - +
    - [get, z_order]
    - - '*'
      - [get, layer]
      - 1000
