/* ~~~~ CONTENT OF BASEMAP ~~~~~

1.Z-INDEX of BASEMAP
2.LAND
3.BOUNDARY
  3.1 Countries
  3.2 Region
  3.3 Military
4.VEGETATION
5.BEACH, GLACIER, DESERT, etc.
6.WATER
  6.1 Area water(lake,pond etc.)
  6.2 Line water(river,canal etc.)
7.LANDUSE
  7.1 Industrial
  7.2 Hospital
  7.3 University & Sport
  7.4 Cemetery
  7.5 Pedestrian areas
  7.6 Airports
  7.7 Religion
  7.8 Agricultural
8.BUILDINGS
  8.1 Pier, dam, cutline
  8.2 Building
  8.3 Barriers, cliffs
9.ISOLINES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

area|z0-7[organicapp=mwm_border]
{fill-color: #7D8BE6; fill-opacity: 0.5;}

/* 2.LAND */

area|z0-[natural=coastline],
area|z0-[natural=land],
area|z10-[place=islet]
{fill-opacity: 1;}

area|z0-[natural=coastline]
{fill-color: @water;}

area|z0-[natural=land],
area|z10-[place=islet]
{fill-color: @background;}

/* 3.BOUNDARIES */

line|z2-[boundary=administrative]
{color: @border_country;opacity: 0.7;}

line|z4[boundary=administrative][admin_level=3],
line|z5-[boundary=administrative][admin_level=4]
{color: @border_region;opacity: 0.7;}

/* 3.1 Country */

line|z2[boundary=administrative][admin_level=2]
{width: 0.5;opacity: 0.5;}
line|z3[boundary=administrative][admin_level=2]
{width: 0.5;opacity: 0.6;}
line|z4[boundary=administrative][admin_level=2]
{width: 0.6;}
line|z5[boundary=administrative][admin_level=2]
{width: 0.8;}
line|z6[boundary=administrative][admin_level=2]
{width: 0.85;}
line|z7[boundary=administrative][admin_level=2]
{width: 1;}
line|z8[boundary=administrative][admin_level=2]
{width: 1.1;}
line|z9-[boundary=administrative][admin_level=2]
{width: 1.4;}

/* 3.2 Region */

line|z4[boundary=administrative][admin_level=3]
{width: 0.8; dashes: 0.9,0.4;}

line|z5[boundary=administrative][admin_level=4]
{width: 0.7; opacity: 0.8; dashes: 1.3,0.9;}
line|z6[boundary=administrative][admin_level=4]
{width: 0.8; dashes: 1.3,0.9;}
line|z7-[boundary=administrative][admin_level=4]
{width: 0.9; dashes: 1.8,0.9;}
line|z9[boundary=administrative][admin_level=4]
{width: 1;}
line|z10-[boundary=administrative][admin_level=4]
{width: 1.2;}


/* 4.VEGETATION */

area|z10-[landuse=forest],
area|z10-[leisure=park],
area|z12-[leisure=garden],
area|z12-[landuse=plant_nursery],
area|z12-[landuse=grass],
area|z12-[natural=grassland],
area|z12-[leisure=golf_course],
area|z12-[natural=heath],
area|z12-[landuse=allotments],
area|z12-[natural=bare_rock],
area|z12-[natural=shingle],
area|z11-[natural=scree],
area|z12-[landuse=orchard],
area|z12-[landuse=vineyard],
area|z12-[landuse=meadow],
area|z12-[landuse=recreation_ground],
area|z12-[landuse=village_green],
area|z12-[landuse=field],
area|z12-[natural=scrub],
area|z14-[leisure=miniature_golf],
area|z16-[landuse=flowerbed],
{fill-opacity: 1;}

area|z10-12[leisure=park],
{fill-color: @green0;}
area|z13-15[leisure=park],
{fill-color: @green1;}
area|z16-[leisure=park],
{fill-color: @green2;}
area|z16-[landuse=flowerbed],
{fill-color: @flowers;}

