@use 'sass:math';

@import '../../lib/commonStyles/colors.scss';
@import '../../lib/commonStyles/layout.scss';
$callBtnWidth: math.div(1, 3) * 100%;
$conferenceCallBtnWidth: 50%;
$conferenceCallBtnPaddingLeft: math.div(
  $conferenceCallBtnWidth - $callBtnWidth,
  2
);
$keypadHeight: 53%;
$buttonAreaWidth: 222;
$totalWidth: 300;
$buttonWidth: 45;
$stopButtonIconRatio: 0.98;
$completeTransferButtonIconRatio: 0.85;

.root {
  // max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 math.div(1- math.div($buttonAreaWidth, $totalWidth), 2) * 100%;
}

.callButton {
  box-sizing: border-box;
  padding: 2px;
  height: 50%;
}

.callButton {
  width: $callBtnWidth;
}

.buttonRow {
  // text-align: left;
  text-align: center;
  height: 100%;
}

.button {
  width: $callBtnWidth;
  height: 100%;
  border-radius: 100% - $callBtnWidth;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  text {
    font-size: 88px;
  }
}

.disabled,
.disabled * {
  circle {
    fill: #c7c7c7;
  }
  cursor: not-allowed;
}

.combineButton,
.mergeButton {
  circle {
    fill: #5fb95c;
  }
  g,
  path {
    fill: #ffffff;
  }
}

.callCtrlButtonGroup {
  &.biggerButton {
    height: auto;
    .callButton {
      padding: 8px;
    }
  }
  height: $keypadHeight;
}

.stopButtonGroup {
  height: 100% - $keypadHeight;
  display: block;
  box-sizing: border-box;
  padding-top: 10px; // padding-bottom: $recent-activity-height;
  .button {
    display: inline-block;
    box-sizing: border-box;
    width: math.div(
        math.div($buttonWidth, $buttonAreaWidth),
        $stopButtonIconRatio
      ) * 100%;
    max-width: 140px;
  }
  .stopButton {
    circle {
      fill: #ff4646;
    }
    g,
    path {
      fill: #ffffff;
    }
  }
  .stopButton.disabled {
    circle {
      fill: rgba(229, 229, 229, 1);
    }
    g {
      cursor: not-allowed;
    }
  }
}

.relative {
  position: relative;
}

.buttonPopup {
  padding: 10px 10px;
  text-align: left;
  min-width: 90px;
  .buttonItem {
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    font-size: 12px;
    line-height: 12px;
    padding: 10px 20px 10px 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    .buttonName {
      color: #666;
    }
    .buttonIcon + .buttonName {
      margin-left: 5px;
    }
    .buttonActive {
      circle {
        fill: $primary-color;
        stroke: $primary-color;
      }
      path {
        fill: $primary-color;
      }
    }
    .buttonDisabled {
      circle {
        fill: $lightgray;
        stroke: $gray;
      }
      path {
        fill: $silver;
      }
      g {
        cursor: default;
        &:hover {
          circle {
            stroke: $gray;
          }
        }
      }
    }
  }
  .buttonItem + .buttonItem {
    border-top: 0.5px solid $silver;
  }
  .buttonItem.disabled {
    cursor: not-allowed;
    .buttonIcon {
      color: $silver;
    }
  }
  .buttonItem:first-of-type {
    padding-top: 0;
  }
  .buttonItem:last-of-type {
    padding-bottom: 0;
  }
}

.moreButtonContainer {
  display: inline-block;
  width: 33.3333%;
  height: 50%;
  box-sizing: border-box;
  .moreButton {
    height: 100%;
    width: 100%;
  }
}
