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