area|z14-15[landuse=grass],
{fill-color: @green0;}
area|z16-[landuse=grass],
area|z14-15[natural=grassland],
area|z14-[leisure=golf_course],
area|z14-[leisure=miniature_golf],
area|z14-[natural=heath],
area|z14-[landuse=allotments],
area|z14-[landuse=orchard],
area|z14-[landuse=plant_nursery],
area|z14-[landuse=vineyard],
area|z14-[landuse=recreation_ground],
area|z14-[landuse=village_green],
area|z14-[landuse=field],
{fill-color: @green1;}
area|z16-[natural=grassland],
{fill-color: @green1b;}
area|z12[leisure=garden],
{fill-color: @green2;}
area|z13[leisure=garden],
{fill-color: @green3;}
area|z14[leisure=garden],
{fill-color: @green4;}
area|z15[leisure=garden],
{fill-color: @green5;}
area|z16-[leisure=garden],
{fill-color: @forest;}

area|z10-[landuse=forest],
{fill-color: @green5;}

area|z12-[leisure=garden][garden:type=residential],
{fill-color: @green0;}
area|z16-[leisure=garden][garden:type=residential],
{fill-color: @green1;}
area|z17-[leisure=garden][garden:type=residential],
{fill-color: @green2;}

area|z12-13[landuse=grass],
area|z12-13[natural=grassland],
area|z12-13[leisure=golf_course],
area|z12-13[natural=heath],
area|z12-13[landuse=allotments],
area|z12-13[landuse=orchard],
area|z12-13[landuse=plant_nursery],
area|z12-13[landuse=vineyard],
area|z12-13[landuse=recreation_ground],
area|z12-13[landuse=village_green],
area|z12-13[landuse=field],
{fill-color: @green0;}

area|z12-[natural=scrub],
{fill-color: @green2;}

area|z12-[landuse=meadow],
{fill-color: @green1;}

/* Next types are hardcoded to have a hatching-style fill, see drape_frontend/stylist.cpp */
area|z8-17[leisure=nature_reserve],
area|z8-17[boundary=national_park],
area|z8-17[boundary=protected_area][protect_class=1],
{fill-color: @green6;}
area|z10-17[leisure=nature_reserve],
area|z10-17[boundary=national_park],
area|z10-17[boundary=protected_area][protect_class=1],
{fill-opacity: 0.2;}

line|z8-[boundary=national_park],
line|z8-[boundary=protected_area][protect_class=1],
{width: 1; color: @green6;}

area|z8-16[boundary=aboriginal_lands],
{fill-opacity: 0.5; fill-color: @indigenous_lands;}
area|z10-16[boundary=aboriginal_lands],
{fill-opacity: 0.1;}

line|z8-[boundary=aboriginal_lands],
{width: 1; color: @indigenous_lands;}

/* ToDo: Assume that military areas already have fences? */

area|z8-[landuse=military][military=danger_area],
{fill-opacity: 1.0; fill-color: @military;}

area|z12-[landuse=military]
{fill-opacity: 0.5; fill-color: @military;}

area|z12-[amenity=prison]
{fill-opacity: 0.5; fill-color: @prison;}
/* End of hardcoded hatching */

area|z11-[natural=scree],
area|z12-[natural=shingle],
{fill-color: @scree;}

area|z12-[natural=bare_rock],
{fill-color: @barerock;}

/* Select width ~ highway=primary */
line|z17-[natural=tree_row],
{width: 6; color: @forest}
line|z18[natural=tree_row],
{width: 8;}
line|z19-[natural=tree_row],
{width: 10;}


/* 5.BEACH, GLACIER, DESERT, etc. */

area|z0-[natural=glacier],
area|z10-[natural=beach],
area|z0-[natural=desert],
area|z10-[leisure=beach_resort],
{fill-opacity: 1;}

area|z0-[natural=glacier]
{fill-color: @glacier;}

area|z10-[natural=beach],
area|z10-[leisure=beach_resort],
{fill-color: @beach;}

area|z0-[natural=desert],
{fill-color: @desert;}

/* 6.WATER */

area|z0-[natural=water],
area|z0-[waterway=dock],
area|z0-[landuse=salt_pond],
area|z12-[landuse=basin],
area|z12-[landuse=reservoir],
{fill-opacity: 1;}
area|z15-[natural=water][tunnel],
{fill-opacity: 0.15;}

