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