File size: 2,805 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@import "@automattic/color-studio/dist/color-variables";
@import "@wordpress/base-styles/breakpoints";
@import "@automattic/typography/styles/variables";

@mixin tab-text {
	font-family: "SF Pro Text", $sans;
	font-weight: 400;
	color: $studio-gray-60;
}

@mixin tab-text-selected-override {
	font-weight: 500;
	color: $studio-gray-100;
}

%count {
	background: $studio-gray-5;
	border: none;
	border-radius: 2px;
	color: $studio-gray-80;
	margin-left: 10px;
	padding: 0 8px;
}

.section-nav.subscription-manager-tab-switcher {
	box-shadow: none;

	.section-nav__panel {
		.section-nav-group {
			.section-nav-tab {
				border: none;

				&.is-selected {
					.section-nav-tab__link {
						border-bottom-color: $studio-gray-100;
						background-color: unset;
					}

					.section-nav-tab__text {
						@include tab-text-selected-override;
					}
				}


				.section-nav-tab__link {
					border-bottom: solid 2px $studio-gray-5;
					padding: 8px;
					transition: border-bottom-color ease-in-out 0.1s, color ease-in-out 0.1s;

					&:hover {
						background-color: transparent;
					}

					&:focus {
						box-shadow: inset 0 0 0 2px var(--color-primary-light);
					}
				}

				&:hover:not(.is-selected) .section-nav-tab__link,
				&:active:not(.is-selected) .section-nav-tab__link {
					border-bottom-color: $studio-gray-40;
				}

				.section-nav-tab__text {
					@include tab-text;
				}

				.count {
					@extend %count;
				}
			}
		}
	}
}

// Mobile view only
@media screen and (max-width: $break-mobile) {
	.section-nav.subscription-manager-tab-switcher {
		margin-bottom: 22px;

		.section-nav__mobile-header {
			padding-left: 0;
			padding-right: 0;

			.section-nav__mobile-header-text {
				@include tab-text;
				@include tab-text-selected-override;
			}
		}

		.section-nav__panel {
			padding: 0;

			.section-nav-group {
				margin: 0;
				.section-nav-tab__link {
					border-bottom: solid 2px $studio-gray-5;
				}
			}
		}
	}
}

// Large screen view only
@media screen and (min-width: $break-mobile) {
	.section-nav.subscription-manager-tab-switcher {
		margin-bottom: 32px;

		.section-nav-tabs {
			display: flex;

			.section-nav-tabs__list {
				box-shadow: inset 0 -1px 0 rgba($studio-black, 0.05);
				gap: 16px;
				flex-basis: fit-content;

				.section-nav-tab {
					.section-nav-tab__link {
						border-bottom: solid 2px transparent;
						color: $studio-gray-60;
						padding: 8px 0;
						transition: border-bottom-color ease-in-out 0.1s, color ease-in-out 0.1s;

						&:hover {
							background-color: transparent;
						}
					}

					.section-nav-tab__text {
						font-size: $font-body;
						line-height: $font-title-medium;
					}

					.count {
						font-size: $font-body-extra-small;
						line-height: $font-title-small;
					}
				}
			}
		}
	}
}