area|z11-[natural=wetland],
area|z11-[leisure=marina],
area|z13-[leisure=swimming_pool],
area|z16-[amenity=fountain],
{fill-opacity: 1;}

line|z10-[waterway=river],
line|z13-[waterway=stream],
line|z13-[waterway=canal],
line|z13-[waterway=fish_pass],
line|z13-[natural=strait],
{opacity: 0.7; color: @river;}

/* 6.1 Area water(lake,pond etc.) */

area|z0-[natural=water][!tunnel],
area|z0-[landuse=salt_pond],
area|z0-[waterway=dock],
area|z12-[landuse=basin],
area|z12-[landuse=reservoir],
area|z13-[leisure=swimming_pool],
area|z15-[natural=water][tunnel],
area|z16-[amenity=fountain],
{fill-color: @water;}

area|z0-[natural=water][water=ditch],
area|z0-[natural=water][water=drain],
area|z0-[natural=water][water=wastewater],
{fill-color: none;}

area|z13-[natural=water][water=ditch],
area|z13-[natural=water][water=drain],
area|z12-[natural=water][water=wastewater],
{fill-color: @water_bad;}

area|z11-[natural=wetland]
{fill-color: @wetland;}

/* 6.2 Line water(river,canal etc.) */

line|z10[waterway=river],
{width: 1;}

line|z11-12[waterway=river],
{width: 1.2;}

line|z13[waterway=river],
{width: 1.6;}
line|z13[waterway=stream],
line|z13[waterway=canal],
line|z13[waterway=fish_pass],
line|z13[natural=strait],
{width: 0.7;}
line|z13[waterway=stream][intermittent=yes]
{width: 0.7;dashes: 2.7,2.7;}

line|z14[waterway=river],
{width: 1.8;}
line|z14[waterway=stream],
line|z14[waterway=canal],
line|z14[waterway=fish_pass],
line|z14[natural=strait],
{width: 1;}
line|z14[waterway=stream][intermittent=yes]
{width: 1;dashes: 2.7,2.7;}

line|z15-[waterway=river],
{width: 2.2;}
line|z15-[waterway=stream],
line|z15-[waterway=canal],
line|z15-[waterway=fish_pass],
line|z15-[natural=strait],
{width: 1.6;}
line|z15-[waterway=stream][intermittent=yes]
{width: 1.4;dashes: 4.95,4.95;}

node|z16-[waterway=lock_gate],
{icon-image: dot-m.svg;}

line|z13-[waterway=ditch],
line|z13-[waterway=drain],
{opacity: 0.7; color: @water_bad; width: 1.5; dashes: 2.7,2.7;}
line|z16-[waterway=ditch],
line|z16-[waterway=drain],
{width: 3;}

/* Do not draw tunnel waterways */
line[waterway][tunnel]
{width: 0;}

/* 7.LANDUSE */

area|z10-[aeroway=aerodrome][aerodrome=international],
area|z10-[aeroway=aerodrome],
area|z14-[amenity=hospital],
area|z14-[amenity=doctors],
area|z14-[healthcare=laboratory],
area|z14-[highway=pedestrian][area?],
area|z14-[area:highway=pedestrian],
area|z14-[highway=footway][area?],
area|z14-[area:highway=footway],
area|z14-[area:highway=living_street],
area|z14-[amenity=grave_yard],
area|z14-[landuse=cemetery],
area|z14-[amenity=university],
area|z15-[landuse=religious],
area|z15-[leisure=pitch],
area|z15-[leisure=stadium],
area|z15-[leisure=track][area?],
area|z15-[amenity=parking],
area|z15-[amenity=kindergarten],
area|z15-[amenity=college],
area|z15-[amenity=school],
area|z15-[landuse=education],
area|z15-[leisure=playground],
{fill-opacity: 1;}

/* 7.1 Industrial */

area|z14-[landuse=industrial],
area|z14-[landuse=construction],
area|z14-[landuse=landfill],
area|z14-[landuse=railway],
area|z14-[landuse=quarry],
area|z14-[landuse=garages],
area|z15-[power=plant],
area|z15-[power=station],
area|z15-[power=substation],
{fill-color: @industrial; fill-opacity: 1;}

