.cp_qa *, .cp_qa *:after, .cp_qa *:before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.cp_qa .cp_actab {
position: relative;
overflow: hidden;
width: 70%;
margin: 0 0 1em 0;
color: #1b2538;
}
.cp_qa .cp_actab input {
position: absolute;
opacity: 0;
}
/* 質問 */
.cp_qa .cp_actab label {
font-weight: bold;
line-height: 1.6em;
position: relative;
display: block;
margin: 0 0 0 0;
padding: 1em 2em 1em 2.5em;
cursor: pointer;
text-indent: 1em;
border-radius: 0.5em;
background: rgba(27,37,56,0.1);
}
.cp_qa .cp_actab label::before {
font-family: serif;
font-size: 1.5em;
margin-left: -2em;
padding-right: 0.5em;
content: 'Q';
}
.cp_qa .cp_actab label:hover {
transition: all 0.3s;
color: #00838f;
}
/* --質問の＋アイコン */
.cp_qa .cp_actab label::after {
font-size: 1.7em;
font-weight: bold;
line-height: 2em;
position: absolute;
top: 0;
right: 0;
content: '\2b';
display: inline-block;
width: 2em;
height: 2em;
-webkit-transition: transform 0.4s;
transition: transform 0.4s;
}
/* 答え */
.cp_qa .cp_actab .cp_actab-content {
position: relative;
overflow: hidden;
max-height: 0;
padding: 0 0 0 2.5em;
-webkit-transition: max-height 0.2s;
transition: max-height 0.2s;
border-radius: 0 0 0.5em 0.5em;
}
.cp_qa .cp_actab .cp_actab-content::before {
font-family: serif;
font-size: 1.5em;
position: absolute;
margin: 0.4em 0 0 -1em;
padding: 0;
content: 'A';
}
.cp_qa .cp_actab .cp_actab-content p {
margin: 1em 1em 1em 0;
}
/* 質問を開いた時の仕様 */
/* --答えの高さ */
.cp_qa .cp_actab input:checked ~ .cp_actab-content {
max-height: 40em;
border: 10px solid rgba(27,37,56,0.1);
}
/* 質問をクリックした時のアイコンの動き */
.cp_qa .cp_actab input:checked ~ label {
color: #00838f;
border-radius: 0.5em 0.5em 0 0;
}
/* 質問をクリックした時の+の動き */
.cp_qa .cp_actab input[type=checkbox]:checked + label::after {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
}