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