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
.tide-toggle {
--night: #17243b;
--sea: #1a7fa8;
--aqua: #42d8ca;
--foam: #e8fff7;
display: inline-grid;
gap: 12px;
cursor: pointer;
user-select: none;
font-family: Arial, sans-serif;
}
.tide-toggle input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tide-shell {
position: relative;
width: 218px;
height: 92px;
overflow: hidden;
border: 5px solid #eff7f7;
border-radius: 46px;
background: var(--night);
box-shadow: 0 12px 24px rgba(20, 48, 70, .22), inset 0 2px 5px rgba(255, 255, 255, .16);
transition: background .5s ease;
}
.tide-water {
position: absolute;
width: 280px;
height: 105px;
left: -30px;
bottom: -69px;
border-radius: 46% 54% 0 0;
background: var(--sea);
transition: bottom .65s cubic-bezier(.2, .9, .2, 1), background .5s ease;
}
.tide-water::before,
.tide-water::after {
content: "";
position: absolute;
width: 145px;
height: 28px;
top: -12px;
border-radius: 50%;
background: inherit;
}
.tide-water::before { left: 8px; }
.tide-water::after { right: 5px; top: -17px; }
.tide-foam {
position: absolute;
left: -10px;
bottom: -10px;
width: 245px;
height: 25px;
border-radius: 50%;
border-top: 3px solid rgba(232, 255, 247, .75);
opacity: 0;
transform: rotate(-3deg);
transition: bottom .65s cubic-bezier(.2, .9, .2, 1), opacity .35s ease;
}
.tide-dial {
position: absolute;
top: 10px;
left: 10px;
display: grid;
width: 62px;
height: 62px;
place-items: center;
border-radius: 50%;
background: linear-gradient(145deg, #f8f2d9, #d9a55d);
box-shadow: 0 5px 10px rgba(5, 26, 43, .34), inset 2px 2px 3px rgba(255, 255, 255, .58);
transition: transform .65s cubic-bezier(.2, .9, .2, 1), background .5s ease;
}
.tide-dial span {
width: 18px;
height: 18px;
border: 3px solid #8d5d30;
border-top-color: transparent;
border-radius: 50%;
transform: rotate(-45deg);
transition: border-color .4s ease;
}
.tide-copy {
display: flex;
justify-content: space-between;
padding: 0 9px;
color: #32506a;
font-size: 10px;
font-weight: 800;
letter-spacing: 1.5px;
}
.tide-copy span:last-child { opacity: .35; transition: opacity .35s ease; }
.tide-toggle input:checked + .tide-shell {
background: #124969;
}
.tide-toggle input:checked + .tide-shell .tide-water {
bottom: -8px;
background: var(--aqua);
}
.tide-toggle input:checked + .tide-shell .tide-foam {
bottom: 34px;
opacity: 1;
}
.tide-toggle input:checked + .tide-shell .tide-dial {
transform: translateX(136px) rotate(180deg);
background: linear-gradient(145deg, #effffd, #8ee9d7);
}
.tide-toggle input:checked + .tide-shell .tide-dial span {
border-color: #187d83;
border-top-color: transparent;
}
.tide-toggle input:checked ~ .tide-copy span:first-child { opacity: .35; }
.tide-toggle input:checked ~ .tide-copy span:last-child { opacity: 1; }
.tide-toggle:has(input:focus-visible) .tide-shell {
outline: 3px solid #42d8ca;
outline-offset: 5px;
}
You need to sign in before you can write a comment.