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