summaryrefslogtreecommitdiff
path: root/src/components/Button.module.scss
blob: 31b354ddf667bf9b6f43ed1cf7484380b205a8e4 (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
@import '~/styles/utils/custom-media';

.btn {
  -webkit-appearance: none;
  outline: none;
  user-select: none;
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-btn-fg);
  background: var(--color-btn-bg);
  border: 1px solid #555;
  border-radius: 100px;
  &:focus {
    border-color: var(--color-focus-blue);
  }
  &:hover {
    color: #fff;
    background: var(--color-focus-blue);
    border: 1px solid var(--color-focus-blue);
  }
  &:active {
    transform: scale(0.97);
  }

  font-size: 0.75em;
  padding: 4px 7px;
  @media (--breakpoint-not-small) {
    font-size: small;
    padding: 6px 12px;
  }

  &.minimal {
    border-color: transparent;
    background: none;
    &:focus {
      border-color: var(--color-focus-blue);
    }
    &:hover {
      color: #fff;
      background: var(--color-focus-blue);
      border: 1px solid var(--color-focus-blue);
    }
  }
}

.btn:disabled {
  opacity: 0.5;
}

.btnInternal {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
}

.btnStart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loadingContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
}