Welcome to mirror list, hosted at ThFree Co, Russian Federation.

apps.scss « css « core - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 15742786b0eaafbb4f212e18f77d4d31e6362a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
/**
 * @copyright Copyright (c) 2016-2017, John Molakvoæ <skjnldsv@protonmail.com>
 * @copyright Copyright (c) 2016, Julius Haertl <jus@bitgrid.net>
 * @copyright Copyright (c) 2016, Morris Jobke <hey@morrisjobke.de>
 * @copyright Copyright (c) 2016, pgys <info@pexlab.space>
 * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
 * @copyright Copyright (c) 2016, Stefan Weil <sw@weilnetz.de>
 * @copyright Copyright (c) 2016, Roeland Jago Douma <rullzer@owncloud.com>
 * @copyright Copyright (c) 2016, jowi <sjw@gmx.ch>
 * @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
 * @copyright Copyright (c) 2015, Thomas Müller <thomas.mueller@tmit.eu>
 * @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>
 * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt <hey@jancborchardt.net>
 *
 * @license GNU AGPL version 3 or any later version
 *
 */

/* BASE STYLING ------------------------------------------------------------ */
// no h1 allowed since h1 = logo
h2 {
	font-weight: bold;
	font-size: 20px;
	margin-bottom: 12px;
	line-height: 30px;
	color: var(--color-text-light);
}

h3 {
	font-size: 16px;
	margin: 12px 0;
	color: var(--color-text-light);
}

h4 {
	font-size: 14px;
}

/* do not use italic typeface style, instead lighter color */
em {
	font-style: normal;
	color: var(--color-text-lighter);
}

dl {
	padding: 12px 0;
}

dt,
dd {
	display: inline-block;
	padding: 12px;
	padding-left: 0;
}

dt {
	width: 130px;
	white-space: nowrap;
	text-align: right;
}

kbd {
	padding: 4px 10px;
	border: 1px solid #ccc;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
	border-radius: var(--border-radius);
	display: inline-block;
	white-space: nowrap;
}


/* APP STYLING ------------------------------------------------------------ */

#content[class*='app-'] * {
	box-sizing: border-box;
}

