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