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