/* APP-NAVIGATION ------------------------------------------------------------ */
/* Navigation: folder like structure */
#app-navigation:not(.vue) {
	width: $navigation-width;
	position: fixed;
	top: $header-height;
	left: 0;
	z-index: 500;
	overflow-y: auto;
	overflow-x: hidden;
	// Do not use vh because of mobile headers
	// are included in the calculation
	height: calc(100% - #{$header-height});
	box-sizing: border-box;
	background-color: var(--color-main-background);
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	border-right: 1px solid var(--color-border);
	display: flex;
	flex-direction: column;
	flex-grow: 0;
	flex-shrink: 0;

	/* 'New' button */
	.app-navigation-new {
		display: block;
		padding: 10px;
		button {
			display: inline-block;
			width: 100%;
			padding: 10px;
			padding-left: 34px;
			background-position: 10px center;
			text-align: left;
			margin: 0;
		}
	}

	li {
		position: relative;
	}
	> ul {
		position: relative;
		height: 100%;
		width: inherit;
		overflow-x: hidden;
		overflow-y: auto;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		> li {
			display: inline-flex;
			flex-wrap: wrap;
			order: 1;
			flex-shrink: 0;

			/* Pinned-to-bottom entries */
			&.pinned {
				order: 2;
				&.first-pinned {
					margin-top: auto !important;
				}
			}

			> .app-navigation-entry-deleted {
				/* Ugly hack for overriding the main entry link */
				padding-left: 44px !important;
			}
			> .app-navigation-entry-edit {
				/* Ugly hack for overriding the main entry link */
				/* align the input correctly with the link text
				   44px-6px padding for the input */
				padding-left: 38px !important;
			}

			a:hover,
			a:focus {
				&,
				> a {
					background-color: var(--color-background-hover);
				}
			}
			&.active,
			a:active,
			a.selected ,
			a.active {
				&,
				> a {
					background-color: var(--color-primary-light);
				}
			}

			/* align loader */
			&.icon-loading-small:after {
				left: 22px;
				top: 22px;
			}

			/* hide deletion/collapse of subitems */
			&.deleted,
			&.collapsible:not(.open) {
				> ul {
					// NO ANIMATE because if not really hidden, we can still tab through it
					display: none;
				}
			}

			&.app-navigation-caption {
				font-weight: bold;
				line-height: 44px;
				padding: 0 44px;
				white-space: nowrap;
				text-overflow: ellipsis;
				box-shadow: none !important;
				user-select: none;
				pointer-events:none;

				&:not(:first-child) {
					margin-top: 22px;
				}
			}

			/* Second level nesting for lists */
			> ul {
				flex: 0 1 auto;
				width: 100%;
				position: relative;
				> li {
					display: inline-flex;
					flex-wrap: wrap;
					padding-left: 44px;
					&:hover,
					&:focus {
						&,
						> a {
							background-color: var(--color-background-hover);
						}
					}
					&.active,
					a.selected {
						&,
						> a {
							background-color: var(--color-primary-light);
						}
					}

					/* align loader */
					&.icon-loading-small:after {
						left: 22px; /* 44px / 2 */
					}

					> .app-navigation-entry-deleted {
						/* margin to keep active indicator visible */
						margin-left: 4px;
						padding-left: 84px;
					}

					> .app-navigation-entry-edit {
						/* margin to keep active indicator visible */
						margin-left: 4px;
						/* align the input correctly with the link text
						44px+44px-4px-6px padding for the input */
						padding-left: 78px !important;
					}
				}
			}
		}
		/* Menu and submenu */
		> li,
		> li > ul > li {
			position: relative;
			width: 100%;
			box-sizing: border-box;
			/* hide icons if loading */
			&.icon-loading-small {
				> a,
				> .app-navigation-entry-bullet {
					/* hide icon or bullet if loading state*/
					background: transparent !important;
				}
			}
			/* Main entry link */
			> a {
				background-size: 16px 16px;
				background-position: 14px center;
				background-repeat: no-repeat;
				display: block;
				justify-content: space-between;
				line-height: 44px;
				min-height: 44px;
				padding: 0 12px 0 14px;
				overflow: hidden;
				box-sizing: border-box;
				white-space: nowrap;
				text-overflow: ellipsis;
				color: var(--color-main-text);
				opacity: .8;
				flex: 1 1 0px;
				z-index: 100; /* above the bullet to allow click*/
				/* TODO: forbid using img as icon in menu? */

				&.svg {
					padding: 0 12px 0 44px;
				}
				&:first-child img {
				    margin-right: 11px;
				    width: 16px;
				    height: 16px;
				}

				/* counter can also be inside the link */
				> .app-navigation-entry-utils  {
					display: inline-block;
					float: right;
					.app-navigation-entry-utils-counter {
						padding-right: 0 !important;
					}
				}
			}
			/* Bullet icon */
			> .app-navigation-entry-bullet {
				position: absolute;
				display: block;
				margin: 16px;
				width: 12px;
				height: 12px;
				border: none;
				border-radius: 50%;
				cursor: pointer;
				transition: background 100ms ease-in-out;

				+ a {
					/* hide icon if bullet, can't have both */
					background: transparent !important;
				}
			}

			/* popover fix the flex positionning of the li parent */
			> .app-navigation-entry-menu {
				top: 44px;
			}

			/* show edit/undo field if editing/deleted */
			&.editing .app-navigation-entry-edit {
				opacity: 1;
				z-index: 250;
			}
			&.deleted .app-navigation-entry-deleted {
				transform: translateX(0);
				z-index: 250;
			}
		}
	}
	&.hidden {
		display: none;
	}

	/**
	 * Button styling for menu, edit and undo
	 */
	.app-navigation-entry-utils .app-navigation-entry-utils-menu-button > button,
	.app-navigation-entry-deleted .app-navigation-entry-deleted-button {
		border: 0;
		opacity: 0.5;
		background-color: transparent;
		background-repeat: no-repeat;
		background-position: center;
		&:hover,
		&:focus {
			background-color: transparent;
			opacity: 1;
		}
	}

	/**
	 * Collapsible menus
	 */
	.collapsible {
		/* Fallback for old collapse button.
		   TODO: to be removed. Leaved here for retro compatibility */
		.collapse {
			opacity: 0;
			position: absolute;
			width: 44px;
			height: 44px;
			margin: 0;
			z-index: 110;

			/* Needed for IE11; otherwise the button appears to the right of the
			 * link. */
			left: 0;
		}
		&:before {
			position: absolute;
			height: 44px;
			width: 44px;
			margin: 0;
			padding: 0;
			background: none;
			@include icon-color('triangle-s', 'actions', $color-black, 1, true);
			background-size: 16px;
			background-repeat: no-repeat;
			background-position: center;
			border: none;
			border-radius: 0;
			outline: none !important;
			box-shadow: none;
			content: ' ';
			opacity: 0;
			-webkit-transform: rotate(-90deg);
			-ms-transform: rotate(-90deg);
			transform: rotate(-90deg);
			z-index: 105; // above a, under button
			background-color: var(--color-background-hover);
			border-radius: 50%;
			transition: opacity $animation-quick ease-in-out;
		}

		/* force padding on link no matter if 'a' has an icon class */
		> a:first-child {
			padding-left: 44px;
		}
		&:hover,
		&:focus {
			&:before {
				opacity: 1;
			}
			> .app-navigation-entry-bullet {
				background: transparent !important;
			}
		}
		&.open {
			&:before {
				-webkit-transform: rotate(0);
				-ms-transform: rotate(0);
				transform: rotate(0);
			}
		}
	}

	/**
	 * App navigation utils, buttons and counters for drop down menu
	 */
	.app-navigation-entry-utils {
		flex: 0 1 auto;
		ul {
			display: flex !important;
			align-items: center;
			justify-content: flex-end;
		}
		li {
			width: 44px !important;
			height: 44px;
		}
		button {
			height: 100%;
			width: 100%;
			margin: 0;
			box-shadow: none;
		}
		.app-navigation-entry-utils-menu-button {
			/* Prevent bg img override if an icon class is set */
			button:not([class^='icon-']):not([class*=' icon-']) {
				@include icon-color('more', 'actions', $color-black, 1, true);
			}
			&:hover button,
			&:focus button {
				background-color: transparent;
				opacity: 1;
			}
		}
		.app-navigation-entry-utils-counter {
			overflow: hidden;
			text-align: right;
			font-size: 9pt;
			line-height: 44px;
			padding: 0 12px; /* Same padding as all li > a in the app-navigation */

			&.highlighted {
				padding: 0;
				text-align: center;
				span {
					padding: 2px 5px;
					border-radius: 10px;
					background-color: var(--color-primary);
					color: var(--color-primary-text);
				}
			}
		}
	}

	/**
	 * Editable entries
	 */
	.app-navigation-entry-edit {
		padding-left: 5px;
		padding-right: 5px;
		display: block;
		width: calc(100% - 1px); /* Avoid border overlapping */
		transition: opacity 250ms ease-in-out;
		opacity: 0;
		position: absolute;
		background-color: var(--color-main-background);
		z-index: -1;
		form,
		div {
			display: inline-flex;
			width: 100%;
		}
		input {
			padding: 5px;
			margin-right: 0;
			height: 38px;
			&:hover,
			&:focus {
				/* overlapp borders */
				z-index: 1;
			}
		}
		input[type='text'] {
			width: 100%;
			min-width: 0; /* firefox hack: override auto */
			border-bottom-right-radius: 0;
			border-top-right-radius: 0;
		}
		button,
		input:not([type='text']) {
			width: 36px;
			height: 38px;
			flex: 0 0 36px;
			&:not(:last-child) {
				border-radius: 0 !important;
			}
			&:not(:first-child) {
				margin-left: -1px;
			}
			&:last-child {
				border-bottom-right-radius: var(--border-radius);
				border-top-right-radius: var(--border-radius);
				border-bottom-left-radius: 0;
				border-top-left-radius: 0;
			}
		}
	}

	/**
	 * Deleted entries with undo button
	 */
	.app-navigation-entry-deleted {
		display: inline-flex;
		padding-left: 44px;
		transform: translateX(#{$navigation-width});
		.app-navigation-entry-deleted-description {
			position: relative;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
			flex: 1 1 0px;
			line-height: 44px;
		}
		.app-navigation-entry-deleted-button {
			margin: 0;
			height: 44px;
			width: 44px;
			line-height: 44px;
			&:hover,
			&:focus {
				opacity: 1;
			}
		}
	}

	/**
	 * Common rules for animation of undo and edit entries
	 */
	.app-navigation-entry-edit,
	.app-navigation-entry-deleted  {
		width: calc(100% - 1px); /* Avoid border overlapping */
		transition: transform 250ms ease-in-out,
					opacity 250ms ease-in-out,
					z-index 250ms ease-in-out;
		position: absolute;
		left: 0;
		background-color: var(--color-main-background);
		box-sizing: border-box;
	}

	/**
	 * drag and drop
	 */
	.drag-and-drop {
		-webkit-transition: padding-bottom 500ms ease 0s;
		transition: padding-bottom 500ms ease 0s;
		padding-bottom: 40px;
	}

	.error {
		color: var(--color-error);
	}

	.app-navigation-entry-utils ul,
	.app-navigation-entry-menu ul {
		list-style-type: none;
	}
}


/* CONTENT  --------------------------------------------------------- */
#content {
	box-sizing: border-box;
	position: relative;
	display: flex;
	// padding is included in height
	padding-top: $header-height;
	min-height: 100%;
}

