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