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