/* APP-CONTENT AND WRAPPER ------------------------------------------ */
/* Part where the content will be loaded into */

/**
 * !Important. We are defining the minimum requirement we want for flex
 * Just before the mobile breakpoint we have $breakpoint-mobile (1024px) - $navigation-width
 * -> 468px. In that case we want 200px for the list and 268px for the content
 */
$min-content-width: $breakpoint-mobile - $navigation-width - $list-min-width;

#app-content {
	z-index: 1000;
	background-color: var(--color-main-background);
	position: relative;
	flex-basis: 100vw;
	min-height: 100%;
	/* margin if navigation element is here */
	#app-navigation:not(.hidden) + & {
		margin-left: $navigation-width;
	}
	/* no top border for first settings item */
	> .section:first-child {
		border-top: none;
	}

	/* if app-content-list is present */
	#app-content-wrapper {
		display: flex;
		position: relative;
		align-items: stretch;
		/* make sure we have at least full height for loaders or such
		   no need for list/details since we have a flex stretch */
		min-height: 100%;

		/* CONTENT DETAILS AFTER LIST*/
		.app-content-details {
			/* grow full width */
			flex: 1 1 $min-content-width;
			#app-navigation-toggle-back {
				display: none;
			}
		}
	}
}

/* APP-SIDEBAR ------------------------------------------------------------ */
/*
	Sidebar: a sidebar to be used within #content
	#app-content will be shrinked properly
*/
#app-sidebar {
	width: 27vw;
	min-width: $sidebar-min-width;
	max-width: $sidebar-max-width;
	display: block;
	@include position('sticky');
	top: $header-height;
	right:0;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 1500;
	height: calc(100vh - #{$header-height});
	background: var(--color-main-background);
	border-left: 1px solid var(--color-border);
	flex-shrink: 0;
	// no animations possible, use OC.Apps.showAppSidebar
	&.disappear {
		display: none;
	}
}


