]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Show offline/readonly messages as normal flash messages
[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 .piwik { border: 0; }
152
153 /* Rules for icons */
154
155 .icon {
156   display: inline-block;
157   vertical-align: top;
158   width: 20px;
159   height: 20px;
160   background: transparent image-url("sprite.png") no-repeat 0 0;
161   background-image: image-url("sprite.svg");
162   text-indent: -9999px;
163   overflow: hidden;
164 }
165
166 .icon.search      { background-position: 0 0; }
167 .icon.donate      { background-position: -20px 0; }
168 .icon.zoomin      { background-position: -40px 0; }
169 .icon.zoomout     { background-position: -60px 0; }
170 .icon.geolocate   { background-position: -80px 0; }
171 .active .icon.geolocate   { background-position: -80px -20px; }
172 .icon.layers      { background-position: -100px 0; }
173 .icon.key         { background-position: -120px 0; }
174 .icon.share       { background-position: -140px 0; }
175 .icon.clipboard   { background-position: -160px 0; }
176 .icon.link        { background-position: -180px 0; }
177 .icon.close       { background-position: -200px 0; }
178 .close-wrap:hover .icon.close,
179 .icon.close:hover { background-position: -200px -20px; }
180 .icon.check       { background-position: -220px 0; }
181 .icon.note        { background-position: -240px 0; }
182 .icon.note.grey   { background-position: -240px -20px; }
183 .icon.query       { background-position: -260px 0; }
184
185 /* Rules for links */
186
187 a {
188   color: #24d;
189   text-decoration: none;
190   -webkit-appearance: none;
191   outline: 0;
192   &:hover {
193     text-decoration: underline;
194   }
195 }
196
197 /* Rules for horizontal lines */
198
199 hr {
200   border: none;
201   background-color: #ccc;
202   color: #ccc;
203   height: 1px;
204 }
205
206 /* General styles for tables */
207
208 table {
209   width: 100%;
210   margin-bottom: $lineheight;
211   th, td {
212     text-align: left;
213     padding: $lineheight/4;
214     line-height: $lineheight;
215   }
216   th {
217     font-weight: 600;
218     vertical-align: top;
219   }
220   td {
221     vertical-align: middle;
222   }
223 }
224
225 /* Utility for de-emphasizing content */
226
227 .deemphasize {
228   color: #999;
229   a {
230     color: $blue;
231   }
232 }
233
234 /* Rules for the header */
235
236 #menu-icon {
237   display: none !important;
238   float: right;
239   background: image-url("menu-icon.png") no-repeat;
240   background-size: 30px 30px;
241   display: block;
242   width: 30px;
243   height: 30px;
244   margin: 14px 10px 0 0;
245   opacity: 0.6;
246 }
247
248 header {
249   height: $headerHeight;
250   position: relative;
251   z-index: 1001;
252   font-size: 14px;
253
254   h1, nav, nav > ul, nav > ul > li, .dropdown {
255     display: inline-block;
256   }
257
258   > * {
259     height: 100%;
260     padding: $lineheight/2;
261   }
262
263   h1, nav.primary {
264     float: left;
265   }
266
267   a, a:hover {
268     text-decoration: none;
269   }
270
271   img.logo {
272     width: 30px;
273     height: 30px;
274     margin-top: -2px;
275     vertical-align: middle;
276   }
277
278   h1 {
279     margin: 0;
280     padding-top: 15px;
281
282     a {
283       color: #000;
284     }
285   }
286 }
287
288 nav.primary {
289   > ul {
290     $border: 1px solid $green;
291
292     border: $border;
293     border-radius: $border-radius;
294
295     > li {
296       border-right: $border;
297       float: left;
298       &:last-child {
299         border-right: 0;
300       }
301       > a:hover { background: lighten($green, 30%); }
302       &.current > a:hover { background: $green; }
303       &.disabled > a:hover { background: lighten($green, 38%); }
304       &.dropdown {
305         > a.tab { border-right: 1px solid lighten($green, 30%); }
306         &.current > a.tab { border-right: 1px solid lighten($green, 10%); }
307       }
308     }
309   }
310
311   a.tab,
312   .dropdown-toggle {
313     display: inline-block;
314     font-weight: 500;
315     color: $green;
316     padding: 5px 15px;
317   }
318
319   .dropdown-toggle {
320     padding: 5px 6px;
321   }
322
323   .caret {
324     border-top-color: $green;
325     margin-top: 10px;
326   }
327
328   .disabled a {
329     color: #ccc;
330     cursor: default;
331
332     .caret {
333       border-top-color: #ccc;
334     }
335   }
336
337   > ul li.current {
338     background-color: $green;
339
340     .tab {
341       color: #fff;
342     }
343
344     .caret {
345       border-top-color: #fff;
346     }
347   }
348 }
349
350 nav.secondary {
351   position: absolute;
352   right: 0;
353
354   > ul {
355     vertical-align: middle;
356     a, .dropdown-toggle {
357       display: inline-block;
358       text-decoration: none;
359       color: $darkgrey;
360       padding: 5px;
361
362       &:hover { color: darken($darkgrey, 25%); }
363     }
364   }
365
366   > ul li.current a {
367     color: darken($darkgrey, 25%);
368   }
369
370   .user-menu {
371     $border: 1px solid $grey;
372     border: $border;
373     border-radius: $border-radius;
374     margin-left: 10px;
375
376     > li {
377       border-right: $border;
378       float: left;
379       &:last-child {
380         border-right: 0;
381
382         > a {
383           border-radius: 0 $border-radius $border-radius 0;
384         }
385       }
386       &:first-child > a { border-radius: $border-radius 0 0 $border-radius; }
387       &:hover a { background: lighten($darkgrey, 30%); }
388     }
389
390     a {
391       padding: 5px 15px;
392
393     }
394
395     &.logged-in > a {
396       padding: 0;
397       > .user-button {
398         line-height: 1.8;
399         padding: 5px 10px 3px 6px;
400         display: inline-block;
401         color: $darkgrey;
402       }
403       &:hover > .user-button { color: darken($darkgrey, 5%); }
404     }
405   }
406
407   .caret {
408     border-top-color: $grey;
409     margin-top: 9px;
410   }
411
412   img.user_thumbnail_tiny {
413     border: 0;
414     vertical-align: top;
415     margin-top: 0px;
416     margin: 4px 0 0 4px;
417     border-radius: 2px;
418   }
419
420   #inboxanchor {
421     display: inline-block;
422     vertical-align: top;
423     height: 25px;
424     margin: 3px 0 3px 3px;
425     background-color: lighten($grey, 10%);
426     line-height: 20px;
427     border-radius: 2;
428   }
429
430   .dropdown-menu {
431     left: auto;
432     right: -1px;
433     border-radius: 3px 0 3px 3px;
434
435     .count-number {
436       float: right;
437       padding: 0 5px;
438       margin: 0;
439     }
440   }
441 }
442
443 #compact-secondary-nav {
444   display: none;
445   ul li a {
446     width: 100%;
447     color: #333;
448     &:hover { color: #fff; }
449   }
450 }
451
452 body.compact {
453   #compact-secondary-nav {
454     display: inline-block;
455   }
456   .compact-hide {
457     display: none;
458   }
459 }
460
461 /* Utility for styling notification numbers */
462
463 .count-number {
464   padding: 2px $lineheight/4;
465   border-radius: 2px;
466   background: lighten($green, 30%);
467   margin: 0 2px;
468   font-size: 11px;
469   color: #333;
470 }
471
472 /* Rules for the message shown in place of the map when javascript is disabled */
473
474 #noscript {
475   z-index: 20000000;
476   margin-left: 400px;
477   margin-top: 50px;
478 }
479
480 /* Rules for Leaflet maps */
481
482 .leaflet-control .control-button {
483   display: block;
484   height: 40px;
485   width: 40px;
486   background-color: #333;
487   background-color: rgba(0,0,0,.6);
488   border-radius: 4px 0 0 4px;
489   margin-bottom: 10px;
490   outline: none;
491
492   &:hover {
493     background-color: black;
494   }
495
496   &.disabled,
497   &.leaflet-disabled {
498     background-color: #333;
499     background-color: rgba(0,0,0,.5);
500     cursor: default;
501   }
502
503   &.active {
504     background-color: #9ed485;
505   }
506
507   .icon {
508     margin: 10px;
509   }
510 }
511
512 .leaflet-control .zoomin,
513 .control-layers .control-button {
514   margin-bottom: 0px;
515   border-radius: 4px 0 0 0;
516 }
517
518 .leaflet-control .zoomout,
519 .control-key .control-button {
520   margin-bottom: 0;
521   border-radius: 0;
522 }
523
524 .control-locate .control-button,
525 .control-share .control-button {
526   border-radius: 0 0 0 4px;
527 }
528
529 /* Rules for the sidebar and main map area */
530
531 .map-layout {
532   #content {
533     overflow: hidden;
534     position: absolute;
535     top: $headerHeight;
536     bottom: 0;
537     width: 100%;
538   }
539
540   #sidebar, #map {
541     position: relative;
542     height: 100%;
543     overflow-x: hidden;
544     overflow-y: auto;
545   }
546
547   #sidebar {
548     float: left;
549     width: $sidebarWidth;
550     background: #fff;
551     font-size: 12px;
552
553     #sidebar_loader {
554       display: none;
555     }
556
557     > div {
558       position: relative;
559       float: left;
560       clear: both;
561       width: 100%;
562     }
563
564     h2 {
565       padding: $lineheight $lineheight $lineheight/2;
566     }
567
568     h3, h4 {
569       margin-top: $lineheight;
570       margin-bottom: $lineheight/2;
571       font-size: 13px;
572     }
573
574     .close-wrap {
575       cursor: pointer;
576       position: absolute;
577       top: 0;
578       right: 0;
579       width: 60px;
580       height: 60px;
581
582       .icon.close {
583         pointer-events: none;
584         position: absolute;
585         right: 20px;
586         top: 20px;
587       }
588     }
589
590     .icon.close {
591       float: right;
592       cursor: pointer;
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 trace view */
1481
1482 .trace-view {
1483   .trace_pending {
1484     color: red;
1485   }
1486
1487   .geo {
1488     display: inline;
1489   }
1490 }
1491
1492 /* Rules for the new trace form */
1493
1494 #new_trace {
1495   input[type=text] {
1496     width: 50%;
1497     width: calc(100% - 150px);
1498     max-width: 500px;
1499   }
1500 }
1501
1502 /* Rules for the edit trace form */
1503
1504 .edit_trace {
1505   .form-row p {
1506     margin-bottom: 0px;
1507   }
1508
1509   input[type=text] {
1510     width: 50%;
1511     width: calc(100% - 150px);
1512     max-width: 500px;
1513   }
1514 }
1515
1516 /* Rules for the user profile page */
1517
1518 #userinformation {
1519
1520   min-height: 100px;
1521   .userinformation-inner {
1522     float: left;
1523   }
1524   h2 {
1525     margin-top: 0;
1526   }
1527   .user-description {
1528     width: 100%;
1529     clear: both;
1530   }
1531   .deemphasize {
1532     margin: 0;
1533   }
1534 }
1535
1536 .admin-user-info small {
1537   margin-bottom: $lineheight/2;
1538   display: inline;
1539   margin-right: $lineheight;
1540 }
1541
1542 .activity-block {
1543   clear: left;
1544   border-bottom: 1px solid #ccc;
1545   padding-bottom: $lineheight;
1546   float: left;
1547   h3 {
1548     margin-bottom: $lineheight/2;
1549   }
1550 }
1551
1552 .contact-activity {
1553   margin-top: $lineheight;
1554   width: 100%;
1555 }
1556
1557 .activity-details p {
1558   margin-left: 70px;
1559   margin-bottom: 0;
1560 }
1561
1562 #friends-container .contact-activity ul {
1563   margin-left: 70px;
1564 }
1565
1566 .user-view {
1567   // Silly exception; remove when user page is redesigned.
1568   .content-inner {
1569     max-width: none;
1570   }
1571   p#no_home_location {
1572     margin: $lineheight;
1573   }
1574   .user_thumbnail {
1575     margin-top: $lineheight/4;
1576     float: left;
1577   }
1578 }
1579
1580 /* Rules for the user map */
1581
1582 .content_map .leaflet-popup-content {
1583   margin: $lineheight/2;
1584   min-height: 50px;
1585 }
1586
1587 /* Rules for user popups on maps */
1588
1589 .user_popup {
1590   min-width: 200px;
1591   p {
1592     padding: 0 0 5px 0;
1593     margin-top: 0 0 0 60px;
1594     font-size: 12px;
1595   }
1596   img.user_thumbnail {
1597     float: left;
1598     margin: 0 $lineheight/2 0 0;
1599   }
1600 }
1601
1602 /* Rules for the user list */
1603
1604 #user_list {
1605   font-size: $lineheight/2;
1606   width: 100%;
1607
1608   tr {
1609     vertical-align: middle;
1610   }
1611
1612   p {
1613     margin-top: 0px;
1614     margin-bottom: 0px;
1615   }
1616 }
1617
1618 #user_list_actions {
1619   float: right;
1620   margin-top: $lineheight/2;
1621 }
1622
1623 /* Rules for the diary list page */
1624
1625 .diary_post {
1626   position: relative;
1627   margin-top: $lineheight/2;
1628   padding-top: $lineheight;
1629   border-top: 1px solid #ccc;
1630
1631   .post_heading {
1632     margin-bottom: $lineheight;
1633
1634     h2 {
1635       margin-top: 0;
1636       margin-bottom: $lineheight/2;
1637       font-size: 24px;
1638     }
1639   }
1640
1641   img.user_thumbnail {
1642     float: left;
1643   }
1644
1645   small.deemphasize {
1646     float: left;
1647     display: block;
1648   }
1649 }
1650
1651 .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div
1652   display: inline;
1653 }
1654
1655 /* Rules for the diary entry page */
1656
1657 .diary_entry {
1658   #map {
1659     position: relative;
1660     width: 90%;
1661     height: 400px;
1662     border: 1px solid #ccc;
1663     display: none;
1664     margin-bottom: $lineheight;
1665   }
1666   #newcomment {
1667     border-top: 1px solid #ccc;
1668     padding-top: $lineheight;
1669     margin-top: $lineheight/2;
1670   }
1671   .comments {
1672     max-width: 740px;
1673   }
1674   .diary-comment {
1675     margin-top: $lineheight/2;
1676     border-top: 1px dashed #ccc;
1677     padding-top: $lineheight/2;
1678     &:first-child {
1679       margin-top: $lineheight;
1680       padding-top: $lineheight;
1681       border-top: 1px solid #ccc;
1682     }
1683     p {
1684       margin-bottom: $lineheight/2;
1685     }
1686     .comment-heading {
1687       margin-bottom: 0;
1688       margin-top: 0;
1689     }
1690   }
1691 }
1692
1693 .diary_entry-view img.user_thumbnail {
1694   float: left;
1695 }
1696
1697
1698 .diary-subscribe-buttons {
1699   position:relative;
1700   top: -30px;
1701   left: 130px;
1702 }
1703
1704 /* Rules for the log in page */
1705
1706 #login_auth_buttons {
1707   margin-bottom: 0;
1708 }
1709
1710 #login_auth_buttons li {
1711   float: left;
1712   padding: $lineheight/4 $lineheight/2;
1713 }
1714
1715 /* Rules for the account confirmation page */
1716
1717 .user-terms {
1718   .legale {
1719     border: 1px solid #ccc;
1720     padding: $lineheight;
1721     margin-bottom: $lineheight;
1722     overflow: auto;
1723     height: 20em;
1724
1725     li {
1726       list-style: inherit;
1727     }
1728
1729     ol ol {
1730       list-style-type: lower-alpha;
1731     }
1732   }
1733
1734   #decline {
1735     background: $lightblue;
1736     &:hover {
1737       background: darken($lightblue, $hovercolor);
1738     }
1739   }
1740 }
1741
1742 /* Rules for the account settings page */
1743
1744 #accountForm .user_map {
1745   position: relative;
1746   width: 500px;
1747   height: 400px;
1748   border: 1px solid #ccc;
1749 }
1750
1751 #accountForm .user_image {
1752   margin-bottom: 0;
1753 }
1754
1755 #accountForm #user_image {
1756   margin-left: 20px;
1757 }
1758
1759 #accountForm ul.accountImage-options {
1760   margin-left: 120px;
1761 }
1762
1763 .nohome .location {
1764   display: none;
1765 }
1766
1767 #homerow .message {
1768   display: none;
1769 }
1770
1771 .nohome .message {
1772   display: inline !important;
1773 }
1774
1775 .content_map.settings_map {
1776   width: 50%;
1777   float: none;
1778 }
1779
1780 /* Rules for the oauth settings page */
1781
1782 .oauth_clients .buttons .oauth-edit {
1783   border-radius: 2px 0 0 2px;
1784 }
1785
1786 .oauth_clients .buttons .oauth-delete {
1787   border-radius: 0 2px 2px 0;
1788 }
1789
1790 /* Rules for the oauth authorization page */
1791
1792 .oauth-authorize ul {
1793   list-style: none;
1794 }
1795
1796 /* Rules for messages pages */
1797
1798 .messages {
1799   width: 100%;
1800   border: 1px solid #ddd;
1801
1802   input[type="submit"] {
1803     margin: auto;
1804   }
1805   tbody tr {
1806     border-top: 1px solid #ccc;
1807   }
1808
1809   .inbox-row {
1810     background: #f8f8ff;
1811   }
1812
1813   .inbox-row-unread {
1814     background:#CBEEA7;
1815   }
1816
1817   .right {
1818     float: right;
1819   }
1820
1821   tr td,
1822   tr th {
1823     padding: $lineheight/4;
1824   }
1825   p:last-child,
1826   h2:last-child,
1827   h3:last-child,
1828   ol:last-child,
1829   ul:last-child {
1830     margin-bottom:0;
1831   }
1832   tr td {
1833     height: 30px;
1834     border-right: 1px solid $lightgrey;
1835   }
1836 }
1837
1838 .inbox-row .inbox-mark-read {
1839   display: none;
1840 }
1841
1842 .info-line {
1843   margin-bottom: $lineheight;
1844   padding: $lineheight/4 0px 4px 0px;
1845   border-bottom: 1px solid #ccc;
1846
1847   form, form div {
1848     display: inline;
1849   }
1850 }
1851
1852 .info-line .user_thumbnail_tiny {
1853   vertical-align: middle;
1854 }
1855
1856 .inbox-sent {
1857   white-space: nowrap;
1858 }
1859
1860 .inbox-mark-unread,
1861 .inbox-mark-read,
1862 .inbox-delete {
1863   width: 1%;
1864 }
1865
1866 .inbox-row-unread .inbox-mark-unread {
1867   display: none;
1868 }
1869
1870 .message-read .message-buttons {
1871   margin-top: $lineheight;
1872   margin-bottom: $lineheight * 1.5;
1873   padding-top: $lineheight;
1874   border-top: 1px solid $lightgrey;
1875 }
1876
1877 .message-read .buttons .mark-unread-button {
1878   border-radius: 0;
1879 }
1880
1881 /* Rules for "flash" notice boxes shown at the top of the content area */
1882
1883 .flash {
1884   padding: $lineheight;
1885
1886   &.error {
1887     background-color: #ff7070;
1888   }
1889
1890   &.warning {
1891     background-color: #ffe0cc;
1892   }
1893
1894   &.notice {
1895     background-color: #CBEEA7;
1896   }
1897
1898   div.message {
1899     display: inline-block;
1900     margin-left: $lineheight / 2;
1901     vertical-align: middle;
1902
1903     p {
1904       margin-top: $lineheight * 0.5;
1905       margin-bottom: $lineheight * 0.5;
1906
1907       &:first-child {
1908         margin-top: 0px;
1909       }
1910
1911       &:last-child {
1912         margin-bottom: 0px;
1913       }
1914     }
1915   }
1916 }
1917
1918 /* Rules for highlighting fields with rails validation errors */
1919
1920 .formError {
1921   display: inline-block;
1922   padding: 5px 10px;
1923   margin-top: 5px;
1924   border-radius: 4px;
1925   font-size: 12px;
1926   color: #fff;
1927   background-color: #ff7070;
1928 }
1929
1930 /* Rules for rails validation error boxes */
1931
1932 #errorExplanation {
1933   width: 400px;
1934   border: 2px solid #ff7070;
1935   padding: 0 $lineheight/2;
1936   margin-bottom: $lineheight;
1937   background-color: #f0f0f0;
1938
1939   h2 {
1940     margin: 0 -10px 10px -10px;
1941     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1942     font-weight: bold;
1943     font-size: 12px;
1944     background-color: #c00;
1945     color: #fff;
1946     text-align: left;
1947   }
1948
1949   p {
1950     color: #333;
1951     margin-bottom: 0px;
1952     padding: $lineheight/4;
1953   }
1954
1955   ul {
1956     padding-left: $lineheight;
1957
1958     li {
1959       font-size: 12px;
1960       list-style: disc;
1961     }
1962   }
1963 }
1964
1965 /* Rules for forms */
1966
1967 .standard-form {
1968   fieldset {
1969     margin-bottom: $lineheight;
1970   }
1971   label.standard-label {
1972     display: block;
1973     margin-bottom: $lineheight/4;
1974     font-size: $typeheight;
1975     font-weight: bold;
1976     line-height: 1.5;
1977   }
1978   label.standard-label.secondary {
1979     display: inline-block;
1980     font-weight: normal;
1981   }
1982   .form-help {
1983     font-weight: normal;
1984   }
1985   .form-column {
1986     float: left;
1987     margin-right: 20px;
1988   }
1989   .form-divider {
1990     margin-top: $lineheight;
1991     padding-top: $lineheight;
1992     border-top: 1px solid $lightgrey;
1993   }
1994   .horizontal-list .form-row {
1995     float: left;
1996     padding-right: 10px;
1997   }
1998   .form-row {
1999     margin-bottom: $lineheight/2;
2000   }
2001   .form-list {
2002     margin-bottom: 0;
2003   }
2004   .form-list li {
2005     margin-bottom: 5px;
2006    }
2007   input[type="checkbox"],
2008   input[type="radio"] {
2009     float: left;
2010     margin-top: 5px;
2011   }
2012 }
2013
2014 #remember_me_openid {
2015   display: block;
2016 }
2017
2018 select {
2019   padding: 2px;
2020 }
2021
2022 input[type="checkbox"],
2023 input[type="radio"] {
2024     margin-right: 5px;
2025 }
2026
2027 input[type="text"],
2028 input[type="email"],
2029 input[type="url"],
2030 input[type="password"],
2031 textarea {
2032   color: #222;
2033   background-color: #fff;
2034   border: 1px solid #ccc;
2035   padding: 2px 5px;
2036   margin: 0;
2037   width: 200px;
2038
2039   &.field_with_errors {
2040     border: 2px solid #ff7070;
2041   }
2042 }
2043
2044 textarea {
2045   padding: 5px;
2046   width: 100%;
2047 }
2048
2049 /* Rules for user images */
2050
2051 img.user_image {
2052   max-width: 100px;
2053   max-height: 100px;
2054   border: 1px solid #ccc;
2055   margin-bottom: $lineheight;
2056   float: left;
2057   margin-right: $lineheight;
2058 }
2059
2060 img.user_thumbnail {
2061   max-width: 50px;
2062   max-height: 50px;
2063   border: 1px solid #ccc;
2064   margin-right: $lineheight;
2065 }
2066
2067 img.user_thumbnail_tiny {
2068   width: auto;
2069   height: auto;
2070   max-width: 25px;
2071   max-height: 25px;
2072   border: 1px solid #ccc;
2073 }
2074
2075 /* Rules for geo microformats */
2076
2077 abbr.geo {
2078   border-bottom: none;
2079 }
2080
2081 /* Rules for RSS buttons */
2082
2083 .rsssmall {
2084   position: relative;
2085   top: 3px;
2086 }
2087
2088 /* General styles for action lists / subnavs / pager navs */
2089
2090 ul.secondary-actions {
2091   font-style: normal;
2092   margin-bottom: 0;
2093   margin-left: 0;
2094   &.pager {
2095     display: inline-block;
2096     margin-right: 60px;
2097   }
2098   > li {
2099     display: block;
2100     float: left;
2101     list-style: none;
2102     border-left: 1px solid #ccc;
2103     padding-left: $lineheight/2;
2104     margin-right: $lineheight/2;
2105     &:first-child {
2106       border-left: 0;
2107       padding-left: 0;
2108     }
2109     &:last-child {
2110       margin-right: 0px;
2111     }
2112   }
2113 }
2114
2115 div.secondary-actions {
2116   padding: 10px;
2117   text-align: center;
2118 }
2119
2120 /* Utility for managing inner content areas */
2121
2122 .inner22 { padding: $lineheight;}
2123
2124 .inner12 { padding: $lineheight/2 $lineheight;}
2125
2126 .inner11 { padding: $lineheight/2;}
2127
2128 .inner20 { padding: $lineheight 0;}
2129
2130 .inner02 { padding: 0 $lineheight;}
2131
2132 /* Utility for general button styles */
2133
2134 input[type="button"],
2135 input[type="submit"],
2136 input[type="reset"],
2137 a.button {
2138   cursor: pointer;
2139   border: 0;
2140   display: inline-block;
2141   padding: $lineheight/4 $lineheight/2;
2142   min-height: 20px + $lineheight/2;
2143   min-width: 120px;
2144   margin: 0 0 $lineheight/2 0;
2145   color: white;
2146   background: $blue;
2147   text-align: center;
2148   border-radius: 2px;
2149   &:hover {
2150     background: darken($blue, $hovercolor);
2151     text-decoration: none;
2152   }
2153   &.deemphasize {
2154     background: $lightblue;
2155     &:hover {
2156       background: darken($lightblue, $hovercolor);
2157     }
2158   }
2159   &:disabled {
2160     background: $lightgrey;
2161     &:hover {
2162       background: $lightgrey;
2163     }
2164   }
2165   &:last-child {
2166     margin-bottom: 0;
2167   }
2168 }
2169
2170 input[type="button"],
2171 input[type="submit"],
2172 input[type="reset"] {
2173   line-height: normal;
2174 }
2175
2176 a.button {
2177   line-height: 20px;
2178 }
2179
2180 .buttons {
2181   min-width: 200px;
2182   input[type="submit"],
2183   input[type="button"],
2184   input[type="reset"],
2185   .button,
2186   .button_to {
2187     box-sizing: border-box;
2188     float: left;
2189     border-radius: 0;
2190     margin:0;
2191     min-width: 75px;
2192     max-width: 180px;
2193     border-right:1px solid white;
2194     text-overflow: ellipsis;
2195     white-space: nowrap;
2196     overflow: hidden;
2197   }
2198   input:first-child,
2199   .button:first-child,
2200   .button_to:first-child {
2201     border-radius:2px 0 0 2px;
2202   }
2203   input:last-child,
2204   .button:last-child,
2205   .button_to:last-child {
2206     border-radius:0 2px 2px 0;
2207     border-right-width: 0;
2208   }
2209   input:only-child,
2210   .button:only-child,
2211   .button_to:only-child,
2212   *[value="Hide"] + input:last-child,
2213   *[value="Hide"] + .button:last-child,
2214   *[value="Hide"] + .button_to:last-child {
2215     border-radius:2px;
2216     border-right-width: 0;
2217   }
2218     /* if a 3-button set has a hidden middle button */
2219   *[value="Hide"] + input:nth-child(3),
2220   *[value="Hide"] + .button:nth-child(3),
2221   *[value="Hide"] + .button_to:nth-child(3) {
2222     border-radius:0 2px 2px 0;
2223     border-right-width: 0;
2224   }
2225   /* if a 3-button set starts with a hidden button */
2226   *[value="Hide"] + input:nth-child(2):not(:last-child),
2227   *[value="Hide"] + .button:nth-child(2):not(:last-child),
2228   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
2229     border-radius:2px 0 0 2px;
2230     border-right-width: 1px;
2231   }
2232 }
2233
2234 /* Rules for doing distinct colour of alternate table rows */
2235
2236 .table0,
2237 .item0 {
2238   background: $offwhite;
2239 }
2240
2241 .table1,
2242 .item1 {
2243   background: #fff;
2244 }
2245
2246 /* Rules for OpenID logo */
2247
2248 .openid_logo {
2249   vertical-align: text-bottom;
2250   border: 0;
2251 }
2252
2253 /* Rules for rich text */
2254
2255 .richtext,
2256 .prose {
2257   h1, h2 {
2258     padding-bottom: $lineheight/2;
2259     border-bottom: 1px dashed #cccccc;
2260     margin-bottom: $lineheight/2;
2261   }
2262
2263   h1 {
2264     font-size: 24px;
2265   }
2266
2267   h2 {
2268     font-size: 18px;
2269   }
2270
2271   h3 {
2272     font-size: $typeheight;
2273   }
2274
2275   code {
2276     font-size: 13px;
2277     background: #e8e8e8;
2278     padding: 2px 3px;
2279   }
2280
2281   pre {
2282     font-size: 13px;
2283     background: #e8e8e8;
2284     padding: 2px 3px;
2285
2286     code {
2287       padding: 0;
2288     }
2289   }
2290
2291   img {
2292     padding: $lineheight;
2293     background-color: $offwhite;
2294     display: block;
2295     max-width: 100%;
2296     margin: auto;
2297   }
2298
2299   blockquote {
2300     border-left: $lineheight solid $offwhite;
2301     padding-left: $lineheight;
2302     margin: 0;
2303     color: #7E7E7E;
2304   }
2305
2306   ul, ol {
2307     padding-left: $lineheight;
2308     margin-bottom: $lineheight;
2309     margin-left: $lineheight;
2310   }
2311
2312   ul li {
2313     list-style: disc;
2314   }
2315
2316   ol li {
2317     list-style: decimal;
2318   }
2319 }
2320
2321 .diary_post .richtext {
2322     margin-top: $lineheight;
2323   }
2324
2325 .comments .richtext {
2326   margin-left: 70px;
2327   margin-top: 0;
2328 }
2329
2330 /* Rules for rich text editors */
2331
2332 input.richtext_title[type="text"] {
2333   width: 50%;
2334   width: calc(100% - 235px);
2335
2336   @media only screen and (max-width:768px) {
2337     width: 100%;
2338   }
2339 }
2340
2341 .richtext_container {
2342   margin-bottom: $lineheight;
2343
2344   .richtext_content {
2345     width: 50%;
2346     width: calc(100% - 235px);
2347     display: inline-block;
2348     vertical-align: top;
2349
2350     @media only screen and (max-width:768px) {
2351       width: 100%;
2352     }
2353
2354     .richtext_preview {
2355       display: inline-block;
2356       padding: $lineheight;
2357       background-color: $offwhite;
2358       overflow-x: auto;
2359
2360       &.loading {
2361         background-image: image-url("loading.gif");
2362         background-repeat: no-repeat;
2363         background-position: center;
2364       }
2365
2366       > :first-child {
2367         margin-top: 0px;
2368       }
2369     }
2370   }
2371
2372   .richtext_help {
2373     display: inline-block;
2374     vertical-align: top;
2375     margin-left: 15px;
2376     background-color: #f8f8ff;
2377     padding: $lineheight/2;
2378     width: 220px;
2379
2380     ul {
2381       margin-bottom: 0;
2382     }
2383
2384     h4.heading, li {
2385       border-bottom: 1px solid #ccc;
2386       margin-bottom: $lineheight/4;
2387       padding-bottom: $lineheight/4;
2388     }
2389
2390     li h4, li span, li p {
2391       display: inline-block;
2392       vertical-align: top;
2393       font-size: 11px;
2394     }
2395
2396     li h4 {
2397       width: 40%;
2398       margin: 0;
2399     }
2400
2401     li span, li p {
2402       width: 50%;
2403       margin-left: $lineheight/2;
2404       margin-bottom: $lineheight/4;
2405       white-space: nowrap;
2406     }
2407   }
2408 }
2409
2410 /* Rules for the user notes list */
2411
2412 .note_list {
2413   tr.creator {
2414     background-color: #eeeeee;
2415   }
2416
2417   td {
2418     padding: 3px;
2419   }
2420
2421   p {
2422     margin-bottom: 0px;
2423   }
2424 }
2425
2426 /* Rules for the iD editor */
2427
2428 .id-embed {
2429   width: 100%;
2430   height: 100%;
2431 }
2432
2433 /* Rules for dropdown menus */
2434
2435 .dropdown {
2436   position: relative;
2437 }
2438
2439 .dropdown-toggle {
2440   *margin-bottom: -3px;
2441 }
2442
2443 .dropdown-toggle:active,
2444 .open .dropdown-toggle {
2445   outline: 0;
2446 }
2447
2448 .caret {
2449   display: inline-block;
2450   width: 0;
2451   height: 0;
2452   vertical-align: top;
2453   border-top: 4px solid #000000;
2454   border-right: 4px solid transparent;
2455   border-left: 4px solid transparent;
2456   content: "";
2457 }
2458
2459 .dropdown .caret {
2460   margin-top: 8px;
2461   margin-left: 2px;
2462 }
2463
2464 .dropdown-menu {
2465   position: absolute;
2466   top: 100%;
2467   left: -1px;
2468   z-index: 1000;
2469   display: none;
2470   float: left;
2471   min-width: 160px;
2472   padding: 5px 0;
2473   margin: 0;
2474   list-style: none;
2475   background-color: #ffffff;
2476   border: 1px solid #ccc;
2477   border-radius: 0 3px 3px;
2478   *border-right-width: 2px;
2479   *border-bottom-width: 2px;
2480   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
2481   background-clip: padding-box;
2482 }
2483
2484 .dropdown-menu.pull-right {
2485   right: 0;
2486   left: auto;
2487 }
2488
2489 .dropdown-menu .divider {
2490   *width: 100%;
2491   height: 1px;
2492   margin: 9px 1px;
2493   *margin: -5px 0 5px;
2494   overflow: hidden;
2495   background-color: #e5e5e5;
2496   border-bottom: 1px solid #ffffff;
2497 }
2498
2499 .dropdown-menu > li > a {
2500   display: block;
2501   padding: 3px 10px;
2502   clear: both;
2503   font-weight: normal;
2504   line-height: 20px;
2505   color: #333333;
2506   white-space: nowrap;
2507 }
2508
2509 .dropdown-menu > li > a:hover,
2510 .dropdown-menu > li > a:focus,
2511 .dropdown-submenu:hover > a,
2512 .dropdown-submenu:focus > a {
2513   color: #ffffff;
2514   text-decoration: none;
2515   background-color: $green;
2516 }
2517
2518 .dropdown-menu > .active > a,
2519 .dropdown-menu > .active > a:hover,
2520 .dropdown-menu > .active > a:focus {
2521   color: #ffffff;
2522   text-decoration: none;
2523   background-color: $green;
2524   outline: 0;
2525 }
2526
2527 .dropdown-menu > .disabled > a,
2528 .dropdown-menu > .disabled > a:hover,
2529 .dropdown-menu > .disabled > a:focus {
2530   color: #999999;
2531 }
2532
2533 .dropdown-menu > .disabled > a:hover,
2534 .dropdown-menu > .disabled > a:focus {
2535   text-decoration: none;
2536   cursor: default;
2537   background-color: transparent;
2538   background-image: none;
2539 }
2540
2541 .open {
2542   *z-index: 1000;
2543 }
2544
2545 .open > .dropdown-menu {
2546   display: block;
2547 }
2548
2549 .dropdown-backdrop {
2550   position: fixed;
2551   top: 0;
2552   right: 0;
2553   bottom: 0;
2554   left: 0;
2555   z-index: 990;
2556 }
2557
2558 /* Rules for the "Welcome" page */
2559 .site-welcome, .site-fixthemap {
2560   .center {
2561     text-align: center;
2562     .sprite {
2563       float: none;
2564       margin: auto;
2565     }
2566   }
2567
2568   .sprite {
2569     background-image: image-url("welcome-sprite.png");
2570     background-size: 500px 250px;
2571     display: block;
2572     float: left;
2573   }
2574
2575   .icon-list {
2576     padding-bottom: 20px;
2577     div {
2578       margin-bottom: 10px;
2579       p {
2580         padding-top: 10px;
2581       }
2582     }
2583   }
2584   .sprite.small {
2585     width: 50px;
2586     height: 50px;
2587   }
2588
2589   .sprite.x {
2590     background-position: -50px 0;
2591   }
2592
2593   .sprite.term {
2594     margin-right: 10px;
2595     vertical-align: middle;
2596   }
2597
2598   .sprite.node {
2599     background-position: -100px 0;
2600   }
2601
2602   .sprite.way {
2603     background-position: -150px 0;
2604   }
2605
2606   .sprite.tag {
2607     background-position: -200px 0;
2608   }
2609
2610   .sprite.editor {
2611     background-position: -250px 0;
2612   }
2613
2614   .sprite.question {
2615     background-position: -300px 0;
2616   }
2617
2618   .sprite.rules {
2619     background-position: -350px 0;
2620   }
2621
2622   .start-mapping {
2623     margin: auto;
2624     cursor: pointer;
2625     border: none;
2626     padding: 20px 40px;
2627     font-size: 30px;
2628     text-decoration: none;
2629   }
2630
2631   .note-box {
2632     margin-top: 20px;
2633     background-color: $offwhite;
2634   }
2635
2636   .icon.note {
2637     background-color: #333;
2638     border-radius: 4px;
2639   }
2640 }
2641
2642 .site-about #content {
2643   //background-color: #000;
2644   background-color: #eee;
2645   background-position: 50% 50%;
2646   background-repeat: no-repeat;
2647   background-size: cover;
2648   background-attachment: fixed;
2649
2650   .caption {
2651     max-width: 200px;
2652     font: 13px/20px Helvetica, Arial, sans-serif;
2653     position: fixed;
2654     text-align: right;
2655     right: 20px;
2656     bottom: 60px;
2657     text-shadow: #000 0px 1px 5px;
2658     color: #eee;
2659     opacity: 0.8;
2660     display: none;
2661   }
2662
2663   .caption a {
2664     color: white;
2665     white-space: nowrap;
2666     text-decoration: none;
2667   }
2668
2669   a.next {
2670     display: block;
2671     position: fixed;
2672     right: 10px;
2673     bottom: 10px;
2674     width: 40px;
2675     height: 40px;
2676     border-radius: 5px;
2677     text-indent: -9999px;
2678     overflow: hidden;
2679     background: image-url('about/sprite.png') -120px 0px no-repeat;
2680     background-color: #000;
2681     background-color: rgba(0, 0, 0, 0.5);
2682   }
2683
2684   .content-inner {
2685     position: relative;
2686     color: #333;
2687     min-width: 320px;
2688     max-width: 640px;
2689
2690     .section {
2691       margin-bottom: 30px;
2692     }
2693
2694     .section:last-child {
2695       margin-bottom: 0;
2696     }
2697   }
2698
2699   .text {
2700     background: white;
2701     padding: 40px;
2702   }
2703
2704   .attr {
2705     position: relative;
2706     padding: 170px 40px 20px;
2707     background: #333;
2708     background: rgba(0, 0, 0, .8);
2709     margin-bottom: 0;
2710     margin-top: -20px;
2711
2712     h1 {
2713       display: block;
2714       color: white;
2715       font-weight: 300;
2716       font-size: 34px;
2717       span {
2718         color: #76c551;
2719       }
2720     }
2721
2722     .user-image {
2723       position: absolute;
2724       top: 0px;
2725       right: 240px;
2726       left: 0px;
2727       height: 150px;
2728       background-position: 0 50%;
2729       background-repeat: no-repeat;
2730       background-image: image-url('about/osm.png');
2731       background-size: cover;
2732       background-color: #76c551;
2733     }
2734
2735     .byosm {
2736       position: absolute;
2737       top: 0px;
2738       right: 0px;
2739       z-index: 1;
2740       width: 240px;
2741       height: 150px;
2742       padding: 20px 20px 20px 40px;
2743       font: 500 20px/24px Helvetica, Arial, sans-serif;
2744       white-space: nowrap;
2745       color: #fff;
2746       background: #76c551;
2747     }
2748
2749     .byosm span {
2750       display: inline-block;
2751       width: 20px;
2752       margin-left: -20px;
2753     }
2754   }
2755
2756   h2 {
2757     margin-bottom: 10px;
2758   }
2759
2760   .icon {
2761     width: 30px;
2762     height: 30px;
2763     margin-right: 10px;
2764     vertical-align: middle;
2765     background: 40px 40px image-url('about/sprite.png') no-repeat;
2766
2767     &.local        { background-position: 0px    0px; }
2768     &.community    { background-position: 0px  -40px; }
2769     &.open         { background-position: 0px  -80px; }
2770     &.partners     { background-position: 0px -120px; }
2771     &.infringement { background-position: 0px -160px; }
2772     &.legal        { background-position: -45px -160px; }
2773   }
2774 }
2775
2776 @import 'browse';
2777
2778 @media only screen and (max-width:960px) {
2779   .header-illustration.new-user-arm {
2780     display: none;
2781   }
2782 }