/* 7.2 Hospital */

area|z14-[amenity=hospital],
area|z14-[amenity=doctors]
{fill-color: @hospital;}

/* 7.3 University & Sport */

area|z14-[amenity=university],
area|z15-[amenity=college],
area|z15-[amenity=school],
area|z15-[amenity=kindergarten],
area|z15-[landuse=education],
{fill-color: @university;}

area|z15-[leisure=pitch],
area|z15-[leisure=track][area?],
area|z15-[leisure=playground],
{fill-color: @sport2;}

area|z15-[leisure=stadium]
{fill-color: @sport1;}

area|z15-[leisure=sports_centre]
{fill-color: @sport0;}

area|z14-[piste:type=snow_park],
{fill-color: @piste; fill-opacity: 0.2;}

/* 7.4 Cemetery */

area|z14[landuse=cemetery],
area|z14[amenity=grave_yard]
{fill-color: @green2;fill-opacity: 0.85;}

area|z15-[amenity=grave_yard],
area|z15-[landuse=cemetery]
{fill-color: @green2;}

area|z16-[amenity=grave_yard],
area|z16-[landuse=cemetery]
{fill-color: @green3;}

/* 7.5 Pedestrian areas */

area|z14-[highway=pedestrian][area?],
area|z14-[area:highway=pedestrian],
area|z14-[highway=footway][area?],
area|z14-[area:highway=footway],
area|z14-[area:highway=living_street],
{fill-color: @pedestrian_area;}

area|z16-[highway=pedestrian][area?],
area|z16-[area:highway=pedestrian],
area|z16-[highway=footway][area?],
area|z16-[area:highway=footway],
area|z16-[area:highway=living_street],
{fill-color: @pedestrian_area_light;}

area|z16-[public_transport=platform],
area|z16-[railway=platform],
area|z16-[area:highway=traffic_island],
{fill-opacity: 1; fill-color: @platform;}

area|z14-[amenity=place_of_worship],
area|z15-[tourism=camp_site],
area|z15-[leisure=resort],
area|z15-[landuse=retail],
area|z16-[amenity=marketplace],
area|z16-[leisure=water_park],
area|z15-[highway=rest_area],
area|z14-[highway=services],
{fill-opacity: 1; fill-color: @leisure;}

/* 7.6 Airports */

area|z10[aeroway=aerodrome][aerodrome=international],
area|z10[aeroway=aerodrome],
{fill-color: @aerodrome0;}
area|z11[aeroway=aerodrome][aerodrome=international],
area|z11[aeroway=aerodrome],
{fill-color: @aerodrome1;}
area|z12-[aeroway=aerodrome][aerodrome=international],
area|z12-[aeroway=aerodrome]
{fill-color: @aerodrome2;}
area|z13[aeroway=aerodrome][aerodrome=international],
area|z13[aeroway=aerodrome]
{fill-color: @aerodrome3;}
area|z14[aeroway=aerodrome][aerodrome=international],
area|z14[aeroway=aerodrome]
{fill-color: @aerodrome4;}
area|z15-19[aeroway=aerodrome][aerodrome=international],
area|z15-19[aeroway=aerodrome]
{fill-color: @aerodrome5;}


/* 7.7 Religion */

area|z15-[landuse=religious]
{fill-color: @background;}

/* 7.8 Agricultural */
area|z10-[landuse=farmland],
{fill-color: @farmland; fill-opacity: 1;}

area|z10-[landuse=farmyard],
{fill-color: @farmyard; fill-opacity: 1;}
/* Parking */

area|z15-[amenity=parking],
{fill-color: @parking;}

area|z15-[amenity=parking][location=underground],
area|z15-16[amenity=parking][access=private],
area|z15-16[amenity=parking][parking=lane],
area|z15-16[amenity=parking][parking=street_side],
{fill-color: none;}


/* 8.BUILDINGS */

/* 8.1 Pier, dam, areal bridge, cutline */

area|z12-[man_made=pier],
area|z12-[man_made=breakwater],
{fill-opacity: 1; fill-color: @background;}