/* APP-SETTINGS ------------------------------------------------------------ */
/* settings area */
#app-settings {
	// To the bottom w/ flex
	margin-top: auto;
	&.open,
	&.opened {
		#app-settings-content {
			display: block;
		}
	}
}

#app-settings-content {
	display: none;
	padding: 10px;
	background-color: var(--color-main-background);
	/* restrict height of settings and make scrollable */
	max-height: 300px;
	overflow-y: auto;
	box-sizing: border-box;

	/* display input fields at full width */
	input[type='text'] {
		width: 93%;
	}

	.info-text {
		padding: 5px 0 7px 22px;
		color: var(--color-text-lighter);
	}
	input {
		&[type='checkbox'],
		&[type='radio'] {
			&.radio,
			&.checkbox {
				+ label {
					display: inline-block;
					width: 100%;
					padding: 5px 0;
				}
			}
		}
	}
}

#app-settings-header {
	box-sizing: border-box;
	background-color: var(--color-main-background);
}


#app-settings-header .settings-button {
	display: block;
	height: 44px;
	width: 100%;
	padding: 0;
	margin: 0;
	background-color: var(--color-main-background);
	@include icon-color('settings-dark', 'actions', $color-black, 1, true);
	background-position: 14px center;
	background-repeat: no-repeat;
	box-shadow: none;
	border: 0;
	border-radius: 0;
	text-align: left;
	padding-left: 44px;
	font-weight: normal;
	font-size: 100%;
	opacity: 0.8;

	/* like app-navigation a */
	color: var(--color-main-text);

	&.opened {
		border-top: solid 1px var(--color-border);
		background-color: var(--color-main-background);
	}
	&:hover,
	&:focus {
		background-color: var(--color-background-hover);
	}
}

