]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Merge remote-tracking branch 'upstream/pull/3237'
[rails.git] / app / assets / stylesheets / common.scss
1 @import "parameters";
2 @import "bootstrap";
3 @import "rails_bootstrap_forms";
4
5 /* Styles common to large and small screens */
6
7 /* Default rules for the body of every page */
8
9 body {
10   font-size: $typeheight;
11 }
12
13 p > img {
14   width: auto;
15   max-width: 100%;
16 }
17
18 small, aside {
19   font-size: 12px;
20 }
21
22 #container { position: relative; }
23
24 .small_icon {
25   vertical-align: middle;
26   margin-right: $lineheight/4;
27 }
28
29 [dir=rtl] { /* no-r2 */ text-align: right; }
30
31 [dir=ltr] { /* no-r2 */ text-align: left; }
32
33 /* Rules for icons */
34
35 .icon {
36   display: inline-block;
37   vertical-align: top;
38   width: 20px;
39   height: 20px;
40   background: transparent image-url("sprite.png") no-repeat 0 0;
41   background-image: image-url("sprite.svg");
42   text-indent: -9999px;
43   overflow: hidden;
44 }
45
46 .icon.search      { /* no-r2 */ background-position: 0 0; }
47 .icon.donate      { /* no-r2 */ background-position: -20px 0; }
48 .icon.zoomin      { /* no-r2 */ background-position: -40px 0; }
49 .icon.zoomout     { /* no-r2 */ background-position: -60px 0; }
50 .icon.geolocate   { /* no-r2 */ background-position: -80px 0; }
51 .active .icon.geolocate   { /* no-r2 */ background-position: -80px -20px; }
52 .icon.layers      { /* no-r2 */ background-position: -100px 0; }
53 .icon.key         { /* no-r2 */ background-position: -120px 0; }
54 .icon.share       { /* no-r2 */ background-position: -140px 0; }
55 .icon.clipboard   { /* no-r2 */ background-position: -160px 0; }
56 .icon.link        { /* no-r2 */ background-position: -180px 0; }
57 .icon.close       { /* no-r2 */ background-position: -200px 0; }
58 .close-wrap:hover .icon.close,
59 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
60 .icon.check       { /* no-r2 */ background-position: -220px 0; }
61 .icon.note        { /* no-r2 */ background-position: -240px 0; }
62 .icon.note.grey   { /* no-r2 */ background-position: -240px -20px; }
63 .icon.query       { /* no-r2 */ background-position: -260px 0; }
64
65 /* Rules for links */
66
67 a {
68   color: #24d;
69   text-decoration: none;
70   outline: 0;
71   &:hover {
72     text-decoration: underline;
73   }
74 }
75
76 /* Utility for de-emphasizing content */
77
78 .text-muted a {
79   color: $blue;
80 }
81
82 /* Rules for the header */
83
84 #menu-icon {
85   display: none !important;
86   float: right;
87   background: image-url("menu-icon.png") no-repeat;
88   background-size: 30px 30px;
89   display: block;
90   width: 30px;
91   height: 30px;
92   margin: 14px 10px 0 0;
93   opacity: 0.6;
94 }
95
96 header {
97   height: $headerHeight;
98   position: relative;
99   z-index: 1001;
100   font-size: 14px;
101
102   h1, nav, nav > ul, nav > ul > li {
103     display: inline-block;
104   }
105
106   > * {
107     height: 100%;
108     padding: $lineheight/2;
109   }
110
111   h1, nav.primary {
112     float: left;
113   }
114
115   a, a:hover {
116     text-decoration: none;
117   }
118
119   img.logo {
120     width: 30px;
121     height: 30px;
122     margin-top: -2px;
123     vertical-align: middle;
124   }
125
126   h1 {
127     font-size: 18px;
128     font-weight: 600;
129     line-height: 1.2;
130     margin: 0;
131     padding-top: 15px;
132
133     a {
134       color: #000;
135     }
136
137     a:hover {
138       color: #000;
139     }
140   }
141
142   .btn {
143     font-size: 14px;
144   }
145 }
146
147
148 nav.primary {
149   .btn-outline-primary {
150     @include button-outline-variant($green, $white);
151   }
152
153   .disabled {
154     .btn-outline-primary {
155       color: $grey;
156       cursor: default;
157
158       .caret {
159         border-top-color: $grey;
160       }
161
162       &:hover {
163         background-color: lighten($green, 30%);
164       }
165     }
166   }
167
168   // Small tweaks to the toggle to stop the primary colour showing through
169   // when the menu is shown
170   .show > .btn-outline-primary.dropdown-toggle {
171     background-color: $green;
172     border-color: $green;
173
174     &:focus {
175       box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
176     }
177   }
178 }
179
180 nav.secondary {
181   position: absolute;
182   right: 0;
183
184   .nav-link {
185     padding: 0.2rem;
186     color: $darkgrey;
187   }
188
189   > ul li.current a {
190     color: darken($darkgrey, 25%);
191   }
192
193   .login-menu {
194     .btn-outline-secondary {
195       @include button-outline-variant($darkgrey);
196     }
197   }
198
199   .user-menu {
200     .btn-outline-secondary {
201       @include button-outline-variant($darkgrey, $darkgrey, white, $darkgrey);
202       border-color: $grey;
203       &:hover {
204         border-color: $grey;
205       }
206       &:focus {
207         background-color: white;
208         box-shadow: none;
209       }
210     }
211     &.show .btn-outline-secondary {
212       background-color: white;
213       &:focus {
214         box-shadow: none;
215       }
216     }
217   }
218
219   img.user_thumbnail_tiny {
220     border: 0;
221     border-radius: 3px;
222   }
223
224   #inboxanchor {
225     display: inline-block;
226     height: 25px;
227     margin: 3px 0 3px 3px;
228     background-color: lighten($grey, 10%);
229     line-height: 20px;
230     border-radius: 3;
231   }
232
233   .dropdown-menu {
234     .count-number {
235       font-size: 14px;
236     }
237   }
238 }
239
240 nav.primary, nav.secondary {
241   .dropdown-item {
242     &:hover, &:active {
243       background-color: $green;
244       color: white;
245     }
246   }
247 }
248
249 #compact-secondary-nav {
250   display: none;
251 }
252
253 body.compact-nav {
254   #compact-secondary-nav {
255     display: inline-block;
256   }
257   .compact-hide {
258     display: none;
259   }
260 }
261
262 /* Utility for styling notification numbers */
263
264 .count-number {
265   padding: 2px $lineheight/4;
266   border-radius: 2px;
267   background: lighten($green, 30%);
268   margin: 0 2px;
269   font-size: 11px;
270   color: #333;
271 }
272
273 /* Rules for the message shown in place of the map when javascript is disabled */
274
275 #noscript {
276   z-index: 20000000;
277   margin-left: 400px;
278   margin-top: 50px;
279 }
280
281 /* Rules for Leaflet maps */
282
283 .leaflet-control .control-button {
284   display: block;
285   height: 40px;
286   width: 40px;
287   background-color: #333;
288   background-color: rgba(0,0,0,.6);
289   border-radius: 4px 0 0 4px;
290   margin-bottom: 10px;
291   outline: none;
292
293   &:hover {
294     background-color: black;
295   }
296
297   &.disabled,
298   &.leaflet-disabled {
299     background-color: #333;
300     background-color: rgba(0,0,0,.5);
301     cursor: default;
302   }
303
304   &.active {
305     background-color: $vibrant-green;
306   }
307
308   .icon {
309     margin: 10px;
310   }
311 }
312
313 .leaflet-control .zoomin,
314 .control-layers .control-button {
315   margin-bottom: 0px;
316   border-radius: 4px 0 0 0;
317 }
318
319 .leaflet-control .zoomout,
320 .control-key .control-button {
321   margin-bottom: 0;
322   border-radius: 0;
323 }
324
325 .control-locate .control-button,
326 .control-share .control-button {
327   border-radius: 0 0 0 4px;
328 }
329
330 /* Rules for the sidebar and main map area */
331
332 .map-layout {
333   #content {
334     overflow: hidden;
335     position: absolute;
336     top: $headerHeight;
337     bottom: 0;
338     width: 100%;
339   }
340
341   #sidebar, #map {
342     position: relative;
343     height: 100%;
344     overflow-x: hidden;
345     overflow-y: auto;
346   }
347
348   #sidebar {
349     float: left;
350     width: $sidebarWidth;
351     background: #fff;
352
353     #sidebar_loader {
354       display: none;
355     }
356
357     #sidebar_content {
358       padding: $spacer;
359     }
360
361     > div {
362       position: relative;
363       float: left;
364       clear: both;
365       width: 100%;
366     }
367
368     h2 {
369       font-size: 1.5rem;
370     }
371
372     h3, h4 {
373       margin-top: $lineheight;
374       margin-bottom: $lineheight/2;
375       font-size: 1.25rem;
376     }
377
378     .close-wrap {
379       cursor: pointer;
380       position: absolute;
381       top: 0;
382       right: 0;
383       width: 60px;
384       height: 60px;
385
386       .icon.close {
387         pointer-events: none;
388         position: absolute;
389         right: 20px;
390         top: 20px;
391       }
392     }
393
394     .icon.close {
395       float: right;
396       cursor: pointer;
397     }
398
399     .flash {
400       padding: 15px;
401
402       picture {
403         margin-right: -25px;
404       }
405
406       div.message {
407         margin-left: 30px;
408       }
409     }
410   }
411
412   .overlay-sidebar #sidebar {
413     position: absolute;
414     z-index: 1000;
415     height: auto;
416     overflow: hidden;
417
418     #banner {
419       display: block;
420     }
421
422     .welcome {
423       display: none;
424
425       &.visible {
426         display: block;
427       }
428     }
429
430     #sidebar_content {
431       display: none;
432     }
433   }
434
435   .welcome {
436     display: none;
437
438     p {
439       font-size: 110%;
440       font-weight: 300;
441     }
442   }
443
444   #banner {
445     display: none;
446
447     img {
448       display: block;
449       width: $sidebarWidth;
450     }
451   }
452
453   #map {
454     height: 100%;
455     overflow: hidden;
456
457     &.query-active {
458       cursor: help;
459     }
460
461     &.query-disabled {
462       cursor: not-allowed;
463     }
464
465     .leaflet-marker-draggable {
466       cursor: move;
467     }
468   }
469
470   #map-ui {
471     display: none;
472     position: relative;
473     float: right;
474     width: 250px;
475     height: 100%;
476     background: white;
477     overflow: auto;
478
479     .section {
480       border-bottom: 1px solid $grey;
481       padding: 10px 20px;
482     }
483
484     a.close-button {
485       float: right;
486       padding:5px;
487       font-size:20px;
488       line-height:10px;
489       color:#222;
490       border:1px solid $grey;
491     }
492
493     .tooltip {
494       opacity: 1;
495       border: 1px solid $grey;
496       .tooltip-arrow {
497         border-top-color: $grey;
498       }
499     }
500   }
501 }
502
503 .layers-ui,
504 .share-ui {
505   li:last-child {
506     margin-bottom: 0;
507   }
508 }
509
510 .layers-ui {
511   .base-layers {
512     .leaflet-container {
513       width: 100%;
514       height: 50px;
515       cursor: pointer;
516     }
517
518     li  {
519       overflow: hidden;
520       border-radius: 3px;
521       border: 2px solid #fff;
522       margin-bottom: 8px;
523       position: relative;
524       transition: border-color 0.08s ease-in;
525
526       label {
527         position: absolute;
528         top: 0;
529         left: 0;
530         padding: 2px 6px;
531         border-bottom-right-radius: 3px;
532         cursor: pointer;
533         font-weight: 600;
534         font-size: 16px;
535         text-stroke: 2px #fff;
536         background: rgba(255,255,255,.9);
537         z-index: 1000;
538         input[type="radio"] {
539           display: none;
540         }
541       }
542
543       &.active { border-color: darken($green, 10%); }
544       &:hover {
545         border-color: $grey;
546         &.active { border-color: darken($green, 20%); }
547       }
548     }
549   }
550
551   .overlay-layers {
552     p {
553       font-size: 13px;
554       margin-bottom: 8px;
555     }
556     li.disabled { color: $darkgrey; }
557   }
558 }
559
560 .share-ui {
561   .share-tabs {
562     margin-bottom: 10px;
563
564     a {
565       color: #fff;
566       text-decoration: none;
567       background-color: $lightblue;
568       padding: 5px 10px;
569       border-right: 1px solid #fff;
570     }
571
572     a:first-child {
573       border-right: 1px solid #fff;
574       border-radius: 4px 0 0 4px;
575     }
576
577     a:last-child {
578       border-radius: 0 4px 4px 0;
579     }
580
581     a.active {
582       background-color: $blue;
583     }
584   }
585
586   .share-tab {
587     display: none;
588   }
589
590   .share-link {
591     input[type=text],
592     textarea {
593       width: 100%;
594       font-family: monospace;
595       font-size: small;
596       line-height: 1.3;
597     }
598   }
599
600   .share-image {
601     label {
602       margin-right: 10px;
603     }
604   }
605
606   #embed_html {
607     resize: vertical;
608   }
609
610   #mapnik_scale {
611     width: 100px;
612   }
613 }
614
615 .leaflet-top {
616   top: $lineheight/2 !important;
617   .leaflet-control {
618     margin-right: 0px !important;
619     margin-top: 0px !important;
620   }
621 }
622
623 .leaflet-popup-scrolled {
624   padding-right: $lineheight;
625   border-bottom: 0px !important;
626   border-top: 0px !important;
627 }
628
629 .leaflet-popup-content-wrapper {
630   border-radius: 4px !important;
631 }
632
633 /* Rules for attribution text under the main map shown on printouts */
634
635 #attribution {
636   display: none;
637
638   table {
639     width: 100%
640   }
641 }
642
643 .attribution_license,
644 .attribution_project {
645   text-align: left;
646 }
647
648 .attribution_notice {
649   text-align: center;
650 }
651
652 .donate-attr { color: darken($green, 10%) !important; }
653
654 /* Rules for the sidebar */
655
656 .sidebar_heading {
657   position: relative;
658   padding: $lineheight/2 $lineheight;
659   // background: $offwhite;
660   // border-bottom: 1px solid $grey;
661   > .close {
662     float: right;
663     margin-top: 2px;
664     cursor: pointer;
665   }
666 }
667
668 #browse_status {
669   input {
670     display: block;
671     margin-left: auto;
672     margin-right: auto;
673   }
674
675   > div {
676    padding: $spacer;
677   }
678 }
679
680 #sidebar {
681   #sidebar_loader,
682   .search_more {
683     width: 100%;
684     margin: $lineheight auto;
685   }
686
687   .loader {
688     text-align: center;
689     margin: auto;
690     width: 40px;
691     display: block;
692   }
693 }
694
695 /* Temporary label size override until we remove site-wide font customisation */
696
697 form {
698   label {
699     font-size: 16px;
700   }
701 }
702
703 /* Rules for the search and direction forms */
704
705 header .search_forms,
706 .directions_form {
707   display: none;
708 }
709
710 /* Rules for the map key which appears in the popout sidebar */
711
712 #mapkey {
713  .mapkey-table-key img {
714     display: block;
715     margin-left: auto;
716     margin-right: auto;
717   }
718 }
719
720 /* Rules for search sidebar */
721
722 #sidebar .search_results_entry {
723   ul li {
724     cursor: pointer;
725     &.selected { background: $list-highlight; }
726   }
727
728   .search_more .loader {
729     display: none;
730     width: 100%;
731   }
732 }
733
734 .search_results_error {
735   color: #f00;
736   padding: 10px 20px;
737 }
738
739 /* Rules for routing */
740
741 div.direction {
742   background-image: image-url('routing-sprite.png');
743   width: 20px;
744   height: 20px;
745   background-repeat: no-repeat;
746 }
747 @for $i from 0 through 25 {
748 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
749 }
750
751 td.instruction, td.distance {
752     padding-top: $lineheight/5;
753     padding-bottom: $lineheight/5;
754     border-bottom: 1px solid $grey;
755 }
756 td.distance {
757     color: $darkgrey;
758     text-align: right;
759     font-size: x-small;
760 }
761 tr.turn {
762     cursor: pointer;
763 }
764 tr.turn:hover {
765     background: $list-highlight;
766 }
767
768 .routing_marker { width: 15px; cursor: move; }
769
770 /* Rules for entity history */
771
772 #sidebar_content {
773   .browse_details {
774     position: relative;
775     border-bottom: $keyline;
776   }
777 }
778
779 .browse_status {
780   display: none;
781 }
782
783 /* Rules for the history sidebar */
784
785 #sidebar .changesets {
786   li {
787     cursor: pointer;
788
789     &.selected { background: $list-highlight; }
790     /* color is derived from changeset bbox fillColor in history.js */
791   }
792
793   .comments {
794     float: right;
795     color: $darkgrey;
796   }
797
798   .comments-0 {
799     opacity: 0.5;
800   }
801
802   .changeset_more .loader {
803     display: none;
804     width: 100%;
805   }
806 }
807
808 /* Rules for the browse sidebar */
809
810 #sidebar_content {
811   .browse-section {
812     padding-bottom: $spacer;
813     margin-bottom: $spacer;
814     border-bottom: 1px solid $grey;
815
816     h4:first-child {
817       margin-top: 0;
818       word-wrap: break-word;
819     }
820   }
821
822   .browse-section:last-of-type {
823     border-bottom: none;
824   }
825
826   .paginate {
827     float: right;
828     padding: 1px 6px;
829     border: 1px solid $lightgrey;
830     border-radius: 3px;
831   }
832
833   .browse-field {
834     margin-bottom: 10px;
835
836     h4 {
837       padding: 5px 0 5px 10px;
838       font-size: 12px;
839       border: 1px solid $grey;
840       border-radius: 4px 4px 0 0;
841       background-color: $offwhite;
842     }
843
844     p {
845       padding: 7px 10px;
846       font-size: 12px;
847       background-color: #FFF;
848       border: 1px solid $grey;
849       border-top: 0;
850       border-radius: 0 0 4px 4px;
851     }
852   }
853
854   .browse-tag-list {
855     background-color: $offwhite;
856     border: 1px solid $grey;
857     border-radius: 3px;
858     table-layout: fixed;
859     border-collapse: separate;
860     border-spacing: 0;
861     width: 100%;
862
863     th, td {
864       border-bottom: 1px solid $grey;
865     }
866
867     tr:last-child th, tr:last-child td {
868       border-bottom: 0;
869     }
870
871     .browse-tag-k,
872     .browse-tag-v {
873       width: 50%;
874       padding: 6px 10px;
875       word-wrap: break-word;
876       white-space: pre-wrap;
877     }
878
879     .browse-tag-k {
880       font-weight: 500;
881       background-color: $offwhite;
882     }
883
884     .browse-tag-v {
885       border-left: 1px solid $grey;
886       background-color: #fff;
887     }
888
889     .colour-preview-box {
890       float: right;
891       width: 14px;
892       height: 14px;
893       margin: 4px 0px;
894       border: 1px solid rgba(0, 0, 0, .1);
895       // add color via inline css on element: background-color: <tag value>;
896     }
897   }
898
899   .note-comments li, .changeset-comments li {
900     margin: $lineheight/2 0;
901
902     p {
903       margin: 10px 6px 0 6px;
904       line-height: 1.5;
905     }
906   }
907
908   .comments-header {
909     float: left;
910   }
911
912   .subscribe-buttons {
913     float: left;
914     margin: 18px 10px 10px;
915     min-width: 80px;
916   }
917
918   .subscribe-buttons input {
919     font-size: 90%;
920     line-height: 15px;
921     min-height: 20px;
922   }
923
924   span.action-button:hover {
925     cursor: pointer;
926     text-decoration: underline;
927   }
928
929   .note-description {
930     overflow: hidden;
931     margin: 0 0 10px 10px;
932   }
933
934   .query-results {
935     display: none;
936
937     ul {
938       li {
939         &.query-result {
940           cursor: pointer;
941         }
942
943         &.selected {
944           background: $list-highlight;
945         }
946       }
947     }
948   }
949 }
950
951 /* Bootstrap buttons don't have any vertical margin, so
952    they touch when adjacent buttons wrap onto a new line
953    e.g. wide form buttons on a narrow sidebar */
954
955 .btn-wrapper {
956   > .btn {
957     margin-bottom: $spacer * 0.25;
958   }
959 }
960
961 /* Rules for export sidebar */
962
963 .export_form {
964   .export_area_inputs,
965   .export_button {
966     text-align: center;
967   }
968
969   .export_area_inputs {
970     margin-bottom: $lineheight/2;
971     input[type="text"] {
972       width: 100px;
973       text-align: center;
974     }
975   }
976
977   .export_boxy {
978     background: $lightgrey;
979     border: 1px solid $grey;
980     border-radius: 3px;
981
982     #maxlat { margin-top: -1px; }
983     #minlon {
984       float: left;
985       /* no-r2 */ margin-left: -1px;
986     }
987     #maxlon {
988       float: right;
989       /* no-r2 */ margin-right: -1px;
990     }
991     #minlat { margin-bottom: -1px; }
992   }
993
994   .export_bound {
995     margin: $lineheight/4;
996   }
997
998   dl {
999     padding-left: $lineheight/2;
1000     dd {
1001       margin-left: 0;
1002       margin-bottom: 10px;
1003     }
1004   }
1005 }
1006
1007 /* Rules for edit pages */
1008
1009 .site-edit {
1010   #content {
1011     position: absolute;
1012     top: $headerHeight;
1013     bottom: 0;
1014     width: 100%;
1015   }
1016
1017   #map {
1018     height: 100%;
1019     overflow: hidden;
1020   }
1021 }
1022
1023 /* Rules for non-map content pages */
1024
1025 .content-heading {
1026   background: $lightgrey;
1027 }
1028
1029 .content-inner {
1030   position: relative;
1031   max-width: 960px;
1032   margin: auto;
1033   padding: $lineheight;
1034 }
1035
1036 /* Overrides for pages that use new layout conventions */
1037
1038 .users-new,
1039 .users-create,
1040 .users-terms,
1041 .users-confirm {
1042   .content-heading .content-inner {
1043     height: 200px;
1044   }
1045 }
1046
1047 .header-illustration {
1048   background-position: 0 0;
1049   background-repeat: no-repeat;
1050   position: absolute;
1051   height: 200px;
1052   width: 100%;
1053   left: 0;
1054   bottom: 0;
1055
1056   &.new-user-main {
1057     background-image: image-url("sign-up-illustration.png");
1058   }
1059
1060   &.confirm-main {
1061     background-image: image-url("confirm-illustration.png");
1062   }
1063
1064   &.new-user-terms {
1065     background-image: image-url("terms-illustration.png");
1066   }
1067
1068   &.new-user-arm {
1069     height: 110px;
1070     width: 130px;
1071     left: 260px;
1072     top: 160px;
1073     background-image: image-url("sign-up-illustration-arm.png");
1074     z-index: 100;
1075   }
1076 }
1077
1078 [dir=rtl] .header-illustration {
1079   transform: scaleX(-1);
1080 }
1081
1082 #content.maximised {
1083   top: 0;
1084   left: 0;
1085   right: 0;
1086   bottom: 0;
1087   border: 0;
1088   z-index: 2000;
1089 }
1090
1091 /* Rules for small maps in content areas */
1092
1093 .content_map {
1094   height: 200px;
1095   border: 1px solid $grey;
1096   margin-bottom: $lineheight;
1097 }
1098
1099 @include media-breakpoint-up(md) {
1100   .content_map {
1101     height: 400px;
1102   }
1103 }
1104
1105 /* Rules for the user profile page */
1106
1107 #userinformation {
1108   min-height: 100px;
1109   .userinformation-inner {
1110     float: left;
1111   }
1112   .user-description {
1113     width: 100%;
1114     clear: both;
1115   }
1116 }
1117
1118 .admin-user-info small {
1119   margin-bottom: $lineheight/2;
1120   display: inline;
1121   margin-right: $lineheight;
1122 }
1123
1124 .contact-activity {
1125   margin-top: $lineheight;
1126   width: 100%;
1127 }
1128
1129 .activity-details p {
1130   margin-left: 70px;
1131   margin-bottom: 0;
1132 }
1133
1134 .users-show {
1135   // Silly exception; remove when user page is redesigned.
1136   .content-inner {
1137     max-width: none;
1138   }
1139   p#no_home_location {
1140     margin: $lineheight;
1141   }
1142   .user_thumbnail {
1143     margin-top: $lineheight/4;
1144     float: left;
1145   }
1146 }
1147
1148 /* Rules for the user map */
1149
1150 .content_map .leaflet-popup-content {
1151   margin: $lineheight/2;
1152   min-height: 50px;
1153 }
1154
1155 /* Rules for user popups on maps */
1156
1157 .user_popup {
1158   min-width: 200px;
1159   p {
1160     padding: 0 0 5px 0;
1161     margin-top: 0 0 0 60px;
1162     font-size: 12px;
1163   }
1164   img.user_thumbnail {
1165     float: left;
1166     margin: 0 $lineheight/2 0 0;
1167   }
1168 }
1169
1170 /* Rules for the user list */
1171
1172 #user_list {
1173   width: 100%;
1174
1175   tr {
1176     vertical-align: middle;
1177   }
1178
1179   p {
1180     margin-top: 0px;
1181     margin-bottom: 0px;
1182   }
1183 }
1184
1185 #user_list_actions {
1186   float: right;
1187   margin-top: $lineheight/2;
1188 }
1189
1190 /* Rules for the diary list page */
1191
1192 .diary_post {
1193   position: relative;
1194   padding-top: $lineheight;
1195   padding-bottom: $lineheight/2;
1196   border-top: 1px solid $grey;
1197
1198   &:first-of-type {
1199     margin-top: $lineheight/2;
1200   }
1201
1202   &.deleted {
1203     background-color: #fee;
1204   }
1205
1206   .post_heading {
1207     margin-bottom: $lineheight;
1208
1209     h2 {
1210       margin-top: 0;
1211       margin-bottom: $lineheight/2;
1212     }
1213   }
1214
1215   img.user_thumbnail {
1216     float: left;
1217   }
1218 }
1219
1220 /* Rules for the diary entry page */
1221
1222 .diary_entries {
1223   #map {
1224     height: 400px;
1225     border: 1px solid $grey;
1226     display: none;
1227     margin-bottom: $lineheight;
1228   }
1229   .comments {
1230     max-width: 740px;
1231   }
1232   .diary-comment {
1233     border-top: 1px dashed $grey;
1234     padding-top: $lineheight/2;
1235     padding-bottom: $lineheight/2;
1236     &:first-child {
1237       margin-top: $lineheight/2;
1238       padding-top: $lineheight;
1239       border-top: 1px solid $grey;
1240     }
1241     &.deleted {
1242       background-color: #fee;
1243     }
1244     p {
1245       margin-bottom: $lineheight/2;
1246     }
1247     .comment-heading {
1248       margin-bottom: 0;
1249       margin-top: 0;
1250     }
1251   }
1252 }
1253
1254 .diary_entries-show img.user_thumbnail {
1255   float: left;
1256 }
1257
1258 /* Rules for the log in page */
1259
1260 #login_auth_buttons {
1261   margin-bottom: 0;
1262
1263   li {
1264     float: left;
1265     padding: $lineheight/4 $lineheight/2;
1266   }
1267 }
1268
1269 /* Rules for the account confirmation page */
1270
1271 .users-terms {
1272   .legale {
1273     border: 1px solid $grey;
1274     padding: $lineheight;
1275     margin-bottom: $lineheight;
1276     overflow: auto;
1277     height: 20em;
1278
1279     li {
1280       list-style: inherit;
1281     }
1282
1283     ol ol {
1284       list-style-type: lower-alpha;
1285     }
1286   }
1287 }
1288
1289 /* Rules for the account settings page */
1290
1291 #accountForm .user_image {
1292   margin-bottom: 0;
1293 }
1294
1295 #accountForm #user_image {
1296   margin-left: 20px;
1297 }
1298
1299 #accountForm ul.accountImage-options {
1300   margin-left: 120px;
1301 }
1302
1303 .nohome .location {
1304   display: none;
1305 }
1306
1307 #homerow .message {
1308   display: none;
1309 }
1310
1311 .nohome .message {
1312   display: inline !important;
1313 }
1314
1315 /* Rules for the oauth settings page */
1316
1317 .oauth_clients .buttons .oauth-edit {
1318   border-radius: 2px 0 0 2px;
1319 }
1320
1321 .oauth_clients .buttons .oauth-delete {
1322   border-radius: 0 2px 2px 0;
1323 }
1324
1325 /* Rules for the oauth authorization page */
1326
1327 .oauth-authorize ul {
1328   list-style: none;
1329 }
1330
1331 /* Rules for messages pages */
1332
1333 .messages {
1334   input[type="submit"] {
1335     margin: auto;
1336   }
1337
1338   .inbox-row {
1339     background: $offwhite;
1340   }
1341
1342   .inbox-row-unread {
1343     background: #CBEEA7;
1344   }
1345
1346   .right {
1347     float: right;
1348   }
1349 }
1350
1351 .inbox-row .inbox-mark-read {
1352   display: none;
1353 }
1354
1355 .info-line {
1356   margin-bottom: $lineheight;
1357   padding: $lineheight/4 0px 4px 0px;
1358   border-bottom: 1px solid $grey;
1359
1360   form, form div {
1361     display: inline;
1362   }
1363 }
1364
1365 .info-line .user_thumbnail_tiny {
1366   vertical-align: middle;
1367 }
1368
1369 .inbox-sent {
1370   white-space: nowrap;
1371 }
1372
1373 .inbox-mark-unread,
1374 .inbox-mark-read,
1375 .inbox-delete {
1376   width: 1%;
1377 }
1378
1379 .inbox-row-unread .inbox-mark-unread {
1380   display: none;
1381 }
1382
1383 /* Rules for "flash" notice boxes shown at the top of the content area */
1384
1385 .flash {
1386   padding: $lineheight;
1387
1388   &.error {
1389     background-color: #ff7070;
1390   }
1391
1392   &.warning {
1393     background-color: #ffe0cc;
1394   }
1395
1396   &.notice {
1397     background-color: #CBEEA7;
1398   }
1399 }
1400
1401 /* Rules for highlighting fields with rails validation errors */
1402
1403 .formError {
1404   display: inline-block;
1405   padding: 5px 10px;
1406   margin-top: 5px;
1407   border-radius: 4px;
1408   font-size: 12px;
1409   color: #fff;
1410   background-color: #ff7070;
1411 }
1412
1413 /* Rules for rails validation error boxes */
1414
1415 #errorExplanation {
1416   width: 400px;
1417   border: 2px solid #ff7070;
1418   padding: 0 $lineheight/2;
1419   margin-bottom: $lineheight;
1420   background-color: #f0f0f0;
1421
1422   h2 {
1423     margin: 0 -10px 10px -10px;
1424     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1425     font-weight: bold;
1426     font-size: 12px;
1427     background-color: #c00;
1428     color: #fff;
1429     text-align: left;
1430   }
1431
1432   p {
1433     color: #333;
1434     margin-bottom: 0px;
1435     padding: $lineheight/4;
1436   }
1437 }
1438
1439 .search_form {
1440   background-color: $lightgrey;
1441
1442   .describe_location {
1443     top: 6px;
1444     right: 6px;
1445     font-size: 10px;
1446     color: $blue;
1447   }
1448 }
1449
1450 .directions_form {
1451   background-color: $lightgrey;
1452
1453   .loader_copy {
1454     display: none;
1455
1456     img {
1457       vertical-align: middle;
1458     }
1459   }
1460
1461   a.reverse_directions {
1462     cursor: pointer;
1463   }
1464 }
1465
1466 /* Rules for user images */
1467
1468 img.user_image {
1469   max-width: 100px;
1470   max-height: 100px;
1471   border: 1px solid $grey;
1472   margin-bottom: $lineheight;
1473   float: left;
1474   margin-right: $lineheight;
1475 }
1476
1477 img.user_thumbnail {
1478   max-width: 50px;
1479   max-height: 50px;
1480   border: 1px solid $grey;
1481   margin-right: $lineheight;
1482 }
1483
1484 img.user_thumbnail_tiny {
1485   width: auto;
1486   height: auto;
1487   max-width: 25px;
1488   max-height: 25px;
1489   border: 1px solid $grey;
1490 }
1491
1492 /* Rules for geo microformats */
1493
1494 abbr.geo {
1495   border-bottom: none;
1496 }
1497
1498 /* General styles for action lists / subnavs / pager navs */
1499
1500 ul.secondary-actions {
1501   font-style: normal;
1502   margin-bottom: 0;
1503   margin-left: 0;
1504   padding: 0;
1505   &.pager {
1506     display: inline-block;
1507     margin-right: 60px;
1508   }
1509   > li {
1510     display: block;
1511     float: left;
1512     list-style: none;
1513     border-left: 1px solid $grey;
1514     padding-left: $lineheight/2;
1515     margin-right: $lineheight/2;
1516     &:first-child {
1517       border-left: 0;
1518       padding-left: 0;
1519     }
1520     &:last-child {
1521       margin-right: 0px;
1522     }
1523   }
1524 }
1525
1526 div.secondary-actions {
1527   padding: 10px;
1528   text-align: center;
1529 }
1530
1531 .buttons {
1532   min-width: 200px;
1533   input[type="submit"],
1534   input[type="button"],
1535   input[type="reset"],
1536   .button,
1537   .button_to {
1538     box-sizing: border-box;
1539     float: left;
1540     border-radius: 0;
1541     margin:0;
1542     min-width: 75px;
1543     max-width: 180px;
1544     border-right:1px solid white;
1545     text-overflow: ellipsis;
1546     white-space: nowrap;
1547     overflow: hidden;
1548   }
1549   input:first-child,
1550   .button:first-child,
1551   .button_to:first-child {
1552     border-radius:2px 0 0 2px;
1553   }
1554   input:last-child,
1555   .button:last-child,
1556   .button_to:last-child {
1557     border-radius:0 2px 2px 0;
1558     border-right-width: 0;
1559   }
1560   input:only-child,
1561   .button:only-child,
1562   .button_to:only-child,
1563   *[value="Hide"] + input:last-child,
1564   *[value="Hide"] + .button:last-child,
1565   *[value="Hide"] + .button_to:last-child {
1566     border-radius:2px;
1567     border-right-width: 0;
1568   }
1569     /* if a 3-button set has a hidden middle button */
1570   *[value="Hide"] + input:nth-child(3),
1571   *[value="Hide"] + .button:nth-child(3),
1572   *[value="Hide"] + .button_to:nth-child(3) {
1573     border-radius:0 2px 2px 0;
1574     border-right-width: 0;
1575   }
1576   /* if a 3-button set starts with a hidden button */
1577   *[value="Hide"] + input:nth-child(2):not(:last-child),
1578   *[value="Hide"] + .button:nth-child(2):not(:last-child),
1579   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
1580     border-radius:2px 0 0 2px;
1581     border-right-width: 1px;
1582   }
1583 }
1584
1585 /* Customise the background colour of striped tables */
1586
1587 .table-striped > tbody > tr:nth-child(2n+1) > td,
1588 .table-striped > tbody > tr:nth-child(2n+1) > th {
1589    background-color: $offwhite;
1590 }
1591
1592 /* Rules for OpenID logo */
1593
1594 .openid_logo {
1595   vertical-align: text-bottom;
1596   border: 0;
1597 }
1598
1599 /* Rules for rich text */
1600
1601 .richtext,
1602 .prose {
1603   code {
1604     font-size: 13px;
1605     background: $lightgrey;
1606     padding: 2px 3px;
1607   }
1608
1609   pre {
1610     font-size: 13px;
1611     background: $lightgrey;
1612     padding: 2px 3px;
1613     white-space: pre-wrap;
1614
1615     code {
1616       padding: 0;
1617     }
1618   }
1619
1620   img {
1621     padding: $lineheight;
1622     background-color: $offwhite;
1623     display: block;
1624     max-width: 100%;
1625     margin: auto;
1626   }
1627
1628   blockquote {
1629     border-left: $lineheight solid $offwhite;
1630     padding-left: $lineheight;
1631     margin: 0;
1632     color: $darkgrey;
1633   }
1634 }
1635
1636 .comments .richtext {
1637   margin-left: 70px;
1638 }
1639
1640 /* Rules for the user notes list */
1641
1642 .note_list {
1643   tr.creator {
1644     background-color: $offwhite;
1645   }
1646 }
1647
1648 /* Rules for the iD editor */
1649
1650 .id-embed {
1651   width: 100%;
1652   height: 100%;
1653 }
1654
1655 /* Rules for the "Welcome" page */
1656 .site-welcome, .site-fixthemap {
1657   .center {
1658     text-align: center;
1659     .sprite {
1660       float: none;
1661       margin: auto;
1662     }
1663   }
1664
1665   .sprite {
1666     background-image: image-url("welcome-sprite.png");
1667     background-size: 500px 250px;
1668     display: block;
1669     float: left;
1670   }
1671
1672   .icon-list {
1673     padding-bottom: 20px;
1674     div {
1675       margin-bottom: 10px;
1676       p {
1677         padding-top: 10px;
1678       }
1679     }
1680   }
1681   .sprite.small {
1682     width: 50px;
1683     height: 50px;
1684   }
1685
1686   .sprite.x {
1687     /* no-r2 */ background-position: -50px 0;
1688   }
1689
1690   .sprite.term {
1691     margin-right: 10px;
1692     vertical-align: middle;
1693   }
1694
1695   .sprite.node {
1696     /* no-r2 */ background-position: -100px 0;
1697   }
1698
1699   .sprite.way {
1700     /* no-r2 */ background-position: -150px 0;
1701   }
1702
1703   .sprite.tag {
1704     /* no-r2 */ background-position: -200px 0;
1705   }
1706
1707   .sprite.editor {
1708     /* no-r2 */ background-position: -250px 0;
1709   }
1710
1711   .sprite.question {
1712     /* no-r2 */ background-position: -300px 0;
1713   }
1714
1715   .sprite.rules {
1716     /* no-r2 */ background-position: -350px 0;
1717   }
1718
1719   .start-mapping {
1720     margin: auto;
1721     cursor: pointer;
1722     border: none;
1723     padding: 20px 40px;
1724     font-size: 30px;
1725     text-decoration: none;
1726   }
1727
1728   .icon.note {
1729     background-color: #333;
1730     border-radius: 4px;
1731   }
1732 }
1733
1734 .site-about #content {
1735   background-color: $lightgrey;
1736   background-position: 50% 50%;
1737   background-repeat: no-repeat;
1738   background-size: cover;
1739   background-attachment: fixed;
1740
1741   .content-inner {
1742     max-width: 760px;
1743   }
1744
1745   .attr {
1746     margin-top: -20px;
1747
1748     h1 {
1749       span {
1750         color: $vibrant-green;
1751       }
1752     }
1753
1754     .user-image {
1755       height: 150px;
1756       background-position: 0 50%;
1757       background-repeat: no-repeat;
1758       background-image: image-url('about/osm.png');
1759       background-size: cover;
1760       background-color: $vibrant-green;
1761     }
1762
1763     .byosm {
1764       background: $vibrant-green;
1765     }
1766
1767     .byosm span {
1768       display: inline-block;
1769       width: 20px;
1770       margin-left: -20px;
1771     }
1772   }
1773
1774   .icon {
1775     width: 30px;
1776     height: 30px;
1777     margin-right: 10px;
1778     vertical-align: middle;
1779     background: 40px 40px image-url('about/sprite.png') no-repeat;
1780
1781     &.local {
1782       /* no-r2 */
1783       background-position: 0px 0px;
1784     }
1785     &.community {
1786       /* no-r2 */
1787       background-position: 0px -40px;
1788     }
1789     &.open {
1790       /* no-r2 */
1791       background-position: 0px -80px;
1792     }
1793     &.partners {
1794       /* no-r2 */
1795       background-position: 0px -120px;
1796     }
1797     &.infringement {
1798       /* no-r2 */
1799       background-position: 0px -160px;
1800     }
1801     &.legal {
1802       /* no-r2 */
1803       background-position: -45px -160px;
1804     }
1805   }
1806 }
1807
1808 @import 'browse';
1809
1810 @media only screen and (max-width:960px) {
1811   .header-illustration.new-user-arm {
1812     display: none;
1813   }
1814 }