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