@charset "utf-8";

h2 {
  background-color: #1d5d9b;
  color: #fff;
  padding: 1rem 0rem 1rem 1rem;
  font-weight: bold;
}

.no-data {
  padding: 1rem;
}

/*ご利用プラン*/
dl {
  display: flex;
  align-items: center;
}

dt {
  padding-right: 0.5rem;
  white-space: nowrap;/*改行させない*/
  font-size: 1rem;
  font-weight: bold;
}

dd {
  margin-bottom: 0rem;
  width: 80%;
}

/*電気使用過去のグラフ*/
p {
  font-size: 1.3rem;
  font-weight: bold;
}

/*電気使用過去のグラフ*/
.denki-p {
  padding: 1rem 1rem 0rem 1rem;
}

/*ご使用量・料金div*/
.usage-billing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-radius: 1.25rem;
  width: calc(100% - 2rem);
  z-index: -1;
  margin-left: 1rem;
  background-color: #fff;
}

/* ご使用量・料金 */
.type-input {
  position: relative;
  border-radius: 3.125rem;
  display: block;
  text-align: center;
  color: #000;
  display: block;
  font-size: 1rem;
}

.type-input input {
  display: none;
  font-size: 1rem;
}

.tab-label {
  padding: 0.5rem;
  cursor: pointer;
  width: 100%;
}

.tab-label.selected {
  border-radius: 3rem;
  background-color: #1d5d9b;
  color: #fff;
}

.tab-label.selected::after {
  content: "";
  position: absolute;
  background-image: url("../img/balloon_bottom_electric.svg");
  background-repeat: no-repeat; /* 画像の繰り返しを無効にする */
  bottom: -1rem;
  height: 1rem;
  width: 1.5rem;
  left: calc(50% - 0.75rem);
}

/*グラフと月別履歴を囲っている*/
.web-div {
  margin-top: 2rem;
}

#usage_chart,
#billing_chart {
  height: 100vw;
  max-height: 350px;
  padding-top: 1rem;
  padding-left: 1rem;
}

/*グラフとpタグの外枠*/
.graph-border {
  outline: 0.1rem solid #b8b8b8;
  outline-offset: 0.1875rem;
  border-radius: 0.3125rem; /*丸みを出す*/
  background-color: #e1e5e9;
  width: 100%;
}

/*月別履歴*/
.month-p {
  padding-top: 2.5rem;
  padding-left: 1rem;
}

/*月別履歴テーブル*/
.month-list {
  padding-bottom: 1rem;
}

#list {
  border: 0.1rem solid #b8b8b8;
  background-color: #fff;
  text-align: center;
  margin: 0 1rem; /*真ん中に寄せる方法*/
  width: calc(100% - 2rem);
}

#list th,
#list td {
  border-right: 0.1rem solid #b8b8b8;
  word-break: keep-all;/*改行*/
  font-size: 0.8rem;
}

#list th {
  padding: 0.5em 0.7em;
}

#list td {
  padding-top: 1em;
  padding-left: 0.7em;
  padding-right: 0.7em;
}

tbody tr:last-child td {
  padding-bottom: 1em;
}

thead th {
  position: relative; /*要素を相対的な位置に配置　背景の為の処理 */
  font-size: 0.8rem;
  z-index: 1;
}

thead th:first-child::before {
  left: 0.1rem;
}

thead th:last-child::before {
  right: 0.1rem;
}

thead th::before {
  content: "";
  background-color: #badcee;
  position: absolute;
  top: 0.1rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

/*月別履歴の数字のデータを右寄せ*/
td {
  text-align: right;
}

/*月別履歴の年月のデータみ左寄せ*/
.table-month {
  text-align: left;
}

/* ウェブサイト版 */
@media screen and (min-width: 1024px) {
  /*ご利用プラン*/
  dt {
    font-size: 1.5rem;
  }

  select {
    font-size: 1rem;
  }

  dd {
    width: 100%;
  }

  /*ご使用量・料金*/
  .usage-billing {
    width: 50%;
  }

  .tab-body {
    min-width: 50%;
    width: 50%;
  }

  /*グラフ*/
  #usage_chart,
  #billing_chart {
    height: 50vw;
    max-height: 512px;
  }

  /*グラフ、月別履歴の横並び*/
  .web-div {
    display: flex;
  }

  /*月別履歴、テーブルの縦並び*/
  .month-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    min-width: 50%;
    width: 50%;
  }

  #list {
    margin: 0 1rem; /*真ん中に寄せる方法*/
    width: calc(100% - 2rem);
  }

  .month-p {
    padding-top: 0rem;
    margin-left: 0.5rem;
    margin-bottom: 0rem;
  }

  #list th, #list td{
    font-size: 1rem;
  }
}

@media screen and (max-width: 399px) {
  #list {
    margin: 0 ; /*真ん中に寄せる方法*/
    width: auto;
  }
}