/* GENERAL SECTION ------------------------------------------------------------ */
.section {
	display: block;
	padding: 30px;
	margin-bottom: 24px;
	&.hidden {
		display: none !important;
	}
	/* slight position correction of checkboxes and radio buttons */
	input {
		&[type='checkbox'],
		&[type='radio'] {
			vertical-align: -2px;
			margin-right: 4px;
		}
	}
}
.sub-section {
	position: relative;
	margin-top: 10px;
	margin-left: 27px;
	margin-bottom: 10px;
}

.appear {
	opacity: 1;
	-webkit-transition: opacity 500ms ease 0s;
	-moz-transition: opacity 500ms ease 0s;
	-ms-transition: opacity 500ms ease 0s;
	-o-transition: opacity 500ms ease 0s;
	transition: opacity 500ms ease 0s;
	&.transparent {
		opacity: 0;
	}
}

/* TABS ------------------------------------------------------------ */
.tabHeaders {
	display: flex;
	margin-bottom: 16px;

	.tabHeader {
		display: flex;
		flex-direction: column;
		flex-grow: 1;
		text-align: center;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		cursor: pointer;
		color: var(--color-text-lighter);
		margin-bottom: 1px;
		padding: 5px;

		&.hidden {
			display: none;
		}

		/* Use same amount as sidebar padding */
		&:first-child {
			padding-left: 15px;
		}
		&:last-child {
			padding-right: 15px;
		}

		.icon {
			display: inline-block;
			width: 100%;
			height: 16px;
			background-size: 16px;
			vertical-align: middle;
			margin-top: -2px;
			margin-right: 3px;
			opacity: .7;
			cursor: pointer;
		}

		a {
			color: var(--color-text-lighter);
			margin-bottom: 1px;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		&.selected {
			font-weight: bold;
		}
		&.selected,
		&:hover,
		&:focus {
			margin-bottom: 0px;
			color: var(--color-main-text);
			border-bottom: 1px solid var(--color-text-lighter);
		}
	}
}
.tabsContainer {
	clear: left;
	.tab {
		padding: 0 15px 15px;
	}
}

/* POPOVER MENU ------------------------------------------------------------ */
$popoveritem-height: 44px;
$popovericon-size: 16px;
$outter-margin: ($popoveritem-height - $popovericon-size) / 2;

.ie,
.edge {
	.bubble, .bubble:after,
	.popovermenu, .popovermenu:after,
	#app-navigation .app-navigation-entry-menu,
	#app-navigation .app-navigation-entry-menu:after {
		border: 1px solid var(--color-border);
	}
}

