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