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