]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Use SVG for sprites for better high DPI support
[rails.git] / app / assets / stylesheets / common.scss
1 @import "parameters";
2
3 /* Styles common to large and small screens */
4
5 /* Minimal CSS reset */
6
7 html, body, ul, ol, li, form, fieldset, legend, h1, h2, h3, h4, h5, h6, p, input {
8   margin: 0;
9   padding: 0;
10   border: 0;
11   font-size:100%;
12 }
13
14 fieldset,img { border: 0; }
15
16 legend { color: #000; }
17
18 sup {
19   vertical-align: super;
20   font-size: smaller;
21 }
22
23 sub {
24   vertical-align: sub;
25   font-size: smaller;
26 }
27
28 table {
29   border-collapse: collapse;
30   border-spacing: 0;
31 }
32
33 li { list-style: none; }
34
35 input,
36 select,
37 textarea,
38 body { font: #{$typeheight}/#{$lineheight} "Helvetica Neue",Arial,sans-serif; }
39
40 abbr, acronym {
41   border-bottom: .1em dotted;
42   cursor: help;
43 }
44
45 strong {
46   font-weight: bold;
47 }
48
49 /* Micro Clearfix | Details: http://nicolasgallagher.com/micro-clearfix-hack/ */
50
51 .clearfix:before,
52 .clearfix:after {
53     content: " ";
54     display: table;
55 }
56
57 .clearfix:after {
58     clear: both;
59 }
60
61 /* Basic grid */
62
63 .col0    { float:left; width:04.1666%; }
64 .col1    { float:left; width:08.3333%; }
65 .col2    { float:left; width:16.6666%; }
66 .col3    { float:left; width:25.0000%; }
67 .col4    { float:left; width:33.3333%; }
68 .col5    { float:left; width:41.6666%; }
69 .col6    { float:left; width:50.0000%; }
70 .col7    { float:left; width:58.3333%; }
71 .col8    { float:left; width:66.6666%; }
72 .col9    { float:left; width:75.0000%; }
73 .col10   { float:left; width:83.3333%; }
74 .col11   { float:left; width:91.6666%; }
75 .col12   { width:100%; }
76
77 .margin0  { margin-left:04.1666%; }
78 .margin1  { margin-left:08.3333%; }
79 .margin2  { margin-left:16.6666%; }
80 .margin3  { margin-left:25.0000%; }
81 .margin4  { margin-left:33.3333%; }
82 .margin5  { margin-left:41.6666%; }
83 .margin6  { margin-left:50.0000%; }
84 .margin7  { margin-left:58.3333%; }
85 .margin8  { margin-left:66.6666%; }
86 .margin9  { margin-left:75.0000%; }
87 .margin10 { margin-left:83.3333%; }
88 .margin11 { margin-left:91.6666%; }
89 .margin12 { margin-left:100.0000%; }
90
91 .fillL { background-color: white; }
92
93 /* Default rules for the body of every page */
94
95 * {
96   box-sizing: border-box;
97 }
98
99 body {
100   font-family: 'Helvetica Neue',Arial,sans-serif;
101   font-size: $typeheight;
102   line-height: 1.6666;
103   color: #222;
104   background-color: #fff;
105   margin: 0px;
106   padding: 0px;
107   text-align: left;
108   height: 100%;
109 }
110
111 h1, h2, h3 {
112   font-weight: 600;
113   line-height: 1.2;
114 }
115
116 h4, h5 {
117   font-weight: 500;
118 }
119
120 h1 {
121   font-size: 18px;
122 }
123
124 h2, h3 {
125   font-size: 16px;
126 }
127
128 p > img {
129   width: auto;
130   max-width: 100%;
131 }
132
133 small, aside {
134   font-size: 12px;
135 }
136
137 #container { position: relative; }
138
139 .column-1 {
140   width: 50%;
141   margin: 0 0 $lineheight/2 0;
142 }
143
144 .small_icon {
145   vertical-align: middle;
146   margin-right: $lineheight/4;
147 }
148
149 .red { color: $red; }
150
151 /* Rules for icons */
152
153 .icon {
154   display: inline-block;
155   vertical-align: top;
156   width: 20px;
157   height: 20px;
158   background: transparent image-url("sprite.png") no-repeat 0 0;
159   background-image: image-url("sprite.svg");
160   text-indent: -9999px;
161   overflow: hidden;
162 }
163
164 .icon.search      { background-position: 0 0; }
165 .icon.donate      { background-position: -20px 0; }
166 .icon.zoomin      { background-position: -40px 0; }
167 .icon.zoomout     { background-position: -60px 0; }
168 .icon.geolocate   { background-position: -80px 0; }
169 .active .icon.geolocate   { background-position: -80px -20px; }
170 .icon.layers      { background-position: -100px 0; }
171 .icon.key         { background-position: -120px 0; }
172 .icon.share       { background-position: -140px 0; }
173 .icon.clipboard   { background-position: -160px 0; }
174 .icon.link        { background-position: -180px 0; }
175 .icon.close       { background-position: -200px 0; }
176 .icon.close:hover { background-position: -200px -20px; }
177 .icon.check       { background-position: -220px 0; }
178 .icon.note        { background-position: -240px 0; }
179 .icon.note.grey   { background-position: -240px -20px; }
180 .icon.query       { background-position: -260px 0; }
181
182 /* Rules for links */
183
184 a {
185   color: #24d;
186   text-decoration: none;
187   -webkit-appearance: none;
188   outline: 0;
189   &:hover {
190     text-decoration: underline;
191   }
192 }
193
194 /* Rules for horizontal lines */
195
196 hr {
197   border: none;
198   background-color: #ccc;
199   color: #ccc;
200   height: 1px;
201 }
202
203 /* General styles for tables */
204
205 table {
206   width: 100%;
207   margin-bottom: $lineheight;
208   th, td {
209     text-align: left;
210     padding: $lineheight/4;
211     line-height: $lineheight;
212   }
213   th {
214     font-weight: 600;
215     vertical-align: top;
216   }
217   td {
218     vertical-align: middle;
219   }
220 }
221
222 /* Utility for de-emphasizing content */
223
224 .deemphasize {
225   color: #999;
226   a {
227     color: $blue;
228   }
229 }
230
231 /* Rules for the header */
232
233 #menu-icon {
234   display: none !important;
235   float: right;
236   background: image-url("menu-icon.png") no-repeat;
237   background-size: 30px 30px;
238   display: block;
239   width: 30px;
240   height: 30px;
241   margin: 14px 10px 0 0;
242   opacity: 0.6;
243 }
244
245 header {
246   height: $headerHeight;
247   position: relative;
248   z-index: 1001;
249   font-size: 14px;
250
251   h1, nav, nav > ul, nav > ul > li, .dropdown {
252     display: inline-block;
253   }
254
255   > * {
256     height: 100%;
257     padding: $lineheight/2;
258   }
259
260   h1, nav.primary {
261     float: left;
262   }
263
264   a, a:hover {
265     text-decoration: none;
266   }
267
268   img.logo {
269     width: 30px;
270     height: 30px;
271     margin-top: -2px;
272     vertical-align: middle;
273   }
274
275   h1 {
276     margin: 0;
277     padding-top: 15px;
278
279     a {
280       color: #000;
281     }
282   }
283 }
284
285 nav.primary {
286   > ul {
287     $border: 1px solid $green;
288
289     border: $border;
290     border-radius: $border-radius;
291
292     > li {
293       border-right: $border;
294       float: left;
295       &:last-child {
296         border-right: 0;
297       }
298       > a:hover { background: lighten($green, 30%); }
299       &.current > a:hover { background: $green; }
300       &.disabled > a:hover { background: lighten($green, 38%); }
301       &.dropdown {
302         > a.tab { border-right: 1px solid lighten($green, 30%); }
303         &.current > a.tab { border-right: 1px solid lighten($green, 10%); }
304       }
305     }
306   }
307
308   a.tab,
309   .dropdown-toggle {
310     display: inline-block;
311     font-weight: 500;
312     color: $green;
313     padding: 5px 15px;
314   }
315
316   .dropdown-toggle {
317     padding: 5px 6px;
318   }
319
320   .caret {
321     border-top-color: $green;
322     margin-top: 10px;
323   }
324
325   .disabled a {
326     color: #ccc;
327     cursor: default;
328
329     .caret {
330       border-top-color: #ccc;
331     }
332   }
333
334   > ul li.current {
335     background-color: $green;
336
337     .tab {
338       color: #fff;
339     }
340
341     .caret {
342       border-top-color: #fff;
343     }
344   }
345 }
346
347 nav.secondary {
348   position: absolute;
349   right: 0;
350
351   > ul {
352     vertical-align: middle;
353     a, .dropdown-toggle {
354       display: inline-block;
355       text-decoration: none;
356       color: $darkgrey;
357       padding: 5px;
358
359       &:hover { color: darken($darkgrey, 25%); }
360     }
361   }
362
363   > ul li.current a {
364     color: darken($darkgrey, 25%);
365   }
366
367   .user-menu {
368     $border: 1px solid $grey;
369     border: $border;
370     border-radius: $border-radius;
371     margin-left: 10px;
372
373     > li {
374       border-right: $border;
375       float: left;
376       &:last-child {
377         border-right: 0;
378
379         > a {
380           border-radius: 0 $border-radius $border-radius 0;
381         }
382       }
383       &:first-child > a { border-radius: $border-radius 0 0 $border-radius; }
384       &:hover a { background: lighten($darkgrey, 30%); }
385     }
386
387     a {
388       padding: 5px 15px;
389
390     }
391
392     &.logged-in > a {
393       padding: 0;
394       > .user-button {
395         line-height: 1.8;
396         padding: 5px 10px 3px 6px;
397         display: inline-block;
398         color: $darkgrey;
399       }
400       &:hover > .user-button { color: darken($darkgrey, 5%); }
401     }
402   }
403
404   .caret {
405     border-top-color: $grey;
406     margin-top: 9px;
407   }
408
409   img.user_thumbnail_tiny {
410     border: 0;
411     vertical-align: top;
412     margin-top: 0px;
413     margin: 4px 0 0 4px;
414     border-radius: 2px;
415   }
416
417   #inboxanchor {
418     display: inline-block;
419     vertical-align: top;
420     height: 25px;
421     margin: 3px 0 3px 3px;
422     background-color: lighten($grey, 10%);
423     line-height: 20px;
424     border-radius: 2;
425   }
426
427   .dropdown-menu {
428     left: auto;
429     right: -1px;
430     border-radius: 3px 0 3px 3px;
431
432     .count-number {
433       float: right;
434       padding: 0 5px;
435       margin: 0;
436     }
437   }
438 }
439
440 #compact-secondary-nav {
441   display: none;
442   ul li a {
443     width: 100%;
444     color: #333;
445     &:hover { color: #fff; }
446   }
447 }
448
449 body.compact {
450   #compact-secondary-nav {
451     display: inline-block;
452   }
453   .compact-hide {
454     display: none;
455   }
456 }
457
458 /* Utility for styling notification numbers */
459
460 .count-number {
461   padding: 2px $lineheight/4;
462   border-radius: 2px;
463   background: lighten($green, 30%);
464   margin: 0 2px;
465   font-size: 11px;
466   color: #333;
467 }
468
469 /* Rules for the message shown in place of the map when javascript is disabled */
470
471 #noscript {
472   z-index: 20000000;
473   margin-left: 400px;
474   margin-top: 50px;
475 }
476
477 /* Rules for Leaflet maps */
478
479 .leaflet-control .control-button {
480   display: block;
481   height: 40px;
482   width: 40px;
483   background-color: #333;
484   background-color: rgba(0,0,0,.6);
485   border-radius: 4px 0 0 4px;
486   margin-bottom: 10px;
487   outline: none;
488
489   &:hover {
490     background-color: black;
491   }
492
493   &.disabled {
494     background-color: #333;
495     background-color: rgba(0,0,0,.5);
496     cursor: default;
497   }
498
499   &.active {
500     background-color: #9ed485;
501   }
502
503   .icon {
504     margin: 10px;
505   }
506 }
507
508 .leaflet-control .zoomin,
509 .control-layers .control-button {
510   margin-bottom: 0px;
511   border-radius: 4px 0 0 0;
512 }
513
514 .leaflet-control .zoomout,
515 .control-key .control-button {
516   margin-bottom: 0;
517   border-radius: 0;
518 }
519
520 .control-locate .control-button,
521 .control-share .control-button {
522   border-radius: 0 0 0 4px;
523 }
524
525 /* Rules for the sidebar and main map area */
526
527 .map-layout {
528   #content {
529     overflow: hidden;
530     position: absolute;
531     top: $headerHeight;
532     bottom: 0;
533     width: 100%;
534   }
535
536   #sidebar, #map {
537     position: relative;
538     height: 100%;
539     overflow-x: hidden;
540     overflow-y: auto;
541   }
542
543   #sidebar {
544     float: left;
545     width: $sidebarWidth;
546     background: #fff;
547     font-size: 12px;
548
549     h2 {
550       padding: $lineheight $lineheight $lineheight/2;
551     }
552
553     h3, h4 {
554       margin-top: $lineheight;
555       margin-bottom: $lineheight/2;
556       font-size: 13px;
557     }
558
559     .icon.close {
560       float: right;
561       cursor: pointer;
562     }
563
564     p.error {
565       background-color: #ff7070;
566       padding: 10px;
567       font-weight: bold;
568     }
569   }
570
571   .welcome {
572     display: none;
573   }
574
575   .overlay-sidebar #sidebar {
576     position: absolute;
577     z-index: 1000;
578     height: auto;
579     border-bottom-right-radius: 5px;
580     overflow: hidden;
581     .welcome {
582       display: block;
583     }
584     #sidebar_content {
585       display: none;
586     }
587   }
588
589   .welcome {
590     p {
591       padding: $lineheight/2 $lineheight $lineheight;
592       font-size: 110%;
593       font-weight: 300;
594     }
595
596     .button {
597       width: 50%;
598       float: left;
599       margin: 0;
600       border-radius: 0;
601       font-weight: normal;
602       padding: .6em;
603
604       &.learn-more {
605         border-right: 1px solid #fff;
606       }
607     }
608   }
609
610   #map {
611     height: 100%;
612     overflow: hidden;
613
614     &.query-active {
615       cursor: help;
616     }
617
618     &.query-disabled {
619       cursor: not-allowed;
620     }
621
622     .leaflet-marker-draggable {
623       cursor: move;
624     }
625   }
626
627   #map-ui {
628     display: none;
629     position: relative;
630     float: right;
631     width: 250px;
632     height: 100%;
633     background: white;
634     overflow: auto;
635
636     .section {
637       border-bottom: 1px solid #DDD;
638       padding: 10px 20px;
639     }
640
641     a.close-button {
642       float: right;
643       padding:5px;
644       font-size:20px;
645       line-height:10px;
646       color:#222;
647       border:1px solid #ddd;
648     }
649
650     .tooltip {
651       opacity: 1;
652       border: 1px solid #ccc;
653       .tooltip-arrow {
654         border-top-color: #ccc;
655       }
656     }
657   }
658 }
659
660 .layers-ui,
661 .share-ui {
662   li:last-child {
663     margin-bottom: 0;
664   }
665 }
666
667 .layers-ui {
668   .base-layers {
669     .leaflet-container {
670       width: 100%;
671       height: 50px;
672       cursor: pointer;
673     }
674
675     li  {
676       overflow: hidden;
677       border-radius: 3px;
678       border: 2px solid #fff;
679       margin-bottom: 8px;
680       position: relative;
681       transition: border-color 0.08s ease-in;
682
683       label {
684         position: absolute;
685         top: 0;
686         left: 0;
687         padding: 2px 6px;
688         border-bottom-right-radius: 3px;
689         cursor: pointer;
690         font-weight: 600;
691         font-size: 16px;
692         text-stroke: 2px #fff;
693         background: rgba(255,255,255,.9);
694         z-index: 2; // For IE9
695         input[type="radio"] {
696           display: none;
697         }
698       }
699
700       &.active { border-color: darken($green, 10%); }
701       &:hover {
702         border-color: $grey;
703         &.active { border-color: darken($green, 20%); }
704       }
705     }
706   }
707
708   .overlay-layers {
709     p {
710       font-size: 13px;
711       margin-bottom: 8px;
712     }
713     li.disabled { color: #999; }
714   }
715 }
716
717 .share-ui {
718   .share-tabs {
719     margin-bottom: 10px;
720
721     a {
722       color: #fff;
723       text-decoration: none;
724       background-color: $lightblue;
725       padding: 5px 10px;
726       border-right: 1px solid #fff;
727     }
728
729     a:first-child {
730       border-right: 1px solid #fff;
731       border-radius: 4px 0 0 4px;
732     }
733
734     a:last-child {
735       border-radius: 0 4px 4px 0;
736     }
737
738     a.active {
739       background-color: $blue;
740     }
741   }
742
743   .share-tab {
744     display: none;
745   }
746
747   .share-link {
748     input[type=text],
749     textarea {
750       width: 100%;
751       font-family: monospace;
752       font-size: small;
753       line-height: 1.3;
754     }
755   }
756
757   .share-image {
758     label {
759       margin-right: 10px;
760     }
761   }
762
763   #embed_html {
764     resize: vertical;
765   }
766
767   #mapnik_scale {
768     width: 100px;
769   }
770 }
771
772 .leaflet-top {
773   top: $lineheight/2 !important;
774   .leaflet-control {
775     margin-right: 0px !important;
776     margin-top: 0px !important;
777   }
778 }
779
780 .leaflet-popup-scrolled {
781   padding-right: $lineheight;
782   border-bottom: 0px !important;
783   border-top: 0px !important;
784 }
785
786 .leaflet-popup-content-wrapper {
787   border-radius: 4px !important;
788 }
789
790 /* Rules for attribution text under the main map shown on printouts */
791
792 #attribution {
793   display: none;
794
795   table {
796     width: 100%
797   }
798 }
799
800 .attribution_license,
801 .attribution_project {
802   text-align: left;
803 }
804
805 .attribution_notice {
806   text-align: center;
807 }
808
809 .donate-attr { color: darken($green, 10%) !important; }
810
811 /* Rules for the sidebar */
812
813 .sidebar_heading {
814   position: relative;
815   padding: $lineheight/2 $lineheight;
816   // background: $offwhite;
817   // border-bottom: 1px solid #ccc;
818   > .close {
819     float: right;
820     margin-top: 2px;
821     cursor: pointer;
822   }
823 }
824
825 #browse_status {
826   p {
827     padding: $lineheight;
828   }
829
830   input {
831     display: block;
832     margin-left: auto;
833     margin-right: auto;
834   }
835 }
836
837 #sidebar {
838   #sidebar_loader,
839   .loader,
840   .load_more {
841     text-align: center;
842     margin: $lineheight auto;
843     width: 40px;
844     display: block;
845   }
846 }
847
848 /* Rules for the search and direction forms */
849
850 header .search_forms,
851 .directions_form {
852   display: none;
853 }
854
855 .search_form,
856 .directions_form {
857   position: relative;
858   padding: $lineheight/2;
859   background-color: $lightgrey;
860
861   .query_wrapper {
862     position: relative;
863     overflow: hidden;
864     border-radius: 2px 0 0 2px;
865   }
866
867   input[type=text] {
868     width: 100%;
869     height: 30px;
870     transition: 300ms linear;
871   }
872
873   input[type=text].overflow {
874     border-right: none;
875   }
876
877   input:focus {
878     outline: none;
879     box-shadow: 0px 0px 7px #9ED485;
880   }
881
882   input[type=submit].float {
883     float: right;
884     width: auto;
885     min-width: 0;
886     border-radius: 0 2px 2px 0;
887   }
888
889   select {
890     /* this next line is to polyfill the vertical alignment of text within a select element,
891      * which is different between firefox and chrome. */
892     padding: 0.3em 0;
893   }
894
895   .query_options {
896     text-align: right;
897     font-size: 10px;
898     color: $blue;
899   }
900
901   .describe_location {
902     position: absolute;
903     top: 6px;
904     right: 6px;
905     font-size: 10px;
906     color: $blue;
907   }
908
909   .switch_link {
910     float: right;
911     width: auto;
912     min-width: 0;
913     margin-left: 6px;
914   }
915
916   img.button {
917     display: block;
918   }
919
920   span.force_width {
921     width: 100%;
922     padding-right: 25px;
923     display: block;
924   }
925
926   select.routing_engines {
927     min-height: 30px;
928     margin: 0px 0px 5px 25px;
929   }
930
931   input.routing_go {
932     min-width: 100px;
933     float: right;
934   }
935
936   div.header {
937     width: 100%;
938     height: 30px;
939   }
940
941   div.line {
942     width: 100%;
943     margin: 0px 0px 5px 0px;
944   }
945
946   div.loader_copy {
947     display: none;
948
949     img {
950       vertical-align: middle;
951     }
952   }
953 }
954
955 /* Rules for the map key which appears in the popout sidebar */
956
957 #mapkey {
958  .mapkey-table-key img {
959     display: block;
960     margin-left: auto;
961     margin-right: auto;
962   }
963   td {
964     padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
965   }
966 }
967
968 /* Rules for search sidebar */
969
970 .search_results_entry {
971   ul li {
972     border-bottom: $keyline;
973     cursor: pointer;
974     &:first-child { border-top: $keyline; }
975     &.selected { background: $list-highlight; }
976   }
977
978   .search_details {
979     display: block;
980     float: right;
981     text-align: right;
982     margin-top: 0.2em;
983     margin-left: 0.5em;
984   }
985 }
986
987 .search_results_error {
988   color: #f00;
989   padding: 10px 20px;
990 }
991
992 /* Rules for routing */
993
994 #sidebar_content>table {
995     padding: 5px 20px 10px 15px;
996     width: 100%;
997     border-collapse: separate;
998 }
999
1000 div.direction {
1001   background-image: image-url('routing-sprite.png');
1002   width: 20px;
1003   height: 20px;
1004   background-repeat: no-repeat;
1005 }
1006 @for $i from 1 through 17 {
1007 div.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; }
1008 }
1009
1010 p#routing_summary {
1011     padding: 0 $lineheight $lineheight/4;
1012 }
1013
1014 td.instruction, td.distance {
1015     padding-top: $lineheight/5;
1016     padding-bottom: $lineheight/5;
1017     border-bottom: 1px solid #DDD;
1018 }
1019 td.distance {
1020     color: #BBB;
1021     text-align: right;
1022     font-size: x-small;
1023 }
1024 tr.turn {
1025     cursor: pointer;
1026 }
1027 tr.turn:hover {
1028     background: $list-highlight;
1029 }
1030 .routing_engines, #route_from, #route_to { margin-left: 25px; }
1031 .routing_marker { width: 15px; position: absolute; cursor: move; }
1032
1033 /* Rules for entity history */
1034
1035 #sidebar_content {
1036   .browse_details {
1037     position: relative;
1038     border-bottom: $keyline;
1039   }
1040 }
1041
1042 .browse_status {
1043   display: none;
1044 }
1045
1046 /* Rules for the history sidebar */
1047
1048 #sidebar .changesets {
1049   li {
1050     padding: 15px 20px;
1051     border-bottom: 1px solid #ddd;
1052     cursor: pointer;
1053
1054     &.selected { background: $list-highlight; }
1055     /* color is derived from changeset bbox fillColor in history.js */
1056   }
1057
1058   h4 {
1059     margin: 0;
1060     a {
1061       color: #000;
1062     }
1063   }
1064
1065   .comments {
1066     float: right;
1067     color: #999;
1068   }
1069
1070   .comments-0 {
1071     opacity: 0.5;
1072   }
1073 }
1074
1075 /* Rules for the browse sidebar */
1076
1077 #sidebar_content {
1078   .browse-section {
1079     padding: $lineheight/2 $lineheight;
1080     border-bottom: 1px solid #ddd;
1081
1082     h4:first-child {
1083       margin-top: 0;
1084       word-wrap: break-word;
1085     }
1086   }
1087
1088   .browse-section:last-of-type {
1089     border-bottom: none;
1090   }
1091
1092   .paginate {
1093     float: right;
1094     padding: 1px 6px;
1095     border: 1px solid #eee;
1096     border-radius: 3px;
1097   }
1098
1099   .paginate ul {
1100     padding-left: 20px;
1101   }
1102
1103   .browse-field {
1104     margin-bottom: 10px;
1105
1106     h4 {
1107       padding: 5px 0 5px 10px;
1108       font-size: 12px;
1109       border: 1px solid #CCC;
1110       border-radius: 4px 4px 0 0;
1111       background-color: #F6F6F6;
1112     }
1113
1114     p {
1115       padding: 7px 10px;
1116       font-size: 12px;
1117       background-color: #FFF;
1118       border: 1px solid #CCC;
1119       border-top: 0;
1120       border-radius: 0 0 4px 4px;
1121     }
1122   }
1123
1124   .browse-tag-list {
1125     background-color: #F6F6F6;
1126     border: 1px solid #ddd;
1127     border-radius: 3px;
1128     font-size: 12px;
1129     table-layout: fixed;
1130     border-collapse: separate;
1131
1132     th, td {
1133       border-bottom: 1px solid #ddd;
1134     }
1135
1136     tr:last-child th, tr:last-child td {
1137       border-bottom: 0;
1138     }
1139
1140     .browse-tag-k,
1141     .browse-tag-v {
1142       width: 50%;
1143       padding: 6px 10px;
1144       word-wrap: break-word;
1145     }
1146
1147     .browse-tag-k {
1148       font-weight: 500;
1149       background-color: #F6F6F6;
1150     }
1151
1152     .browse-tag-v {
1153       border-left: 1px solid #ddd;
1154       background-color: #fff;
1155     }
1156   }
1157
1158   .warning {
1159     margin: $lineheight/2 0;
1160     padding: $lineheight/2;
1161     font-size: 90%;
1162   }
1163
1164   .note-comments li, .changeset-comments li {
1165     margin: $lineheight/2 0;
1166
1167     p {
1168       margin-left: 10px;
1169     }
1170   }
1171
1172   .comments-header {
1173     float: left;
1174   }
1175
1176   .subscribe-buttons {
1177     float: left;
1178     margin: 18px 10px 10px;
1179     min-width: 80px;
1180   }
1181
1182   .subscribe-buttons input {
1183     font-size: 90%;
1184     line-height: 15px;
1185     min-height: 20px;
1186   }
1187
1188   span.action-button:hover {
1189     cursor: pointer;
1190     text-decoration: underline;
1191   }
1192
1193   .note-description {
1194     overflow: hidden;
1195     margin: 0 0 10px 10px;
1196   }
1197
1198   .query-intro p {
1199     padding: $lineheight $lineheight $lineheight/2;
1200   }
1201
1202   .query-results {
1203     display: none;
1204
1205     h3 {
1206       padding: $lineheight $lineheight $lineheight/2;
1207       margin: 0;
1208     }
1209
1210     ul {
1211       li {
1212         padding: 15px 20px;
1213         border-bottom: 1px solid #ddd;
1214
1215         &.query-result {
1216           cursor: pointer;
1217         }
1218
1219         &.selected {
1220           background: $list-highlight;
1221         }
1222       }
1223     }
1224   }
1225 }
1226
1227 /* Rules for export sidebar */
1228
1229 .export_form {
1230   padding: $lineheight;
1231
1232   .export_area_inputs,
1233   .export_button {
1234     text-align: center;
1235   }
1236
1237   .export_area_inputs {
1238     margin-bottom: $lineheight/2;
1239     input[type="text"] {
1240       width: 80px;
1241       text-align: center;
1242       margin-bottom: 5px;
1243     }
1244   }
1245
1246   .export_boxy {
1247     background: #eee;
1248     border: 1px solid #ccc;
1249     border-radius: 3px;
1250
1251     #maxlat { margin-top: -1px; }
1252     #minlon {
1253       float: left;
1254       margin-left: -1px;
1255     }
1256     #maxlon {
1257       float: right;
1258       margin-right: -1px;
1259     }
1260     #minlat { margin-bottom: 0; }
1261   }
1262
1263   .export_bound {
1264     margin: $lineheight/4;
1265   }
1266
1267   .export_button {
1268     margin-top: $lineheight;
1269     margin-bottom: $lineheight;
1270   }
1271
1272   dl {
1273     padding-left: $lineheight/2;
1274     dd {
1275       margin-left: 0;
1276       margin-bottom: 10px;
1277     }
1278   }
1279 }
1280
1281 /* Rules for the routing sidebar */
1282
1283 #sidebar_content {
1284   #routing_credit {
1285     text-align: center;
1286     padding: 0.5em;
1287   }
1288 }
1289
1290 /* Rules for edit pages */
1291
1292 .site-edit {
1293   #content {
1294     position: absolute;
1295     top: $headerHeight;
1296     bottom: 0;
1297     width: 100%;
1298   }
1299
1300   #map {
1301     height: 100%;
1302     overflow: hidden;
1303   }
1304 }
1305
1306 /* Rules for non-map content pages */
1307
1308 .content-heading {
1309   background: $lightgrey;
1310
1311   h1 { font-size: 22px; }
1312 }
1313
1314 .content-body {
1315   h1, h2, h3, p, ul, ol {
1316     margin-bottom: $lineheight;
1317   }
1318
1319   h1, h2, h3 {
1320     margin-top: $lineheight/2;
1321   }
1322 }
1323
1324 .content-inner {
1325   position: relative;
1326   max-width: 900px;
1327   margin: auto;
1328   padding: $lineheight;
1329 }
1330
1331 /* Overrides for pages that use new layout conventions */
1332
1333 .user-new,
1334 .user-create,
1335 .user-terms {
1336   .content-body .content-inner {
1337     padding: 0;
1338   }
1339 }
1340
1341 .user-new,
1342 .user-create,
1343 .user-terms,
1344 .user-confirm {
1345   .content-heading .content-inner {
1346     height: 200px;
1347   }
1348 }
1349
1350 .header-illustration {
1351   background-position: 0 0;
1352   background-repeat: no-repeat;
1353   position: absolute;
1354   height: 200px;
1355   width: 100%;
1356   left: 0;
1357   bottom: 0;
1358
1359   &.new-user-main {
1360     background-image: image-url("sign-up-illustration.png");
1361   }
1362
1363   &.confirm-main {
1364     background-image: image-url("confirm-illustration.png");
1365   }
1366
1367   &.new-user-terms {
1368     background-image: image-url("terms-illustration.png");
1369   }
1370
1371   &.new-user-arm {
1372     height: 110px;
1373     width: 130px;
1374     left: 260px;
1375     top: 160px;
1376     background-image: image-url("sign-up-illustration-arm.png");
1377     z-index: 100;
1378   }
1379 }
1380
1381 #content.maximised {
1382   top: 0;
1383   left: 0;
1384   right: 0;
1385   bottom: 0;
1386   border: 0;
1387   z-index: 2000;
1388 }
1389
1390 /* Rules for small maps in content areas */
1391
1392 .content_map {
1393   position: relative;
1394   width: 45%;
1395   height: 400px;
1396   border: 1px solid #ccc;
1397   margin-bottom: $lineheight;
1398   float: right;
1399 }
1400
1401 /* Rules for the trace list shown by the traces tab etc */
1402
1403 #trace_list {
1404   font-size: $lineheight/2;
1405   border-width: 0px;
1406   text-align: right;
1407
1408   .trace_summary {
1409     font-size: 12px;
1410     color: gray;
1411   }
1412
1413   .trace_pending {
1414     color: red;
1415   }
1416
1417   .trace_public {
1418     color: green;
1419   }
1420
1421   .trace_identifiable {
1422     color: green;
1423   }
1424
1425   .trace_trackable {
1426     color: red;
1427   }
1428
1429   .trace_private {
1430     color: red;
1431   }
1432 }
1433
1434 /* Rules for the new trace form */
1435
1436 #new_trace {
1437   input[type=text] {
1438     width: 50%;
1439     width: calc(100% - 150px);
1440     max-width: 500px;
1441   }
1442 }
1443
1444 /* Rules for the edit trace form */
1445
1446 .edit_trace {
1447   .form-row p {
1448     margin-bottom: 0px;
1449   }
1450
1451   input[type=text] {
1452     width: 50%;
1453     width: calc(100% - 150px);
1454     max-width: 500px;
1455   }
1456 }
1457
1458 /* Rules for the user profile page */
1459
1460 #userinformation {
1461
1462   min-height: 100px;
1463   .userinformation-inner {
1464     float: left;
1465   }
1466   h2 {
1467     margin-top: 0;
1468   }
1469   .user-description {
1470     width: 100%;
1471     clear: both;
1472   }
1473   .deemphasize {
1474     margin: 0;
1475   }
1476 }
1477
1478 .admin-user-info small {
1479   margin-bottom: $lineheight/2;
1480   display: inline;
1481   margin-right: $lineheight;
1482 }
1483
1484 .activity-block {
1485   clear: left;
1486   border-bottom: 1px solid #ccc;
1487   padding-bottom: $lineheight;
1488   float: left;
1489   h3 {
1490     margin-bottom: $lineheight/2;
1491   }
1492 }
1493
1494 .contact-activity {
1495   margin-top: $lineheight;
1496   width: 100%;
1497 }
1498
1499 .activity-details p {
1500   margin-left: 70px;
1501   margin-bottom: 0;
1502 }
1503
1504 #friends-container .contact-activity ul {
1505   margin-left: 70px;
1506 }
1507
1508 .user-view {
1509   // Silly exception; remove when user page is redesigned.
1510   .content-inner {
1511     max-width: none;
1512   }
1513   p#no_home_location {
1514     margin: $lineheight;
1515   }
1516   .user_thumbnail {
1517     margin-top: $lineheight/4;
1518     float: left;
1519   }
1520 }
1521
1522 /* Rules for the user map */
1523
1524 .content_map .leaflet-popup-content {
1525   margin: $lineheight/2;
1526   min-height: 50px;
1527 }
1528
1529 /* Rules for user popups on maps */
1530
1531 .user_popup {
1532   min-width: 200px;
1533   p {
1534     padding: 0 0 5px 0;
1535     margin-top: 0 0 0 60px;
1536     font-size: 12px;
1537   }
1538   img.user_thumbnail {
1539     float: left;
1540     margin: 0 $lineheight/2 0 0;
1541   }
1542 }
1543
1544 /* Rules for the user list */
1545
1546 #user_list {
1547   font-size: $lineheight/2;
1548   width: 100%;
1549
1550   tr {
1551     vertical-align: middle;
1552   }
1553
1554   p {
1555     margin-top: 0px;
1556     margin-bottom: 0px;
1557   }
1558 }
1559
1560 #user_list_actions {
1561   float: right;
1562   margin-top: $lineheight/2;
1563 }
1564
1565 /* Rules for the diary list page */
1566
1567 .diary_post {
1568   position: relative;
1569   margin-top: $lineheight/2;
1570   padding-top: $lineheight;
1571   border-top: 1px solid #ccc;
1572
1573   .post_heading {
1574     margin-bottom: $lineheight;
1575
1576     h2 {
1577       margin-top: 0;
1578       margin-bottom: $lineheight/2;
1579       font-size: 24px;
1580     }
1581   }
1582
1583   img.user_thumbnail {
1584     float: left;
1585   }
1586
1587   small.deemphasize {
1588     float: left;
1589     display: block;
1590   }
1591
1592   ul.secondary-actions {
1593     display: inline-block;
1594   }
1595 }
1596
1597 .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div
1598   display: inline;
1599 }
1600
1601 /* Rules for the diary entry page */
1602
1603 .diary_entry {
1604   #map {
1605     position: relative;
1606     width: 90%;
1607     height: 400px;
1608     border: 1px solid #ccc;
1609     display: none;
1610     margin-bottom: $lineheight;
1611   }
1612   #newcomment {
1613     border-top: 1px solid #ccc;
1614     padding-top: $lineheight;
1615     margin-top: $lineheight/2;
1616   }
1617   .comments {
1618     max-width: 740px;
1619   }
1620   .diary-comment {
1621     margin-top: $lineheight/2;
1622     border-top: 1px dashed #ccc;
1623     padding-top: $lineheight/2;
1624     &:first-child {
1625       margin-top: $lineheight;
1626       padding-top: $lineheight;
1627       border-top: 1px solid #ccc;
1628     }
1629     p {
1630       margin-bottom: $lineheight/2;
1631     }
1632     .comment-heading {
1633       margin-bottom: 0;
1634       margin-top: 0;
1635     }
1636   }
1637 }
1638
1639 .diary_entry-view img.user_thumbnail {
1640   float: left;
1641 }
1642
1643 /* Rules for the log in page */
1644
1645 #login_auth_buttons {
1646   margin-bottom: 0;
1647 }
1648
1649 #login_auth_buttons li {
1650   float: left;
1651   padding: $lineheight/4 $lineheight/2;
1652 }
1653
1654 /* Rules for the account confirmation page */
1655
1656 .user-terms {
1657   .legale {
1658     border: 1px solid #ccc;
1659     padding: $lineheight;
1660     margin-bottom: $lineheight;
1661     overflow: auto;
1662     height: 20em;
1663   }
1664
1665   #decline {
1666     background: $lightblue;
1667     &:hover {
1668       background: darken($lightblue, $hovercolor);
1669     }
1670   }
1671 }
1672
1673 /* Rules for the account settings page */
1674
1675 #accountForm .user_map {
1676   position: relative;
1677   width: 500px;
1678   height: 400px;
1679   border: 1px solid #ccc;
1680 }
1681
1682 #accountForm .user_image {
1683   margin-bottom: 0;
1684 }
1685
1686 #accountForm #user_image {
1687   margin-left: 20px;
1688 }
1689
1690 #accountForm ul.accountImage-options {
1691   margin-left: 120px;
1692 }
1693
1694 .nohome .location {
1695   display: none;
1696 }
1697
1698 #homerow .message {
1699   display: none;
1700 }
1701
1702 .nohome .message {
1703   display: inline !important;
1704 }
1705
1706 .content_map.settings_map {
1707   width: 50%;
1708   float: none;
1709 }
1710
1711 /* Rules for the oauth settings page */
1712
1713 .oauth_clients .buttons .oauth-edit {
1714   border-radius: 2px 0 0 2px;
1715 }
1716
1717 .oauth_clients .buttons .oauth-delete {
1718   border-radius: 0 2px 2px 0;
1719 }
1720
1721 /* Rules for messages pages */
1722
1723 .messages {
1724   width: 100%;
1725   border: 1px solid #ddd;
1726
1727   input[type="submit"] {
1728     margin: auto;
1729   }
1730   tbody tr {
1731     border-top: 1px solid #ccc;
1732   }
1733
1734   .inbox-row {
1735     background: #f8f8ff;
1736   }
1737
1738   .inbox-row-unread {
1739     background:#CBEEA7;
1740   }
1741
1742   .right {
1743     float: right;
1744   }
1745
1746   tr td,
1747   tr th {
1748     padding: $lineheight/4;
1749   }
1750   p:last-child,
1751   h2:last-child,
1752   h3:last-child,
1753   ol:last-child,
1754   ul:last-child {
1755     margin-bottom:0;
1756   }
1757   tr td {
1758     height: 30px;
1759     border-right: 1px solid $lightgrey;
1760   }
1761 }
1762
1763 .inbox-row .inbox-mark-read {
1764   display: none;
1765 }
1766
1767 .info-line {
1768   margin-bottom: $lineheight;
1769   padding: $lineheight/4 0px 4px 0px;
1770   border-bottom: 1px solid #ccc;
1771
1772   form, form div {
1773     display: inline;
1774   }
1775 }
1776
1777 .info-line .user_thumbnail_tiny {
1778   vertical-align: middle;
1779 }
1780
1781 .inbox-sent {
1782   white-space: nowrap;
1783 }
1784
1785 .inbox-mark-unread,
1786 .inbox-mark-read,
1787 .inbox-delete {
1788   width: 1%;
1789 }
1790
1791 .inbox-row-unread .inbox-mark-unread {
1792   display: none;
1793 }
1794
1795 .message-read .message-buttons {
1796   margin-top: $lineheight;
1797   margin-bottom: $lineheight * 1.5;
1798   padding-top: $lineheight;
1799   border-top: 1px solid $lightgrey;
1800 }
1801
1802 .message-read .buttons .mark-unread-button {
1803   border-radius: 0;
1804 }
1805
1806 /* Rules for "flash" notice boxes shown at the top of the content area */
1807
1808 .flash {
1809   padding: $lineheight;
1810
1811   &.error {
1812     background-color: #ff7070;
1813   }
1814
1815   &.warning {
1816     background-color: #ffe0cc;
1817   }
1818
1819   &.notice {
1820     background-color: #CBEEA7;
1821   }
1822
1823   div.message {
1824     display: inline-block;
1825     margin-left: $lineheight / 2;
1826     vertical-align: middle;
1827   }
1828 }
1829
1830 /* Rules for highlighting fields with rails validation errors */
1831
1832 .formError {
1833   display: inline-block;
1834   padding: 5px 10px;
1835   margin-top: 5px;
1836   border-radius: 4px;
1837   font-size: 12px;
1838   color: #fff;
1839   background-color: #ff7070;
1840 }
1841
1842 /* Rules for rails validation error boxes */
1843
1844 #errorExplanation {
1845   width: 400px;
1846   border: 2px solid #ff7070;
1847   padding: 0 $lineheight/2;
1848   margin-bottom: $lineheight;
1849   background-color: #f0f0f0;
1850
1851   h2 {
1852     margin: 0 -10px 10px -10px;
1853     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1854     font-weight: bold;
1855     font-size: 12px;
1856     background-color: #c00;
1857     color: #fff;
1858     text-align: left;
1859   }
1860
1861   p {
1862     color: #333;
1863     margin-bottom: 0px;
1864     padding: $lineheight/4;
1865   }
1866
1867   ul {
1868     padding-left: $lineheight;
1869
1870     li {
1871       font-size: 12px;
1872       list-style: disc;
1873     }
1874   }
1875 }
1876
1877 /* Rules for forms */
1878
1879 .standard-form {
1880   fieldset {
1881     margin-bottom: $lineheight;
1882   }
1883   label.standard-label {
1884     display: block;
1885     margin-bottom: $lineheight/4;
1886     font-size: $typeheight;
1887     font-weight: bold;
1888     line-height: 1.5;
1889   }
1890   label.standard-label.secondary {
1891     display: inline-block;
1892     font-weight: normal;
1893   }
1894   .form-help {
1895     font-weight: normal;
1896   }
1897   .form-column {
1898     float: left;
1899     margin-right: 20px;
1900   }
1901   .form-divider {
1902     margin-top: $lineheight;
1903     padding-top: $lineheight;
1904     border-top: 1px solid $lightgrey;
1905   }
1906   .horizontal-list .form-row {
1907     float: left;
1908     padding-right: 10px;
1909   }
1910   .form-row {
1911     margin-bottom: $lineheight/2;
1912   }
1913   .form-list {
1914     margin-bottom: 0;
1915   }
1916   .form-list li {
1917     margin-bottom: 5px;
1918    }
1919   input[type="checkbox"],
1920   input[type="radio"] {
1921     float: left;
1922     margin-top: 5px;
1923   }
1924 }
1925
1926 #remember_me_openid {
1927   display: block;
1928 }
1929
1930 select {
1931   padding: 2px;
1932 }
1933
1934 input[type="checkbox"],
1935 input[type="radio"] {
1936     margin-right: 5px;
1937 }
1938
1939 input[type="text"],
1940 input[type="email"],
1941 input[type="url"],
1942 input[type="password"],
1943 textarea {
1944   color: #222;
1945   background-color: #fff;
1946   border: 1px solid #ccc;
1947   padding: 2px 5px;
1948   margin: 0;
1949   width: 200px;
1950
1951   &.field_with_errors {
1952     border: 2px solid #ff7070;
1953   }
1954 }
1955
1956 textarea {
1957   padding: 5px;
1958   width: 100%;
1959 }
1960
1961 /* Rules for user images */
1962
1963 img.user_image {
1964   max-width: 100px;
1965   max-height: 100px;
1966   border: 1px solid #ccc;
1967   margin-bottom: $lineheight;
1968   float: left;
1969   margin-right: $lineheight;
1970 }
1971
1972 img.user_thumbnail {
1973   max-width: 50px;
1974   max-height: 50px;
1975   border: 1px solid #ccc;
1976   margin-right: $lineheight;
1977 }
1978
1979 img.user_thumbnail_tiny {
1980   width: auto;
1981   height: auto;
1982   max-width: 25px;
1983   max-height: 25px;
1984   border: 1px solid #ccc;
1985 }
1986
1987 /* Rules for geo microformats */
1988
1989 abbr.geo {
1990   border-bottom: none;
1991 }
1992
1993 /* Rules for RSS buttons */
1994
1995 .rsssmall {
1996   position: relative;
1997   top: 3px;
1998 }
1999
2000 /* General styles for action lists / subnavs / pager navs */
2001
2002 ul.secondary-actions {
2003   font-style: normal;
2004   margin-bottom: 0;
2005   margin-left: 0;
2006   &.pager {
2007     display: inline-block;
2008     margin-right: 60px;
2009   }
2010   > li {
2011     display: block;
2012     float: left;
2013     list-style: none;
2014     border-left: 1px solid #ccc;
2015     padding-left: $lineheight/2;
2016     margin-right: $lineheight/2;
2017     &:first-child {
2018       border-left: 0;
2019       padding-left: 0;
2020     }
2021     &:last-child {
2022       margin-right: 0px;
2023     }
2024   }
2025 }
2026
2027 div.secondary-actions {
2028   padding: 10px;
2029   text-align: center;
2030 }
2031
2032 /* Utility for managing inner content areas */
2033
2034 .inner22 { padding: $lineheight;}
2035
2036 .inner12 { padding: $lineheight/2 $lineheight;}
2037
2038 .inner11 { padding: $lineheight/2;}
2039
2040 .inner20 { padding: $lineheight 0;}
2041
2042 .inner02 { padding: 0 $lineheight;}
2043
2044 /* Utility for general button styles */
2045
2046 input[type="button"],
2047 input[type="submit"],
2048 input[type="reset"],
2049 a.button {
2050   cursor: pointer;
2051   border: 0;
2052   display: inline-block;
2053   padding: $lineheight/4 $lineheight/2;
2054   min-height: 20px + $lineheight/2;
2055   min-width: 120px;
2056   margin: 0 0 $lineheight/2 0;
2057   color: white;
2058   background: $blue;
2059   text-align: center;
2060   border-radius: 2px;
2061   &:hover {
2062     background: darken($blue, $hovercolor);
2063     text-decoration: none;
2064   }
2065   &.deemphasize {
2066     background: $lightblue;
2067     &:hover {
2068       background: darken($lightblue, $hovercolor);
2069     }
2070   }
2071   &:disabled {
2072     background: $lightgrey;
2073     &:hover {
2074       background: $lightgrey;
2075     }
2076   }
2077   &:last-child {
2078     margin-bottom: 0;
2079   }
2080 }
2081
2082 input[type="button"],
2083 input[type="submit"],
2084 input[type="reset"] {
2085   line-height: normal;
2086 }
2087
2088 a.button {
2089   line-height: 20px;
2090 }
2091
2092 .buttons {
2093   min-width: 200px;
2094   input[type="submit"],
2095   input[type="button"],
2096   input[type="reset"],
2097   .button,
2098   .button_to {
2099     box-sizing: border-box;
2100     float: left;
2101     border-radius: 0;
2102     margin:0;
2103     min-width: 75px;
2104     max-width: 180px;
2105     border-right:1px solid white;
2106     text-overflow: ellipsis;
2107     white-space: nowrap;
2108     overflow: hidden;
2109   }
2110   input:first-child,
2111   .button:first-child,
2112   .button_to:first-child {
2113     border-radius:2px 0 0 2px;
2114   }
2115   input:last-child,
2116   .button:last-child,
2117   .button_to:last-child {
2118     border-radius:0 2px 2px 0;
2119     border-right-width: 0;
2120   }
2121   input:only-child,
2122   .button:only-child,
2123   .button_to:only-child,
2124   *[value="Hide"] + input:last-child,
2125   *[value="Hide"] + .button:last-child,
2126   *[value="Hide"] + .button_to:last-child {
2127     border-radius:2px;
2128     border-right-width: 0;
2129   }
2130     /* if a 3-button set has a hidden middle button */
2131   *[value="Hide"] + input:nth-child(3),
2132   *[value="Hide"] + .button:nth-child(3),
2133   *[value="Hide"] + .button_to:nth-child(3) {
2134     border-radius:0 2px 2px 0;
2135     border-right-width: 0;
2136   }
2137   /* if a 3-button set starts with a hidden button */
2138   *[value="Hide"] + input:nth-child(2):not(:last-child),
2139   *[value="Hide"] + .button:nth-child(2):not(:last-child),
2140   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
2141     border-radius:2px 0 0 2px;
2142     border-right-width: 1px;
2143   }
2144 }
2145
2146 /* Rules for doing distinct colour of alternate table rows */
2147
2148 .table0,
2149 .item0 {
2150   background: $offwhite;
2151 }
2152
2153 .table1,
2154 .item1 {
2155   background: #fff;
2156 }
2157
2158 /* Rules for OpenID logo */
2159
2160 .openid_logo {
2161   vertical-align: text-bottom;
2162   border: 0;
2163 }
2164
2165 /* Rules for rich text */
2166
2167 .richtext,
2168 .prose {
2169   h1, h2 {
2170     padding-bottom: $lineheight/2;
2171     border-bottom: 1px dashed #cccccc;
2172     margin-bottom: $lineheight/2;
2173   }
2174
2175   h1 {
2176     font-size: 24px;
2177   }
2178
2179   h2 {
2180     font-size: 18px;
2181   }
2182
2183   h3 {
2184     font-size: $typeheight;
2185   }
2186
2187   code {
2188     font-size: 13px;
2189     background: #e8e8e8;
2190     padding: 2px 3px;
2191   }
2192
2193   pre {
2194     font-size: 13px;
2195     background: #e8e8e8;
2196     padding: 2px 3px;
2197
2198     code {
2199       padding: 0;
2200     }
2201   }
2202
2203   img {
2204     padding: $lineheight;
2205     background-color: $offwhite;
2206     display: block;
2207     max-width: 100%;
2208     margin: auto;
2209   }
2210
2211   blockquote {
2212     border-left: $lineheight solid $offwhite;
2213     padding-left: $lineheight;
2214     margin: 0;
2215     color: #7E7E7E;
2216   }
2217
2218   ul, ol {
2219     padding-left: $lineheight;
2220     margin-bottom: $lineheight;
2221     margin-left: $lineheight;
2222   }
2223
2224   ul li {
2225     list-style: disc;
2226   }
2227
2228   ol li {
2229     list-style: decimal;
2230   }
2231 }
2232
2233 .diary_post .richtext {
2234     margin-top: $lineheight;
2235   }
2236
2237 .comments .richtext {
2238   margin-left: 70px;
2239   margin-top: 0;
2240 }
2241
2242 /* Rules for rich text editors */
2243
2244 input.richtext_title[type="text"] {
2245   width: 50%;
2246   width: calc(100% - 235px);
2247
2248   @media only screen and (max-width:768px) {
2249     width: 100%;
2250   }
2251 }
2252
2253 .richtext_container {
2254   margin-bottom: $lineheight;
2255
2256   .richtext_content {
2257     width: 50%;
2258     width: calc(100% - 235px);
2259     display: inline-block;
2260     vertical-align: top;
2261
2262     @media only screen and (max-width:768px) {
2263       width: 100%;
2264     }
2265
2266     .richtext_preview {
2267       display: inline-block;
2268       padding: $lineheight;
2269       background-color: $offwhite;
2270       overflow-x: auto;
2271
2272       &.loading {
2273         background-image: image-url("loading.gif");
2274         background-repeat: no-repeat;
2275         background-position: center;
2276       }
2277
2278       > :first-child {
2279         margin-top: 0px;
2280       }
2281     }
2282   }
2283
2284   .richtext_help {
2285     display: inline-block;
2286     vertical-align: top;
2287     margin-left: 15px;
2288     background-color: #f8f8ff;
2289     padding: $lineheight/2;
2290     width: 220px;
2291
2292     ul {
2293       margin-bottom: 0;
2294     }
2295
2296     h4.heading, li {
2297       border-bottom: 1px solid #ccc;
2298       margin-bottom: $lineheight/4;
2299       padding-bottom: $lineheight/4;
2300     }
2301
2302     li h4, li span, li p {
2303       display: inline-block;
2304       vertical-align: top;
2305       font-size: 11px;
2306     }
2307
2308     li h4 {
2309       width: 40%;
2310       margin: 0;
2311     }
2312
2313     li span, li p {
2314       width: 50%;
2315       margin-left: $lineheight/2;
2316       margin-bottom: $lineheight/4;
2317       white-space: nowrap;
2318     }
2319   }
2320 }
2321
2322 /* Rules for the user notes list */
2323
2324 .note_list {
2325   tr.creator {
2326     background-color: #eeeeee;
2327   }
2328
2329   td {
2330     padding: 3px;
2331   }
2332
2333   p {
2334     margin-bottom: 0px;
2335   }
2336 }
2337
2338 /* Rules for the iD editor */
2339
2340 .id-embed {
2341   width: 100%;
2342   height: 100%;
2343 }
2344
2345 /* Rules for dropdown menus */
2346
2347 .dropdown {
2348   position: relative;
2349 }
2350
2351 .dropdown-toggle {
2352   *margin-bottom: -3px;
2353 }
2354
2355 .dropdown-toggle:active,
2356 .open .dropdown-toggle {
2357   outline: 0;
2358 }
2359
2360 .caret {
2361   display: inline-block;
2362   width: 0;
2363   height: 0;
2364   vertical-align: top;
2365   border-top: 4px solid #000000;
2366   border-right: 4px solid transparent;
2367   border-left: 4px solid transparent;
2368   content: "";
2369 }
2370
2371 .dropdown .caret {
2372   margin-top: 8px;
2373   margin-left: 2px;
2374 }
2375
2376 .dropdown-menu {
2377   position: absolute;
2378   top: 100%;
2379   left: -1px;
2380   z-index: 1000;
2381   display: none;
2382   float: left;
2383   min-width: 160px;
2384   padding: 5px 0;
2385   margin: 0;
2386   list-style: none;
2387   background-color: #ffffff;
2388   border: 1px solid #ccc;
2389   border-radius: 0 3px 3px;
2390   *border-right-width: 2px;
2391   *border-bottom-width: 2px;
2392   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
2393   background-clip: padding-box;
2394 }
2395
2396 .dropdown-menu.pull-right {
2397   right: 0;
2398   left: auto;
2399 }
2400
2401 .dropdown-menu .divider {
2402   *width: 100%;
2403   height: 1px;
2404   margin: 9px 1px;
2405   *margin: -5px 0 5px;
2406   overflow: hidden;
2407   background-color: #e5e5e5;
2408   border-bottom: 1px solid #ffffff;
2409 }
2410
2411 .dropdown-menu > li > a {
2412   display: block;
2413   padding: 3px 10px;
2414   clear: both;
2415   font-weight: normal;
2416   line-height: 20px;
2417   color: #333333;
2418   white-space: nowrap;
2419 }
2420
2421 .dropdown-menu > li > a:hover,
2422 .dropdown-menu > li > a:focus,
2423 .dropdown-submenu:hover > a,
2424 .dropdown-submenu:focus > a {
2425   color: #ffffff;
2426   text-decoration: none;
2427   background-color: $green;
2428 }
2429
2430 .dropdown-menu > .active > a,
2431 .dropdown-menu > .active > a:hover,
2432 .dropdown-menu > .active > a:focus {
2433   color: #ffffff;
2434   text-decoration: none;
2435   background-color: $green;
2436   outline: 0;
2437 }
2438
2439 .dropdown-menu > .disabled > a,
2440 .dropdown-menu > .disabled > a:hover,
2441 .dropdown-menu > .disabled > a:focus {
2442   color: #999999;
2443 }
2444
2445 .dropdown-menu > .disabled > a:hover,
2446 .dropdown-menu > .disabled > a:focus {
2447   text-decoration: none;
2448   cursor: default;
2449   background-color: transparent;
2450   background-image: none;
2451 }
2452
2453 .open {
2454   *z-index: 1000;
2455 }
2456
2457 .open > .dropdown-menu {
2458   display: block;
2459 }
2460
2461 .dropdown-backdrop {
2462   position: fixed;
2463   top: 0;
2464   right: 0;
2465   bottom: 0;
2466   left: 0;
2467   z-index: 990;
2468 }
2469
2470 /* Rules for the "Welcome" page */
2471 .site-welcome, .site-fixthemap {
2472   .center {
2473     text-align: center;
2474     .sprite {
2475       float: none;
2476       margin: auto;
2477     }
2478   }
2479
2480   .sprite {
2481     background-image: image-url("welcome-sprite.png");
2482     background-size: 500px 250px;
2483     display: block;
2484     float: left;
2485   }
2486
2487   .icon-list {
2488     padding-bottom: 20px;
2489     div {
2490       margin-bottom: 10px;
2491       p {
2492         padding-top: 10px;
2493       }
2494     }
2495   }
2496   .sprite.small {
2497     width: 50px;
2498     height: 50px;
2499   }
2500
2501   .sprite.x {
2502     background-position: -50px 0;
2503   }
2504
2505   .sprite.term {
2506     margin-right: 10px;
2507     vertical-align: middle;
2508   }
2509
2510   .sprite.node {
2511     background-position: -100px 0;
2512   }
2513
2514   .sprite.way {
2515     background-position: -150px 0;
2516   }
2517
2518   .sprite.tag {
2519     background-position: -200px 0;
2520   }
2521
2522   .sprite.editor {
2523     background-position: -250px 0;
2524   }
2525
2526   .sprite.question {
2527     background-position: -300px 0;
2528   }
2529
2530   .sprite.rules {
2531     background-position: -350px 0;
2532   }
2533
2534   .start-mapping {
2535     margin: auto;
2536     cursor: pointer;
2537     border: none;
2538     padding: 20px 40px;
2539     font-size: 30px;
2540     text-decoration: none;
2541   }
2542
2543   .note-box {
2544     margin-top: 20px;
2545     background-color: $offwhite;
2546   }
2547
2548   .icon.note {
2549     background-color: #333;
2550     border-radius: 4px;
2551   }
2552 }
2553
2554 .site-about #content {
2555   //background-color: #000;
2556   background-color: #eee;
2557   background-position: 50% 50%;
2558   background-repeat: no-repeat;
2559   background-size: cover;
2560   background-attachment: fixed;
2561
2562   .caption {
2563     max-width: 200px;
2564     font: 13px/20px Helvetica, Arial, sans-serif;
2565     position: fixed;
2566     text-align: right;
2567     right: 20px;
2568     bottom: 60px;
2569     text-shadow: #000 0px 1px 5px;
2570     color: #eee;
2571     opacity: 0.8;
2572     display: none;
2573   }
2574
2575   .caption a {
2576     color: white;
2577     white-space: nowrap;
2578     text-decoration: none;
2579   }
2580
2581   a.next {
2582     display: block;
2583     position: fixed;
2584     right: 10px;
2585     bottom: 10px;
2586     width: 40px;
2587     height: 40px;
2588     border-radius: 5px;
2589     text-indent: -9999px;
2590     overflow: hidden;
2591     background: image-url('about/sprite.png') -120px 0px no-repeat;
2592     background-color: #000;
2593     background-color: rgba(0, 0, 0, 0.5);
2594   }
2595
2596   .content-inner {
2597     position: relative;
2598     color: #333;
2599     min-width: 320px;
2600     max-width: 640px;
2601
2602     .section {
2603       margin-bottom: 30px;
2604     }
2605
2606     .section:last-child {
2607       margin-bottom: 0;
2608     }
2609   }
2610
2611   .text {
2612     background: white;
2613     padding: 40px;
2614   }
2615
2616   .attr {
2617     position: relative;
2618     padding: 170px 40px 20px;
2619     background: #333;
2620     background: rgba(0, 0, 0, .8);
2621     margin-bottom: 0;
2622     margin-top: -20px;
2623
2624     h1 {
2625       display: block;
2626       color: white;
2627       font-weight: 300;
2628       font-size: 34px;
2629       span {
2630         color: #76c551;
2631       }
2632     }
2633
2634     .user-image {
2635       position: absolute;
2636       top: 0px;
2637       right: 240px;
2638       left: 0px;
2639       height: 150px;
2640       background-position: 0 50%;
2641       background-repeat: no-repeat;
2642       background-image: image-url('about/osm.png');
2643       background-size: cover;
2644       background-color: #76c551;
2645     }
2646
2647     .byosm {
2648       position: absolute;
2649       top: 0px;
2650       right: 0px;
2651       z-index: 1;
2652       width: 240px;
2653       height: 150px;
2654       padding: 20px 20px 20px 40px;
2655       font: 500 20px/24px Helvetica, Arial, sans-serif;
2656       white-space: nowrap;
2657       color: #fff;
2658       background: #76c551;
2659     }
2660
2661     .byosm span {
2662       display: inline-block;
2663       width: 20px;
2664       margin-left: -20px;
2665     }
2666   }
2667
2668   h2 {
2669     margin-bottom: 10px;
2670   }
2671
2672   .icon {
2673     width: 30px;
2674     height: 30px;
2675     margin-right: 10px;
2676     vertical-align: middle;
2677     background: 40px 40px image-url('about/sprite.png') no-repeat;
2678
2679     &.local        { background-position: 0px    0px; }
2680     &.community    { background-position: 0px  -40px; }
2681     &.open         { background-position: 0px  -80px; }
2682     &.partners     { background-position: 0px -120px; }
2683     &.infringement { background-position: 0px -160px; }
2684     &.legal        { background-position: -45px -160px; }
2685   }
2686 }
2687
2688 @import 'browse';
2689
2690 @media only screen and (max-width:960px) {
2691   .header-illustration.new-user-arm {
2692     display: none;
2693   }
2694 }