.bubble,
.app-navigation-entry-menu,
.popovermenu {
	position: absolute;
	background-color: var(--color-main-background);
	color: var(--color-main-text);
	border-radius: var(--border-radius);
	z-index: 110;
	margin: 5px;
	margin-top: -5px;
	right: 0;
	filter: drop-shadow(0 1px 3px var(--color-box-shadow));
	display: none;
	will-change: filter;

	&:after {
		bottom: 100%;
		// Required right-distance is half menu icon size + right padding
		// = 16px/2 + 14px = 22px
		// popover right margin is 5px, arrow width is 9px to center and border is 1px
		// 22px - 9px - 5px - 1px = 7px
		right: 7px;
		/* change this to adjust the arrow position */
		border: solid transparent;
		content: ' ';
		height: 0;
		width: 0;
		position: absolute;
		pointer-events: none;
		border-bottom-color: var(--color-main-background);
		border-width: 9px;
	}
	/* Center the popover */
	&.menu-center {
		transform: translateX(50%);
		right: 50%;
		margin-right: 0;
		&:after {
			right: 50%;
			transform: translateX(50%);
		}
	}
	/* Align the popover to the left */
	&.menu-left {
		right: auto;
		left: 0;
		margin-right: 0;
		&:after {
			left: 6px;
			right: auto;
		}
	}

	&.open {
		display: block;
	}

	&.contactsmenu-popover {
		margin: 0;
	}

	ul {
		/* Overwrite #app-navigation > ul ul */
		display: flex !important;
		flex-direction: column;
	}
	li {
		display: flex;
		flex: 0 0 auto;

		&.hidden {
			display: none;
		}

		> button,
		> a,
		> .menuitem {
			cursor: pointer;
			line-height: $popoveritem-height;
			border: 0;
			border-radius: 0; // otherwise Safari will cut the border-radius area
			background-color: transparent;
			display: flex;
			align-items: flex-start;
			height: auto;
			margin: 0;
			font-weight: normal;
			box-shadow: none;
			width: 100%;
			color: var(--color-main-text);
			white-space: nowrap;

			span[class^='icon-'],
			span[class*=' icon-'],
			&[class^='icon-'],
			&[class*=' icon-'] {
				min-width: 0; /* Overwrite icons*/
				min-height: 0;
				background-position: #{($popoveritem-height - $popovericon-size) / 2} center;
				background-size: $popovericon-size;
			}
			span[class^='icon-'],
			span[class*=' icon-'] {
				/* Keep padding to define the width to
				 assure correct position of a possible text */
				padding: #{$popoveritem-height / 2} 0 #{$popoveritem-height / 2} $popoveritem-height;
			}
			// If no icons set, force left margin to align
			&:not([class^='icon-']):not([class*='icon-']) {
				> span,
				> input,
				> form {
					&:not([class^='icon-']):not([class*='icon-']):first-child {
						margin-left: $popoveritem-height;
					}
				}
			}
			&[class^='icon-'],
			&[class*=' icon-'] {
				padding: 0 #{($popoveritem-height - $popovericon-size) / 2} 0 $popoveritem-height !important;
			}
			&:hover,
			&:focus {
				background-color: var(--color-background-hover);
			}
			&.active {
				background-color: var(--color-primary-light);
			}
			/* prevent .action class to break the design */
			&.action {
				padding: inherit !important;
			}
			> span {
				cursor: pointer;
				white-space: nowrap;
			}
			> p {
				width: 150px;
				line-height: 1.6em;
				padding: 8px 0;
				white-space: normal;
			}
			> select {
				margin: 0;
				margin-left: 6px;
			}
			/* Add padding if contains icon+text */
			&:not(:empty) {
				padding-right: $outter-margin !important;
			}
			/* DEPRECATED! old img in popover fallback
			 * TODO: to remove */
			> img {
				width: $popovericon-size;
				padding: #{($popoveritem-height - $popovericon-size) / 2};
			}
			/* checkbox/radio fixes */
			> input.radio + label,
			> input.checkbox + label {
				padding: 0 !important;
				width: 100%;
			}
			> input.checkbox + label::before {
				margin: -2px 13px 0;
			}
			> input.radio + label::before {
				margin: -2px 12px 0;
			}
			> input:not([type=radio]):not([type=checkbox]):not([type=image]) {
				width: 150px;
			}
			form {
				display: flex;
				flex: 1 1 auto;
				/* put a small space between text and form
				   if there is an element before */
				&:not(:first-child)  {
					margin-left: 5px;
				}
			}
			/* no margin if hidden span before */
			> span.hidden + form,
			> span[style*='display:none'] + form {
				margin-left: 0;
			}
			/* Inputs inside popover supports text, submit & reset */
			input {
				min-width: $popoveritem-height;
				max-height: #{$popoveritem-height - 4px}; /* twice the element margin-y */
				margin: 2px 0;
				flex: 1 1 auto;
				// space between inline inputs
				&:not(:first-child) {
					margin-left: 5px;
				}
			}
		}
		/* css hack, only first not hidden */
		&:not(.hidden):not([style*='display:none']) {
			&:first-of-type {
				> button, > a, > .menuitem {
					> form, > input {
						margin-top: $outter-margin - 2px; // minus the input margin
					}
				}
			}
			&:last-of-type {
				> button, > a, > .menuitem {
					> form, > input {
						margin-bottom: $outter-margin - 2px; // minus the input margin
					}
				}
			}
		}
		> button {
			padding: 0;
			span {
				opacity: 1;
			}
		}

	}
}