area|z14-[man_made=bridge],
{fill-color: @bridge_background; fill-opacity: 0.8;}


line|z14-[man_made=pier],
line|z14-[man_made=breakwater],
{width: 1.5;color: @background; opacity: 0.7;}

line|z14-[waterway=dam],
line|z14-[waterway=weir],
{width: 1.5;color: @building1; opacity: 0.5;}

line|z15[man_made=pier],
line|z15[man_made=breakwater],
line|z15[waterway=dam],
line|z15[waterway=weir],
{width: 2;}

line|z16[man_made=pier],
line|z16[man_made=breakwater],
line|z16[waterway=dam],
line|z16[waterway=weir],
{width: 3;}

line|z17[man_made=pier],
line|z17[man_made=breakwater],
line|z17[waterway=dam],
line|z17[waterway=weir],
{width: 4.5;}

line|z18[man_made=pier],
line|z18[man_made=breakwater],
line|z18[waterway=dam],
line|z18[waterway=weir],
{width: 6;}

line|z19-[man_made=pier],
line|z19-[man_made=breakwater],
line|z19-[waterway=dam],
line|z19-[waterway=weir],
{width: 8;}

line|z14-[man_made=cutline],
{width: 1;color: @green0; opacity: 0.4;}
line|z15[man_made=cutline],
{width: 1.5;}
line|z16[man_made=cutline],
{width: 2;}
line|z17[man_made=cutline],
{width: 3;}
line|z18[man_made=cutline],
{width: 4.5;}
line|z19-[man_made=cutline],
{width: 6;}


/* 8.2 Building */

area|z14[building],
area|z14[waterway=dam],
{fill-color: @building0;fill-opacity: 0.5;}

area|z15[building],
area|z15[waterway=dam],
{fill-color: @building0;fill-opacity: 0.6;}

area|z16[building],
area|z16[building:part],
area|z16[waterway=dam],
{fill-color: @building0;fill-opacity: 0.8;casing-width: 1;casing-color: @building_border0;}

area|z17-[building],
area|z17-[building:part],
area|z17-[waterway=dam],
{fill-color: @building1;casing-width: 1;casing-color: @building_border1;}


/* 8.3 Barriers, cliffs */

line|z16-[barrier=fence],
line|z16-[barrier=wall],
{color: @fence; width: 1; opacity: 0.5;}
line|z17[barrier=fence],
line|z17[barrier=wall],
{width: 1.3; opacity: 0.6;}
line|z18-[barrier=fence],
line|z18-[barrier=wall],
{width: 1.5; opacity: 0.8;}

line|z16-[barrier=guard_rail],
line|z16-[barrier=jersey_barrier],
{color: @fence; width: 1; opacity: 0.3;}
line|z17[barrier=guard_rail],
line|z17[barrier=jersey_barrier],
{width: 1.3; opacity: 0.4;}
line|z18-[barrier=guard_rail],
line|z18-[barrier=jersey_barrier],
{width: 1.5; opacity: 0.6;}


line|z16-[barrier=hedge],
{color: @hedge; width: 1.6; opacity: 0.4;}
line|z17[barrier=hedge],
{width: 2.2; opacity: 0.5;}
line|z18[barrier=hedge],
{width: 3; opacity: 0.7;}
line|z19-[barrier=hedge],
{width: 4; opacity: 0.8;}


/*
  The triangles pattern uses "dashes: " parameter as a 4 values tuple:
  dash length (===), triangle base (tb), triangle height, base height / dash width.
  ===\tb /===  - base height / dash width
      \ /    | - triangle height

  Set width = triangle height + base height.
*/

line|z14-[barrier=city_wall],
line|z14-[historic=citywalls],
{color: @building1; width: 2; opacity: 0.7;}
line|z15[barrier=city_wall],
line|z15[historic=citywalls],
{width: 2.8;}
line|z16-[barrier=city_wall],
line|z16-[historic=citywalls],
{color: @building0; width: 4.5; dashes: 3,3,1.5,3;}
line|z17[barrier=city_wall],
line|z17[historic=citywalls],
{width: 5.9; dashes: 4,4,1.9,4;}
line|z18[barrier=city_wall],
line|z18[historic=citywalls],
{width: 8.5; dashes: 6,6,2.5,6;}
line|z19-[barrier=city_wall],
line|z19-[historic=citywalls],
{width: 11; dashes: 8,8,3,8;}


