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