/* "app-*" descendants use border-box sizing, so the height of the icon must be
 * set to the height of the item (as well as its width to make it squared). */
#content[class*='app-'] {
	.bubble,
	.app-navigation-entry-menu,
	.popovermenu {
		li {
			> button,
			> a,
			> .menuitem {
				/* DEPRECATED! old img in popover fallback
				* TODO: to remove */
				> img {
					width: $popoveritem-height;
					height: $popoveritem-height;
				}
			}
		}
	}
}

/* CONTENT LIST ------------------------------------------------------------ */
.app-content-list {
	@include position('sticky');
	top: $header-height;
	border-right: 1px solid var(--color-border);
	display: flex;
	flex-direction: column;
	transition: transform 250ms ease-in-out;
	min-height: calc(100vh - #{$header-height});
	max-height: calc(100vh - #{$header-height});
	overflow-y: auto;
	overflow-x: hidden;
	flex: 1 1 $list-min-width;
	min-width: $list-min-width;
	max-width: $list-max-width;

	/* Default item */
	.app-content-list-item {
		position: relative;
		height: 68px;
		cursor: pointer;
		padding: 10px 7px;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		flex: 0 0 auto;

		/* Icon fixes */
		&,
		> .app-content-list-item-menu {
			> [class^='icon-'],
			> [class*=' icon-'] {
				order: 4;
				width: 24px;
				height: 24px;
				margin: -7px; // right padding of item
				padding: 22px;
				opacity: .3;
				cursor: pointer;
				&:hover,
				&:focus {
					opacity: .7;
				}
				&[class^='icon-star'],
				&[class*=' icon-star'] {
					opacity: .7;
					&:hover,
					&:focus {
						opacity: 1 ;
					}

				}
				&.icon-starred {
					opacity: 1 ;
				}
			}
		}

		&:hover,
		&:focus,
		&.active {
			background-color: var(--color-background-dark);
			// display checkbox on hover/focus/active
			.app-content-list-item-checkbox.checkbox + label {
				display: flex;
			}
		}

		.app-content-list-item-checkbox.checkbox + label,
		.app-content-list-item-star {
			position: absolute;
			height: 40px;
			width: 40px;
			z-index: 50;
		}

		.app-content-list-item-checkbox.checkbox {
			&:checked,
			&:hover,
			&:focus,
			&.active {
				+ label {
					// display checkbox if checked
					display: flex;
					// if checked, lower the opacity of the avatar
					+ .app-content-list-item-icon {
						opacity: .7;
					}
				}
			}
			+ label {
				top: 14px;
				left: 7px;
				// hidden by default, only chown on hover-focus or if checked
				display: none;
				&::before {
					margin: 0;
				}
				/* Hide the star, priority to the checkbox */
				~ .app-content-list-item-star {
					display: none;
				}
			}
		}

		.app-content-list-item-star {
			display: flex;
			top: 10px;
			left: 32px;
			background-size: 16px;
			height: 20px;
			width: 20px;
			margin: 0;
			padding: 0;
		}

		.app-content-list-item-icon {
			position: absolute;
			display: inline-block;
			height: 40px;
			width: 40px;
			line-height: 40px;
			border-radius: 50%;
			vertical-align: middle;
			margin-right: 10px;
			color: #fff;
			text-align: center;
			font-size: 1.5em;
			text-transform: capitalize;
			object-fit: cover;
			user-select: none;
			cursor: pointer;
			top: 50%;
			margin-top: -20px;
		}

		.app-content-list-item-line-one,
		.app-content-list-item-line-two {
			display: block;
			padding-left: 50px;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			order: 1;
			flex: 1 1 0px;
			padding-right: 10px;
			cursor: pointer;
		}

		.app-content-list-item-line-two {
			opacity: .5;
			order: 3;
			flex: 1 0;
			flex-basis: calc(100% - 44px);
		}

		.app-content-list-item-details {
			order: 2;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			max-width: 100px;
			opacity: .5;
			font-size: 80%;
			user-select: none;
		}

		.app-content-list-item-menu {
			order: 4;
			position: relative;
			.popovermenu {
				margin: 0;
				// action icon have -7px margin
				// default popover is normally 5px
				right: -2px;
			}
		}
	}
	&.selection .app-content-list-item-checkbox.checkbox + label {
		display: flex;
	}
}