line|z14-[natural=cliff],
line|z14-[natural=earth_bank],
{color: @cliff; width: 2; dashes: 1.4,1.4; opacity: 0.4;}
line|z15[natural=cliff],
line|z15[natural=earth_bank],
{width: 3; dashes: 1.5,1.5;}
line|z16[natural=cliff],
line|z16[natural=earth_bank],
{width: 6.2; dashes: 3,3.5,4.5,1.2;}
line|z17[natural=cliff],
line|z17[natural=earth_bank],
{width: 7.4; dashes: 3.5,5,6,1.4;}
line|z18[natural=cliff],
line|z18[natural=earth_bank],
{width: 9.5; dashes: 4,6,8,1.5; opacity: 0.5;}
line|z19-[natural=cliff],
line|z19-[natural=earth_bank],
{width: 11.9; dashes: 5,7,10,1.9; opacity: 0.5;}


line|z16-[barrier=ditch],
{width: 1.8; opacity: 0.7; color: @cliff; dashes: 0.9,0.9;}


line|z16-[barrier=retaining_wall],
{color: @fence; width: 2.4; dashes: 2.8,1.4,1.4,1; opacity: 0.7;}
line|z17[barrier=retaining_wall],
{width: 3.2; dashes: 4,2,2,1.2;}
line|z18-[barrier=retaining_wall],
{width: 4.5; dashes: 6,3,3,1.5;}


line|z16-[man_made=embankment],
{color: @building1; width: 3.5; dashes: 4,2,2,1.5; opacity: 0.7;}
line|z17[man_made=embankment],
{width: 5; dashes: 6,3,3,2;}
line|z18-[man_made=embankment],
{width: 7; dashes: 8,4,4,3;}


/*
  Color is copied from Transport icon
  Width is copied from highway=footway
*/
line|z16-[public_transport=platform],
{width: 2; color: #2F6499;}

line|z17[public_transport=platform],
{width: 2.4;}

line|z18[public_transport=platform],
{width: 3.2;}

line|z19-[public_transport=platform],
{width: 4.2;}


/* 9. ISOLINES */

line|z11-[isoline=step_1000],
{color: @isoline1000;}
line|z11-[isoline=step_500],
{color: @isoline500;}

line|z12-[isoline=step_100],
{color: @isoline100;}

line|z14-[isoline=step_50],
line|z15-[isoline=zero],
{color: @isoline50;}

line|z15-[isoline=step_10],
{color: @isoline10;}


line|z11[isoline=step_1000],
{width: 0.8; opacity: 0.4;}
line|z11[isoline=step_500],
{width: 0.8; opacity: 0.2;}

line|z12-13[isoline=step_1000],
{width: 1.0; opacity: 0.4;}
line|z12-13[isoline=step_500],
{width: 0.8; opacity: 0.35;}
line|z12-13[isoline=step_100],
{width: 0.8; opacity: 0.2;}

line|z14-[isoline=step_1000],
{width: 1.2; opacity: 0.5;}
line|z14-15[isoline=step_500],
{width: 1.0; opacity: 0.4;}
line|z14-15[isoline=step_100],
{width: 0.8; opacity: 0.35;}
line|z14-15[isoline=step_50],
{width: 0.8; opacity: 0.2;}

line|z15[isoline=zero],
line|z15[isoline=step_10],
{width: 0.8; opacity: 0.2;}

line|z16-[isoline=step_500],
{width: 1.2; opacity: 0.5;}
line|z16-[isoline=step_100],
{width: 1.0; opacity: 0.4;}
line|z16-17[isoline=step_50],
{width: 0.8; opacity: 0.35;}
line|z16-17[isoline=zero],
line|z16-17[isoline=step_10],
{width: 0.8; opacity: 0.35;}

line|z18-[isoline=step_50],
{width: 1.0; opacity: 0.4;}
line|z18-[isoline=zero],
line|z18-[isoline=step_10],
{width: 0.8; opacity: 0.4;}
