]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Added 'Reverse Directions' link
[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      { background-position: 0 0; }
167 .icon.donate      { background-position: -20px 0; }
168 .icon.zoomin      { background-position: -40px 0; }
169 .icon.zoomout     { background-position: -60px 0; }
170 .icon.geolocate   { background-position: -80px 0; }
171 .active .icon.geolocate   { background-position: -80px -20px; }
172 .icon.layers      { background-position: -100px 0; }
173 .icon.key         { background-position: -120px 0; }
174 .icon.share       { background-position: -140px 0; }
175 .icon.clipboard   { background-position: -160px 0; }
176 .icon.link        { background-position: -180px 0; }
177 .icon.close       { background-position: -200px 0; }
178 .close-wrap:hover .icon.close,
179 .icon.close:hover { background-position: -200px -20px; }
180 .icon.check       { background-position: -220px 0; }
181 .icon.note        { background-position: -240px 0; }
182 .icon.note.grey   { background-position: -240px -20px; }
183 .icon.query       { 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   a.reverse_directions {
1007     cursor: pointer;
1008     margin: 0px 0px 5px 25px;
1009   }
1010 }
1011
1012 /* Rules for the map key which appears in the popout sidebar */
1013
1014 #mapkey {
1015  .mapkey-table-key img {
1016     display: block;
1017     margin-left: auto;
1018     margin-right: auto;
1019   }
1020   td {
1021     padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
1022   }
1023 }
1024
1025 /* Rules for search sidebar */
1026
1027 .search_results_entry {
1028   ul li {
1029     border-bottom: $keyline;
1030     cursor: pointer;
1031     &:first-child { border-top: $keyline; }
1032     &.selected { background: $list-highlight; }
1033   }
1034
1035   .search_details {
1036     display: block;
1037     float: right;
1038     text-align: right;
1039     margin-top: 0.2em;
1040     margin-left: 0.5em;
1041   }
1042 }
1043
1044 .search_results_error {
1045   color: #f00;
1046   padding: 10px 20px;
1047 }
1048
1049 /* Rules for routing */
1050
1051 #sidebar_content>table {
1052     padding: 5px 20px 10px 15px;
1053     width: 100%;
1054     border-collapse: separate;
1055 }
1056
1057 div.direction {
1058   background-image: image-url('routing-sprite.png');
1059   width: 20px;
1060   height: 20px;
1061   background-repeat: no-repeat;
1062 }
1063 @for $i from 0 through 25 {
1064 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
1065 }
1066
1067 p#routing_summary {
1068     padding: 0 $lineheight $lineheight/4;
1069 }
1070
1071 td.instruction, td.distance {
1072     padding-top: $lineheight/5;
1073     padding-bottom: $lineheight/5;
1074     border-bottom: 1px solid #DDD;
1075 }
1076 td.distance {
1077     color: #BBB;
1078     text-align: right;
1079     font-size: x-small;
1080 }
1081 tr.turn {
1082     cursor: pointer;
1083 }
1084 tr.turn:hover {
1085     background: $list-highlight;
1086 }
1087 .routing_engines, #route_from, #route_to { margin-left: 25px; }
1088 .routing_marker { width: 15px; position: absolute; cursor: move; }
1089
1090 /* Rules for entity history */
1091
1092 #sidebar_content {
1093   .browse_details {
1094     position: relative;
1095     border-bottom: $keyline;
1096   }
1097 }
1098
1099 .browse_status {
1100   display: none;
1101 }
1102
1103 /* Rules for the history sidebar */
1104
1105 #sidebar .changesets {
1106   li {
1107     padding: 15px 20px;
1108     border-bottom: 1px solid #ddd;
1109     cursor: pointer;
1110
1111     &.selected { background: $list-highlight; }
1112     /* color is derived from changeset bbox fillColor in history.js */
1113   }
1114
1115   h4 {
1116     margin: 0;
1117     a {
1118       color: #000;
1119     }
1120   }
1121
1122   .comments {
1123     float: right;
1124     color: #999;
1125   }
1126
1127   .comments-0 {
1128     opacity: 0.5;
1129   }
1130 }
1131
1132 /* Rules for the browse sidebar */
1133
1134 #sidebar_content {
1135   .browse-section {
1136     padding: $lineheight/2 $lineheight;
1137     border-bottom: 1px solid #ddd;
1138
1139     h4:first-child {
1140       margin-top: 0;
1141       word-wrap: break-word;
1142     }
1143   }
1144
1145   .browse-section:last-of-type {
1146     border-bottom: none;
1147   }
1148
1149   .paginate {
1150     float: right;
1151     padding: 1px 6px;
1152     border: 1px solid #eee;
1153     border-radius: 3px;
1154   }
1155
1156   .paginate ul {
1157     padding-left: 20px;
1158   }
1159
1160   .browse-field {
1161     margin-bottom: 10px;
1162
1163     h4 {
1164       padding: 5px 0 5px 10px;
1165       font-size: 12px;
1166       border: 1px solid #CCC;
1167       border-radius: 4px 4px 0 0;
1168       background-color: #F6F6F6;
1169     }
1170
1171     p {
1172       padding: 7px 10px;
1173       font-size: 12px;
1174       background-color: #FFF;
1175       border: 1px solid #CCC;
1176       border-top: 0;
1177       border-radius: 0 0 4px 4px;
1178     }
1179   }
1180
1181   .browse-tag-list {
1182     background-color: #F6F6F6;
1183     border: 1px solid #ddd;
1184     border-radius: 3px;
1185     font-size: 12px;
1186     table-layout: fixed;
1187     border-collapse: separate;
1188
1189     th, td {
1190       border-bottom: 1px solid #ddd;
1191     }
1192
1193     tr:last-child th, tr:last-child td {
1194       border-bottom: 0;
1195     }
1196
1197     .browse-tag-k,
1198     .browse-tag-v {
1199       width: 50%;
1200       padding: 6px 10px;
1201       word-wrap: break-word;
1202       white-space: pre-wrap;
1203     }
1204
1205     .browse-tag-k {
1206       font-weight: 500;
1207       background-color: #F6F6F6;
1208     }
1209
1210     .browse-tag-v {
1211       border-left: 1px solid #ddd;
1212       background-color: #fff;
1213     }
1214   }
1215
1216   .warning {
1217     margin: $lineheight/2 0;
1218     padding: $lineheight/2;
1219     font-size: 90%;
1220   }
1221
1222   .note-comments li, .changeset-comments li {
1223     margin: $lineheight/2 0;
1224
1225     p {
1226       margin-left: 10px;
1227     }
1228   }
1229
1230   .comments-header {
1231     float: left;
1232   }
1233
1234   .subscribe-buttons {
1235     float: left;
1236     margin: 18px 10px 10px;
1237     min-width: 80px;
1238   }
1239
1240   .subscribe-buttons input {
1241     font-size: 90%;
1242     line-height: 15px;
1243     min-height: 20px;
1244   }
1245
1246   span.action-button:hover {
1247     cursor: pointer;
1248     text-decoration: underline;
1249   }
1250
1251   .note-description {
1252     overflow: hidden;
1253     margin: 0 0 10px 10px;
1254   }
1255
1256   .query-intro p {
1257     padding: $lineheight $lineheight $lineheight/2;
1258   }
1259
1260   .query-results {
1261     display: none;
1262
1263     h3 {
1264       padding: $lineheight $lineheight $lineheight/2;
1265       margin: 0;
1266     }
1267
1268     ul {
1269       li {
1270         padding: 15px 20px;
1271         border-bottom: 1px solid #ddd;
1272
1273         &.query-result {
1274           cursor: pointer;
1275         }
1276
1277         &.selected {
1278           background: $list-highlight;
1279         }
1280       }
1281     }
1282   }
1283 }
1284
1285 /* Rules for export sidebar */
1286
1287 .export_form {
1288   padding: $lineheight;
1289
1290   .export_area_inputs,
1291   .export_button {
1292     text-align: center;
1293   }
1294
1295   .export_area_inputs {
1296     margin-bottom: $lineheight/2;
1297     input[type="text"] {
1298       width: 80px;
1299       text-align: center;
1300       margin-bottom: 5px;
1301     }
1302   }
1303
1304   .export_boxy {
1305     background: #eee;
1306     border: 1px solid #ccc;
1307     border-radius: 3px;
1308
1309     #maxlat { margin-top: -1px; }
1310     #minlon {
1311       float: left;
1312       margin-left: -1px;
1313     }
1314     #maxlon {
1315       float: right;
1316       margin-right: -1px;
1317     }
1318     #minlat { margin-bottom: 0; }
1319   }
1320
1321   .export_bound {
1322     margin: $lineheight/4;
1323   }
1324
1325   .export_button {
1326     margin-top: $lineheight;
1327     margin-bottom: $lineheight;
1328   }
1329
1330   dl {
1331     padding-left: $lineheight/2;
1332     dd {
1333       margin-left: 0;
1334       margin-bottom: 10px;
1335     }
1336   }
1337 }
1338
1339 /* Rules for the routing sidebar */
1340
1341 #sidebar_content {
1342   #routing_credit {
1343     text-align: center;
1344     padding: 0.5em;
1345   }
1346 }
1347
1348 /* Rules for edit pages */
1349
1350 .site-edit {
1351   #content {
1352     position: absolute;
1353     top: $headerHeight;
1354     bottom: 0;
1355     width: 100%;
1356   }
1357
1358   #map {
1359     height: 100%;
1360     overflow: hidden;
1361   }
1362 }
1363
1364 /* Rules for non-map content pages */
1365
1366 .content-heading {
1367   background: $lightgrey;
1368
1369   h1 { font-size: 22px; }
1370 }
1371
1372 .content-body {
1373   h1, h2, h3, p, ul, ol {
1374     margin-bottom: $lineheight;
1375   }
1376
1377   h1, h2, h3 {
1378     margin-top: $lineheight/2;
1379   }
1380 }
1381
1382 .content-inner {
1383   position: relative;
1384   max-width: 900px;
1385   margin: auto;
1386   padding: $lineheight;
1387 }
1388
1389 /* Overrides for pages that use new layout conventions */
1390
1391 .user-new,
1392 .user-create,
1393 .user-terms {
1394   .content-body .content-inner {
1395     padding: 0;
1396
1397     .message {
1398       margin-top: 80px;
1399       padding: 20px;
1400     }
1401   }
1402 }
1403
1404 .user-new,
1405 .user-create,
1406 .user-terms,
1407 .user-confirm {
1408   .content-heading .content-inner {
1409     height: 200px;
1410   }
1411 }
1412
1413 .header-illustration {
1414   background-position: 0 0;
1415   background-repeat: no-repeat;
1416   position: absolute;
1417   height: 200px;
1418   width: 100%;
1419   left: 0;
1420   bottom: 0;
1421
1422   &.new-user-main {
1423     background-image: image-url("sign-up-illustration.png");
1424   }
1425
1426   &.confirm-main {
1427     background-image: image-url("confirm-illustration.png");
1428   }
1429
1430   &.new-user-terms {
1431     background-image: image-url("terms-illustration.png");
1432   }
1433
1434   &.new-user-arm {
1435     height: 110px;
1436     width: 130px;
1437     left: 260px;
1438     top: 160px;
1439     background-image: image-url("sign-up-illustration-arm.png");
1440     z-index: 100;
1441   }
1442 }
1443
1444 #content.maximised {
1445   top: 0;
1446   left: 0;
1447   right: 0;
1448   bottom: 0;
1449   border: 0;
1450   z-index: 2000;
1451 }
1452
1453 /* Rules for small maps in content areas */
1454
1455 .content_map {
1456   position: relative;
1457   width: 45%;
1458   height: 400px;
1459   border: 1px solid #ccc;
1460   margin-bottom: $lineheight;
1461   float: right;
1462 }
1463
1464 /* Rules for the trace list shown by the traces tab etc */
1465
1466 #trace_list {
1467   font-size: $lineheight/2;
1468   border-width: 0px;
1469   text-align: right;
1470
1471   .trace_summary {
1472     font-size: 12px;
1473     color: gray;
1474   }
1475
1476   .trace_pending {
1477     color: red;
1478   }
1479
1480   .trace_public {
1481     color: green;
1482   }
1483
1484   .trace_identifiable {
1485     color: green;
1486   }
1487
1488   .trace_trackable {
1489     color: red;
1490   }
1491
1492   .trace_private {
1493     color: red;
1494   }
1495 }
1496
1497 /* Rules for the trace view */
1498
1499 .trace-view {
1500   .trace_pending {
1501     color: red;
1502   }
1503
1504   .geo {
1505     display: inline;
1506   }
1507 }
1508
1509 /* Rules for the new trace form */
1510
1511 #new_trace {
1512   input[type=text] {
1513     width: 50%;
1514     width: calc(100% - 150px);
1515     max-width: 500px;
1516   }
1517 }
1518
1519 /* Rules for the edit trace form */
1520
1521 .edit_trace {
1522   .form-row p {
1523     margin-bottom: 0px;
1524   }
1525
1526   input[type=text] {
1527     width: 50%;
1528     width: calc(100% - 150px);
1529     max-width: 500px;
1530   }
1531 }
1532
1533 /* Rules for the user profile page */
1534
1535 #userinformation {
1536
1537   min-height: 100px;
1538   .userinformation-inner {
1539     float: left;
1540   }
1541   h2 {
1542     margin-top: 0;
1543   }
1544   .user-description {
1545     width: 100%;
1546     clear: both;
1547   }
1548   .deemphasize {
1549     margin: 0;
1550   }
1551 }
1552
1553 .admin-user-info small {
1554   margin-bottom: $lineheight/2;
1555   display: inline;
1556   margin-right: $lineheight;
1557 }
1558
1559 .activity-block {
1560   clear: left;
1561   border-bottom: 1px solid #ccc;
1562   padding-bottom: $lineheight;
1563   float: left;
1564   h3 {
1565     margin-bottom: $lineheight/2;
1566   }
1567 }
1568
1569 .contact-activity {
1570   margin-top: $lineheight;
1571   width: 100%;
1572 }
1573
1574 .activity-details p {
1575   margin-left: 70px;
1576   margin-bottom: 0;
1577 }
1578
1579 #friends-container .contact-activity ul {
1580   margin-left: 70px;
1581 }
1582
1583 .user-view {
1584   // Silly exception; remove when user page is redesigned.
1585   .content-inner {
1586     max-width: none;
1587   }
1588   p#no_home_location {
1589     margin: $lineheight;
1590   }
1591   .user_thumbnail {
1592     margin-top: $lineheight/4;
1593     float: left;
1594   }
1595 }
1596
1597 /* Rules for the user map */
1598
1599 .content_map .leaflet-popup-content {
1600   margin: $lineheight/2;
1601   min-height: 50px;
1602 }
1603
1604 /* Rules for user popups on maps */
1605
1606 .user_popup {
1607   min-width: 200px;
1608   p {
1609     padding: 0 0 5px 0;
1610     margin-top: 0 0 0 60px;
1611     font-size: 12px;
1612   }
1613   img.user_thumbnail {
1614     float: left;
1615     margin: 0 $lineheight/2 0 0;
1616   }
1617 }
1618
1619 /* Rules for the user list */
1620
1621 #user_list {
1622   font-size: $lineheight/2;
1623   width: 100%;
1624
1625   tr {
1626     vertical-align: middle;
1627   }
1628
1629   p {
1630     margin-top: 0px;
1631     margin-bottom: 0px;
1632   }
1633 }
1634
1635 #user_list_actions {
1636   float: right;
1637   margin-top: $lineheight/2;
1638 }
1639
1640 /* Rules for the diary list page */
1641
1642 .diary_post {
1643   position: relative;
1644   margin-top: $lineheight/2;
1645   padding-top: $lineheight;
1646   border-top: 1px solid #ccc;
1647
1648   .post_heading {
1649     margin-bottom: $lineheight;
1650
1651     h2 {
1652       margin-top: 0;
1653       margin-bottom: $lineheight/2;
1654       font-size: 24px;
1655     }
1656   }
1657
1658   img.user_thumbnail {
1659     float: left;
1660   }
1661
1662   small.deemphasize {
1663     float: left;
1664     display: block;
1665   }
1666 }
1667
1668 .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div
1669   display: inline;
1670 }
1671
1672 .pagination {
1673   padding-top: $lineheight;
1674 }
1675
1676 /* Rules for the diary entry page */
1677
1678 .diary_entry {
1679   #map {
1680     position: relative;
1681     width: 90%;
1682     height: 400px;
1683     border: 1px solid #ccc;
1684     display: none;
1685     margin-bottom: $lineheight;
1686   }
1687   #newcomment {
1688     border-top: 1px solid #ccc;
1689     padding-top: $lineheight;
1690     margin-top: $lineheight/2;
1691   }
1692   .comments {
1693     max-width: 740px;
1694   }
1695   .diary-comment {
1696     margin-top: $lineheight/2;
1697     border-top: 1px dashed #ccc;
1698     padding-top: $lineheight/2;
1699     &:first-child {
1700       margin-top: $lineheight;
1701       padding-top: $lineheight;
1702       border-top: 1px solid #ccc;
1703     }
1704     p {
1705       margin-bottom: $lineheight/2;
1706     }
1707     .comment-heading {
1708       margin-bottom: 0;
1709       margin-top: 0;
1710     }
1711   }
1712 }
1713
1714 .diary_entry-view img.user_thumbnail {
1715   float: left;
1716 }
1717
1718
1719 .diary-subscribe-buttons {
1720   position:relative;
1721   top: -30px;
1722   left: 130px;
1723 }
1724
1725 /* Rules for the log in page */
1726
1727 #login_auth_buttons {
1728   margin-bottom: 0;
1729 }
1730
1731 #login_auth_buttons li {
1732   float: left;
1733   padding: $lineheight/4 $lineheight/2;
1734 }
1735
1736 /* Rules for the account confirmation page */
1737
1738 .user-terms {
1739   .legale {
1740     border: 1px solid #ccc;
1741     padding: $lineheight;
1742     margin-bottom: $lineheight;
1743     overflow: auto;
1744     height: 20em;
1745
1746     li {
1747       list-style: inherit;
1748     }
1749
1750     ol ol {
1751       list-style-type: lower-alpha;
1752     }
1753   }
1754
1755   #decline {
1756     background: $lightblue;
1757     &:hover {
1758       background: darken($lightblue, $hovercolor);
1759     }
1760   }
1761 }
1762
1763 /* Rules for the account settings page */
1764
1765 #accountForm .user_map {
1766   position: relative;
1767   width: 500px;
1768   height: 400px;
1769   border: 1px solid #ccc;
1770 }
1771
1772 #accountForm .user_image {
1773   margin-bottom: 0;
1774 }
1775
1776 #accountForm #user_image {
1777   margin-left: 20px;
1778 }
1779
1780 #accountForm ul.accountImage-options {
1781   margin-left: 120px;
1782 }
1783
1784 .nohome .location {
1785   display: none;
1786 }
1787
1788 #homerow .message {
1789   display: none;
1790 }
1791
1792 .nohome .message {
1793   display: inline !important;
1794 }
1795
1796 .content_map.settings_map {
1797   width: 50%;
1798   float: none;
1799 }
1800
1801 /* Rules for the oauth settings page */
1802
1803 .oauth_clients .buttons .oauth-edit {
1804   border-radius: 2px 0 0 2px;
1805 }
1806
1807 .oauth_clients .buttons .oauth-delete {
1808   border-radius: 0 2px 2px 0;
1809 }
1810
1811 /* Rules for the oauth authorization page */
1812
1813 .oauth-authorize ul {
1814   list-style: none;
1815 }
1816
1817 /* Rules for messages pages */
1818
1819 .messages {
1820   width: 100%;
1821   border: 1px solid #ddd;
1822
1823   input[type="submit"] {
1824     margin: auto;
1825   }
1826   tbody tr {
1827     border-top: 1px solid #ccc;
1828   }
1829
1830   .inbox-row {
1831     background: #f8f8ff;
1832   }
1833
1834   .inbox-row-unread {
1835     background:#CBEEA7;
1836   }
1837
1838   .right {
1839     float: right;
1840   }
1841
1842   tr td,
1843   tr th {
1844     padding: $lineheight/4;
1845   }
1846   p:last-child,
1847   h2:last-child,
1848   h3:last-child,
1849   ol:last-child,
1850   ul:last-child {
1851     margin-bottom:0;
1852   }
1853   tr td {
1854     height: 30px;
1855     border-right: 1px solid $lightgrey;
1856   }
1857 }
1858
1859 .inbox-row .inbox-mark-read {
1860   display: none;
1861 }
1862
1863 .info-line {
1864   margin-bottom: $lineheight;
1865   padding: $lineheight/4 0px 4px 0px;
1866   border-bottom: 1px solid #ccc;
1867
1868   form, form div {
1869     display: inline;
1870   }
1871 }
1872
1873 .info-line .user_thumbnail_tiny {
1874   vertical-align: middle;
1875 }
1876
1877 .inbox-sent {
1878   white-space: nowrap;
1879 }
1880
1881 .inbox-mark-unread,
1882 .inbox-mark-read,
1883 .inbox-delete {
1884   width: 1%;
1885 }
1886
1887 .inbox-row-unread .inbox-mark-unread {
1888   display: none;
1889 }
1890
1891 .message-read .message-buttons {
1892   margin-top: $lineheight;
1893   margin-bottom: $lineheight * 1.5;
1894   padding-top: $lineheight;
1895   border-top: 1px solid $lightgrey;
1896 }
1897
1898 .message-read .buttons .mark-unread-button {
1899   border-radius: 0;
1900 }
1901
1902 /* Rules for "flash" notice boxes shown at the top of the content area */
1903
1904 .flash {
1905   padding: $lineheight;
1906
1907   &.error {
1908     background-color: #ff7070;
1909   }
1910
1911   &.warning {
1912     background-color: #ffe0cc;
1913   }
1914
1915   &.notice {
1916     background-color: #CBEEA7;
1917   }
1918
1919   div.message {
1920     display: inline-block;
1921     margin-left: $lineheight / 2;
1922     vertical-align: middle;
1923
1924     p {
1925       margin-top: $lineheight * 0.5;
1926       margin-bottom: $lineheight * 0.5;
1927
1928       &:first-child {
1929         margin-top: 0px;
1930       }
1931
1932       &:last-child {
1933         margin-bottom: 0px;
1934       }
1935     }
1936   }
1937 }
1938
1939 /* Rules for highlighting fields with rails validation errors */
1940
1941 .formError {
1942   display: inline-block;
1943   padding: 5px 10px;
1944   margin-top: 5px;
1945   border-radius: 4px;
1946   font-size: 12px;
1947   color: #fff;
1948   background-color: #ff7070;
1949 }
1950
1951 /* Rules for rails validation error boxes */
1952
1953 #errorExplanation {
1954   width: 400px;
1955   border: 2px solid #ff7070;
1956   padding: 0 $lineheight/2;
1957   margin-bottom: $lineheight;
1958   background-color: #f0f0f0;
1959
1960   h2 {
1961     margin: 0 -10px 10px -10px;
1962     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1963     font-weight: bold;
1964     font-size: 12px;
1965     background-color: #c00;
1966     color: #fff;
1967     text-align: left;
1968   }
1969
1970   p {
1971     color: #333;
1972     margin-bottom: 0px;
1973     padding: $lineheight/4;
1974   }
1975
1976   ul {
1977     padding-left: $lineheight;
1978
1979     li {
1980       font-size: 12px;
1981       list-style: disc;
1982     }
1983   }
1984 }
1985
1986 /* Rules for forms */
1987
1988 .standard-form {
1989   fieldset {
1990     margin-bottom: $lineheight;
1991   }
1992   label.standard-label {
1993     display: block;
1994     margin-bottom: $lineheight/4;
1995     font-size: $typeheight;
1996     font-weight: bold;
1997     line-height: 1.5;
1998   }
1999   label.standard-label.secondary {
2000     display: inline-block;
2001     font-weight: normal;
2002   }
2003   .form-help {
2004     font-weight: normal;
2005   }
2006   .form-column {
2007     float: left;
2008     margin-right: 20px;
2009   }
2010   .form-divider {
2011     margin-top: $lineheight;
2012     padding-top: $lineheight;
2013     border-top: 1px solid $lightgrey;
2014   }
2015   .horizontal-list .form-row {
2016     float: left;
2017     padding-right: 10px;
2018   }
2019   .form-row {
2020     margin-bottom: $lineheight/2;
2021   }
2022   .form-list {
2023     margin-bottom: 0;
2024   }
2025   .form-list li {
2026     margin-bottom: 5px;
2027    }
2028   input[type="checkbox"],
2029   input[type="radio"] {
2030     float: left;
2031     margin-top: 5px;
2032   }
2033 }
2034
2035 #remember_me_openid {
2036   display: block;
2037 }
2038
2039 select {
2040   padding: 2px;
2041 }
2042
2043 input[type="checkbox"],
2044 input[type="radio"] {
2045     margin-right: 5px;
2046 }
2047
2048 input[type="text"],
2049 input[type="email"],
2050 input[type="url"],
2051 input[type="password"],
2052 textarea {
2053   color: #222;
2054   background-color: #fff;
2055   border: 1px solid #ccc;
2056   padding: 2px 5px;
2057   margin: 0;
2058   width: 200px;
2059
2060   &.field_with_errors {
2061     border: 2px solid #ff7070;
2062   }
2063 }
2064
2065 textarea {
2066   padding: 5px;
2067   width: 100%;
2068 }
2069
2070 /* Rules for user images */
2071
2072 img.user_image {
2073   max-width: 100px;
2074   max-height: 100px;
2075   border: 1px solid #ccc;
2076   margin-bottom: $lineheight;
2077   float: left;
2078   margin-right: $lineheight;
2079 }
2080
2081 img.user_thumbnail {
2082   max-width: 50px;
2083   max-height: 50px;
2084   border: 1px solid #ccc;
2085   margin-right: $lineheight;
2086 }
2087
2088 img.user_thumbnail_tiny {
2089   width: auto;
2090   height: auto;
2091   max-width: 25px;
2092   max-height: 25px;
2093   border: 1px solid #ccc;
2094 }
2095
2096 /* Rules for geo microformats */
2097
2098 abbr.geo {
2099   border-bottom: none;
2100 }
2101
2102 /* Rules for RSS buttons */
2103
2104 .rsssmall {
2105   position: relative;
2106   top: 3px;
2107 }
2108
2109 /* General styles for action lists / subnavs / pager navs */
2110
2111 ul.secondary-actions {
2112   font-style: normal;
2113   margin-bottom: 0;
2114   margin-left: 0;
2115   &.pager {
2116     display: inline-block;
2117     margin-right: 60px;
2118   }
2119   > li {
2120     display: block;
2121     float: left;
2122     list-style: none;
2123     border-left: 1px solid #ccc;
2124     padding-left: $lineheight/2;
2125     margin-right: $lineheight/2;
2126     &:first-child {
2127       border-left: 0;
2128       padding-left: 0;
2129     }
2130     &:last-child {
2131       margin-right: 0px;
2132     }
2133   }
2134 }
2135
2136 div.secondary-actions {
2137   padding: 10px;
2138   text-align: center;
2139 }
2140
2141 /* Utility for managing inner content areas */
2142
2143 .inner22 { padding: $lineheight;}
2144
2145 .inner12 { padding: $lineheight/2 $lineheight;}
2146
2147 .inner11 { padding: $lineheight/2;}
2148
2149 .inner20 { padding: $lineheight 0;}
2150
2151 .inner02 { padding: 0 $lineheight;}
2152
2153 /* Utility for general button styles */
2154
2155 input[type="button"],
2156 input[type="submit"],
2157 input[type="reset"],
2158 a.button {
2159   cursor: pointer;
2160   border: 0;
2161   display: inline-block;
2162   padding: $lineheight/4 $lineheight/2;
2163   min-height: 20px + $lineheight/2;
2164   min-width: 120px;
2165   margin: 0 0 $lineheight/2 0;
2166   color: white;
2167   background: $blue;
2168   text-align: center;
2169   border-radius: 2px;
2170   &:hover {
2171     background: darken($blue, $hovercolor);
2172     text-decoration: none;
2173   }
2174   &.deemphasize {
2175     background: $lightblue;
2176     &:hover {
2177       background: darken($lightblue, $hovercolor);
2178     }
2179   }
2180   &:disabled {
2181     background: $lightgrey;
2182     &:hover {
2183       background: $lightgrey;
2184     }
2185   }
2186   &:last-child {
2187     margin-bottom: 0;
2188   }
2189 }
2190
2191 input[type="button"],
2192 input[type="submit"],
2193 input[type="reset"] {
2194   line-height: normal;
2195 }
2196
2197 a.button {
2198   line-height: 20px;
2199 }
2200
2201 .buttons {
2202   min-width: 200px;
2203   input[type="submit"],
2204   input[type="button"],
2205   input[type="reset"],
2206   .button,
2207   .button_to {
2208     box-sizing: border-box;
2209     float: left;
2210     border-radius: 0;
2211     margin:0;
2212     min-width: 75px;
2213     max-width: 180px;
2214     border-right:1px solid white;
2215     text-overflow: ellipsis;
2216     white-space: nowrap;
2217     overflow: hidden;
2218   }
2219   input:first-child,
2220   .button:first-child,
2221   .button_to:first-child {
2222     border-radius:2px 0 0 2px;
2223   }
2224   input:last-child,
2225   .button:last-child,
2226   .button_to:last-child {
2227     border-radius:0 2px 2px 0;
2228     border-right-width: 0;
2229   }
2230   input:only-child,
2231   .button:only-child,
2232   .button_to:only-child,
2233   *[value="Hide"] + input:last-child,
2234   *[value="Hide"] + .button:last-child,
2235   *[value="Hide"] + .button_to:last-child {
2236     border-radius:2px;
2237     border-right-width: 0;
2238   }
2239     /* if a 3-button set has a hidden middle button */
2240   *[value="Hide"] + input:nth-child(3),
2241   *[value="Hide"] + .button:nth-child(3),
2242   *[value="Hide"] + .button_to:nth-child(3) {
2243     border-radius:0 2px 2px 0;
2244     border-right-width: 0;
2245   }
2246   /* if a 3-button set starts with a hidden button */
2247   *[value="Hide"] + input:nth-child(2):not(:last-child),
2248   *[value="Hide"] + .button:nth-child(2):not(:last-child),
2249   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
2250     border-radius:2px 0 0 2px;
2251     border-right-width: 1px;
2252   }
2253 }
2254
2255 /* Rules for doing distinct colour of alternate table rows */
2256
2257 .table0,
2258 .item0 {
2259   background: $offwhite;
2260 }
2261
2262 .table1,
2263 .item1 {
2264   background: #fff;
2265 }
2266
2267 /* Rules for OpenID logo */
2268
2269 .openid_logo {
2270   vertical-align: text-bottom;
2271   border: 0;
2272 }
2273
2274 /* Rules for rich text */
2275
2276 .richtext,
2277 .prose {
2278   h1, h2 {
2279     padding-bottom: $lineheight/2;
2280     border-bottom: 1px dashed #cccccc;
2281     margin-bottom: $lineheight/2;
2282   }
2283
2284   h1 {
2285     font-size: 24px;
2286   }
2287
2288   h2 {
2289     font-size: 18px;
2290   }
2291
2292   h3 {
2293     font-size: $typeheight;
2294   }
2295
2296   code {
2297     font-size: 13px;
2298     background: #e8e8e8;
2299     padding: 2px 3px;
2300   }
2301
2302   pre {
2303     font-size: 13px;
2304     background: #e8e8e8;
2305     padding: 2px 3px;
2306
2307     code {
2308       padding: 0;
2309     }
2310   }
2311
2312   img {
2313     padding: $lineheight;
2314     background-color: $offwhite;
2315     display: block;
2316     max-width: 100%;
2317     margin: auto;
2318   }
2319
2320   blockquote {
2321     border-left: $lineheight solid $offwhite;
2322     padding-left: $lineheight;
2323     margin: 0;
2324     color: #7E7E7E;
2325   }
2326
2327   ul, ol {
2328     padding-left: $lineheight;
2329     margin-bottom: $lineheight;
2330     margin-left: $lineheight;
2331   }
2332
2333   ul li {
2334     list-style: disc;
2335   }
2336
2337   ol li {
2338     list-style: decimal;
2339   }
2340 }
2341
2342 .diary_post .richtext {
2343     margin-top: $lineheight;
2344   }
2345
2346 .comments .richtext {
2347   margin-left: 70px;
2348   margin-top: 0;
2349 }
2350
2351 /* Rules for rich text editors */
2352
2353 input.richtext_title[type="text"] {
2354   width: 50%;
2355   width: calc(100% - 235px);
2356
2357   @media only screen and (max-width:768px) {
2358     width: 100%;
2359   }
2360 }
2361
2362 .richtext_container {
2363   margin-bottom: $lineheight;
2364
2365   .richtext_content {
2366     width: 50%;
2367     width: calc(100% - 235px);
2368     display: inline-block;
2369     vertical-align: top;
2370
2371     @media only screen and (max-width:768px) {
2372       width: 100%;
2373     }
2374
2375     .richtext_preview {
2376       display: inline-block;
2377       padding: $lineheight;
2378       background-color: $offwhite;
2379       overflow-x: auto;
2380
2381       &.loading {
2382         background-image: image-url("loading.gif");
2383         background-repeat: no-repeat;
2384         background-position: center;
2385       }
2386
2387       > :first-child {
2388         margin-top: 0px;
2389       }
2390     }
2391   }
2392
2393   .richtext_help {
2394     display: inline-block;
2395     vertical-align: top;
2396     margin-left: 15px;
2397     background-color: #f8f8ff;
2398     padding: $lineheight/2;
2399     width: 220px;
2400
2401     ul {
2402       margin-bottom: 0;
2403     }
2404
2405     h4.heading, li {
2406       border-bottom: 1px solid #ccc;
2407       margin-bottom: $lineheight/4;
2408       padding-bottom: $lineheight/4;
2409     }
2410
2411     li h4, li span, li p {
2412       display: inline-block;
2413       vertical-align: top;
2414       font-size: 11px;
2415     }
2416
2417     li h4 {
2418       width: 40%;
2419       margin: 0;
2420     }
2421
2422     li span, li p {
2423       width: 50%;
2424       margin-left: $lineheight/2;
2425       margin-bottom: $lineheight/4;
2426       white-space: nowrap;
2427     }
2428   }
2429 }
2430
2431 /* Rules for the user notes list */
2432
2433 .note_list {
2434   tr.creator {
2435     background-color: #eeeeee;
2436   }
2437
2438   td {
2439     padding: 3px;
2440   }
2441
2442   p {
2443     margin-bottom: 0px;
2444   }
2445 }
2446
2447 /* Rules for the iD editor */
2448
2449 .id-embed {
2450   width: 100%;
2451   height: 100%;
2452 }
2453
2454 /* Rules for dropdown menus */
2455
2456 .dropdown {
2457   position: relative;
2458 }
2459
2460 .dropdown-toggle {
2461   *margin-bottom: -3px;
2462 }
2463
2464 .dropdown-toggle:active,
2465 .open .dropdown-toggle {
2466   outline: 0;
2467 }
2468
2469 .caret {
2470   display: inline-block;
2471   width: 0;
2472   height: 0;
2473   vertical-align: top;
2474   border-top: 4px solid #000000;
2475   border-right: 4px solid transparent;
2476   border-left: 4px solid transparent;
2477   content: "";
2478 }
2479
2480 .dropdown .caret {
2481   margin-top: 8px;
2482   margin-left: 2px;
2483 }
2484
2485 .dropdown-menu {
2486   position: absolute;
2487   top: 100%;
2488   left: -1px;
2489   z-index: 1000;
2490   display: none;
2491   float: left;
2492   min-width: 160px;
2493   padding: 5px 0;
2494   margin: 0;
2495   list-style: none;
2496   background-color: #ffffff;
2497   border: 1px solid #ccc;
2498   border-radius: 0 3px 3px;
2499   *border-right-width: 2px;
2500   *border-bottom-width: 2px;
2501   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
2502   background-clip: padding-box;
2503 }
2504
2505 .dropdown-menu.pull-right {
2506   right: 0;
2507   left: auto;
2508 }
2509
2510 .dropdown-menu .divider {
2511   *width: 100%;
2512   height: 1px;
2513   margin: 9px 1px;
2514   *margin: -5px 0 5px;
2515   overflow: hidden;
2516   background-color: #e5e5e5;
2517   border-bottom: 1px solid #ffffff;
2518 }
2519
2520 .dropdown-menu > li > a {
2521   display: block;
2522   padding: 3px 10px;
2523   clear: both;
2524   font-weight: normal;
2525   line-height: 20px;
2526   color: #333333;
2527   white-space: nowrap;
2528 }
2529
2530 .dropdown-menu > li > a:hover,
2531 .dropdown-menu > li > a:focus,
2532 .dropdown-submenu:hover > a,
2533 .dropdown-submenu:focus > a {
2534   color: #ffffff;
2535   text-decoration: none;
2536   background-color: $green;
2537 }
2538
2539 .dropdown-menu > .active > a,
2540 .dropdown-menu > .active > a:hover,
2541 .dropdown-menu > .active > a:focus {
2542   color: #ffffff;
2543   text-decoration: none;
2544   background-color: $green;
2545   outline: 0;
2546 }
2547
2548 .dropdown-menu > .disabled > a,
2549 .dropdown-menu > .disabled > a:hover,
2550 .dropdown-menu > .disabled > a:focus {
2551   color: #999999;
2552 }
2553
2554 .dropdown-menu > .disabled > a:hover,
2555 .dropdown-menu > .disabled > a:focus {
2556   text-decoration: none;
2557   cursor: default;
2558   background-color: transparent;
2559   background-image: none;
2560 }
2561
2562 .open {
2563   *z-index: 1000;
2564 }
2565
2566 .open > .dropdown-menu {
2567   display: block;
2568 }
2569
2570 .dropdown-backdrop {
2571   position: fixed;
2572   top: 0;
2573   right: 0;
2574   bottom: 0;
2575   left: 0;
2576   z-index: 990;
2577 }
2578
2579 /* Rules for the "Welcome" page */
2580 .site-welcome, .site-fixthemap {
2581   .center {
2582     text-align: center;
2583     .sprite {
2584       float: none;
2585       margin: auto;
2586     }
2587   }
2588
2589   .sprite {
2590     background-image: image-url("welcome-sprite.png");
2591     background-size: 500px 250px;
2592     display: block;
2593     float: left;
2594   }
2595
2596   .icon-list {
2597     padding-bottom: 20px;
2598     div {
2599       margin-bottom: 10px;
2600       p {
2601         padding-top: 10px;
2602       }
2603     }
2604   }
2605   .sprite.small {
2606     width: 50px;
2607     height: 50px;
2608   }
2609
2610   .sprite.x {
2611     background-position: -50px 0;
2612   }
2613
2614   .sprite.term {
2615     margin-right: 10px;
2616     vertical-align: middle;
2617   }
2618
2619   .sprite.node {
2620     background-position: -100px 0;
2621   }
2622
2623   .sprite.way {
2624     background-position: -150px 0;
2625   }
2626
2627   .sprite.tag {
2628     background-position: -200px 0;
2629   }
2630
2631   .sprite.editor {
2632     background-position: -250px 0;
2633   }
2634
2635   .sprite.question {
2636     background-position: -300px 0;
2637   }
2638
2639   .sprite.rules {
2640     background-position: -350px 0;
2641   }
2642
2643   .start-mapping {
2644     margin: auto;
2645     cursor: pointer;
2646     border: none;
2647     padding: 20px 40px;
2648     font-size: 30px;
2649     text-decoration: none;
2650   }
2651
2652   .note-box {
2653     margin-top: 20px;
2654     background-color: $offwhite;
2655   }
2656
2657   .icon.note {
2658     background-color: #333;
2659     border-radius: 4px;
2660   }
2661 }
2662
2663 .site-about #content {
2664   //background-color: #000;
2665   background-color: #eee;
2666   background-position: 50% 50%;
2667   background-repeat: no-repeat;
2668   background-size: cover;
2669   background-attachment: fixed;
2670
2671   .caption {
2672     max-width: 200px;
2673     font: 13px/20px Helvetica, Arial, sans-serif;
2674     position: fixed;
2675     text-align: right;
2676     right: 20px;
2677     bottom: 60px;
2678     text-shadow: #000 0px 1px 5px;
2679     color: #eee;
2680     opacity: 0.8;
2681     display: none;
2682   }
2683
2684   .caption a {
2685     color: white;
2686     white-space: nowrap;
2687     text-decoration: none;
2688   }
2689
2690   a.next {
2691     display: block;
2692     position: fixed;
2693     right: 10px;
2694     bottom: 10px;
2695     width: 40px;
2696     height: 40px;
2697     border-radius: 5px;
2698     text-indent: -9999px;
2699     overflow: hidden;
2700     background: image-url('about/sprite.png') -120px 0px no-repeat;
2701     background-color: #000;
2702     background-color: rgba(0, 0, 0, 0.5);
2703   }
2704
2705   .content-inner {
2706     position: relative;
2707     color: #333;
2708     min-width: 320px;
2709     max-width: 640px;
2710
2711     .section {
2712       margin-bottom: 30px;
2713     }
2714
2715     .section:last-child {
2716       margin-bottom: 0;
2717     }
2718   }
2719
2720   .text {
2721     background: white;
2722     padding: 40px;
2723   }
2724
2725   .attr {
2726     position: relative;
2727     padding: 170px 40px 20px;
2728     background: #333;
2729     background: rgba(0, 0, 0, .8);
2730     margin-bottom: 0;
2731     margin-top: -20px;
2732
2733     h1 {
2734       display: block;
2735       color: white;
2736       font-weight: 300;
2737       font-size: 34px;
2738       span {
2739         color: #76c551;
2740       }
2741     }
2742
2743     .user-image {
2744       position: absolute;
2745       top: 0px;
2746       right: 240px;
2747       left: 0px;
2748       height: 150px;
2749       background-position: 0 50%;
2750       background-repeat: no-repeat;
2751       background-image: image-url('about/osm.png');
2752       background-size: cover;
2753       background-color: #76c551;
2754     }
2755
2756     .byosm {
2757       position: absolute;
2758       top: 0px;
2759       right: 0px;
2760       z-index: 1;
2761       width: 240px;
2762       height: 150px;
2763       padding: 20px 20px 20px 40px;
2764       font: 500 20px/24px Helvetica, Arial, sans-serif;
2765       white-space: nowrap;
2766       color: #fff;
2767       background: #76c551;
2768     }
2769
2770     .byosm span {
2771       display: inline-block;
2772       width: 20px;
2773       margin-left: -20px;
2774     }
2775   }
2776
2777   h2 {
2778     margin-bottom: 10px;
2779   }
2780
2781   .icon {
2782     width: 30px;
2783     height: 30px;
2784     margin-right: 10px;
2785     vertical-align: middle;
2786     background: 40px 40px image-url('about/sprite.png') no-repeat;
2787
2788     &.local {
2789       /* no-r2 */
2790       background-position: 0px 0px;
2791     }
2792     &.community {
2793       /* no-r2 */
2794       background-position: 0px -40px;
2795     }
2796     &.open {
2797       /* no-r2 */
2798       background-position: 0px -80px;
2799     }
2800     &.partners {
2801       /* no-r2 */
2802       background-position: 0px -120px;
2803     }
2804     &.infringement {
2805       /* no-r2 */
2806       background-position: 0px -160px;
2807     }
2808     &.legal {
2809       /* no-r2 */
2810       background-position: -45px -160px;
2811     }
2812   }
2813 }
2814
2815 @import 'browse';
2816
2817 @media only screen and (max-width:960px) {
2818   .header-illustration.new-user-arm {
2819     display: none;
2820   }
2821 }