/*
Copyright 2021 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.button,
.toolbarButton,
.toolbarButtonSecondary,
.iconButton,
.iconCopyButton,
.secondary,
.secondaryHangup,
.copyButton,
.dropdownButton {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  padding: 0;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.secondary,
.secondaryHangup,
.button,
.copyButton {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: var(--font-size-body);
  font-weight: 700;
}

.button {
  color: var(--primary-content);
  background-color: var(--accent);
}

.button:focus,
.toolbarButton:focus,
.toolbarButtonSecondary:focus,
.iconButton:focus,
.iconCopyButton:focus,
.secondary:focus,
.secondaryHangup:focus,
.copyButton:focus {
  outline: auto;
}

.toolbarButton,
.toolbarButtonSecondary {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  background-color: var(--system);
}

.toolbarButton:hover,
.toolbarButtonSecondary:hover {
  background-color: var(--quinary-content);
}

.toolbarButton.on,
.toolbarButton.off {
  background-color: var(--primary-content);
}

.toolbarButtonSecondary.on {
  background-color: var(--accent);
}

.iconButton:not(.stroke) svg * {
  fill: var(--primary-content);
}

.iconButton:not(.stroke):hover svg * {
  fill: var(--accent);
}

.iconButton.on:not(.stroke) svg * {
  fill: var(--accent);
}

.iconButton.on.stroke svg * {
  stroke: var(--accent);
}

.hangupButton,
.hangupButton:hover {
  background-color: var(--alert);
}

.toolbarButton.on svg * {
  fill: var(--accent);
}

.toolbarButton.off svg * {
  fill: #21262c;
}

.toolbarButtonSecondary.on svg * {
  fill: var(--primary-content);
}

.secondary,
.copyButton {
  color: var(--accent);
  border: 2px solid var(--accent);
  background-color: transparent;
}

.secondaryHangup {
  color: var(--alert);
  border: 2px solid var(--alert);
  background-color: transparent;
}

.copyButton.secondaryCopy {
  color: var(--primary-content);
  border-color: var(--primary-content);
}

.copyButton {
  width: 100%;
  height: 40px;
  transition: border-color 250ms, background-color 250ms;
}

.copyButton span {
  font-weight: 600;
  font-size: var(--font-size-body);
  margin-right: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.copyButton svg {
  flex-shrink: 0;
}

.copyButton:not(.on) svg * {
  fill: var(--accent);
}

.copyButton.on {
  border-color: transparent;
  background-color: var(--accent);
  color: white;
}

.copyButton.on svg * {
  stroke: white;
}

.copyButton.secondaryCopy:not(.on) svg * {
  fill: var(--primary-content);
}

.iconCopyButton svg * {
  fill: var(--tertiary-content);
}

.iconCopyButton:hover svg * {
  fill: var(--accent);
}

.iconCopyButton.on svg *,
.iconCopyButton.on:hover svg * {
  fill: transparent;
  stroke: var(--accent);
}

.dropdownButton {
  color: var(--primary-content);
  padding: 2px 8px;
  border-radius: 8px;
}

.dropdownButton:hover,
.dropdownButton.on {
  background-color: var(--quinary-content);
}

.dropdownButton svg {
  margin-left: 8px;
}

.dropdownButton svg * {
  fill: var(--primary-content);
}

.lg {
  height: 40px;
}

.linkButton {
  background-color: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
}
