/*
 * Custom Property
 */
/* bodyのstyle属性からtheme-colorを取得し、custom propertyにセット */
body {
  --base-color: var(--theme-color);
}

/*
 * Fonts
 */
.short-stack-regular {
  font-family: "Short Stack", cursive;
  font-weight: 400;
  font-style: normal;
}

.roboto-regular {
  font-family: "Roboto", sans-serif;
  /* font-weight: 400; */
  font-style: normal;
}

/*
 * 全体
 */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  background: #fff;
  color: rgba(0,0,0,.6);
}

a {
  color: white;
  text-decoration: none;

  &:visited {
    color: white;
  }

  &:hover {
    color: color-mix(in srgb, var(--base-color) 30%, black);
  }

  &:active {
    color: white;
  }
}

/*
 * Animations
 */
@keyframes loading-logo {
  100% {
      transform: scale(1,1);
  }
}

@keyframes rotate-z {
  from { transform: rotateZ(0deg); }
  to { transform: rotateZ(360deg); }
}

.rotating {
  animation: rotate-z 0.5s linear infinite;
  transform-origin: 45% 50%;
}


/*
 * Parts
 */
.header {
  background-color: var(--base-color);
  border-color: var(--base-color);
  height: 64px;
  margin-top: 0px;
  transform: translateY(0px);

  display: flex;
  align-items: center;

  box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);

  .logo {
    width: 60px;
    padding: 4px 8px 4px 16px;

    animation: loading-logo 0.4s ease-in-out;
    animation-fill-mode: forwards;
    transform: scale(0, 0);

    img {
      max-width: 100%;
    }
  }

  .title {
    font-size: 1.25rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
  }

  .nav {
    margin-left: auto;
    margin-right: 2em;

    ul {
      display: flex;
      list-style: none;
    }
  }
}

.container {
  width: 100%;
  padding: 0 40px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
  width: 100%;
}

.code-wrapper {
  padding: 0;
  margin: 0;
  width: 49%;
}

.style-selection {
  padding-bottom: 0;
  padding-top: 4px;
  margin-top: 16px;
  font-size: 16px;

  label {
    position: relative;
    cursor: pointer;
    padding-left: 32px;
    margin-right: 16px;
  }

  label::before,
  label::after {
    content: "";
    display: block;
    border-radius: 50%;
    position: absolute;
    transform: translateY(-50%);
    top: 50%;
  }

  label::before {
    background-color: #fff;
    border: 2px solid var(--base-color);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    left: 4px;
  }

  label::after {
    background-color: var(--base-color);
    border-radius: 50%;
    opacity: 0;
    width: 12px;
    height: 12px;
    left: 9px
  }

  input:checked + label::after {
    opacity: 1;
  }

  input[type="radio"] {
    position: absolute;
    white-space: nowrap;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    height: 1px;
    width: 1px;
    margin: -1px;
    padding: 0;
  }
}

.code {
  border: 1px solid #bcb8b8;
  border-radius: 6px;
  padding: 10px 10px 0 10px;
  line-height: 1.75rem;

  textarea {
    font-size: 16px;
    min-height: 32px;
    max-width: 100%;
    border: none;
    width: 100%;
    font: inherit;
    letter-spacing: normal;
    color: rgba(0,0,0,.6);
    resize: none;

    &:focus {
      outline: none;
    }
  }
}

.spinner {
  padding: 0;
  margin: 0;
  width: 2%;
  justify-content: center;
  display: flex;
  align-items: center;

  .spinner-icon {
    color: var(--base-color);
    /* Font Awesome の .svg-inline--fa と同じ寸法 */
    box-sizing: content-box;
    display: inline-block;
    height: 1em;
    overflow: visible;
    vertical-align: -0.125em;
    width: 1.25em;
  }
}

.adsense {
  text-align: center;
}

.footer {
  text-align: center;
  background-color: #f5f5f5;
  color: rgba(0,0,0,.87);

  left: 0px;
  right: 0px;
  bottom: 0px;
  position: fixed;
  height: 48px;
  padding: 10px;
}
