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