You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

251 line
4.3 KiB

  1. @import '../../_global/styles/mixins';
  2. @import '../../_global/styles/vars';
  3. .richtext {
  4. .detail-text:has(.survey) {
  5. overflow-x: visible;
  6. }
  7. }
  8. .survey {
  9. position: relative;
  10. display: block;
  11. margin: var(--section-margin) 0;
  12. background-color: var(--theme-color-secondary-dimmed);
  13. border-bottom: var(--border-width) solid var(--theme-color-secondary);
  14. legend {
  15. margin: 0 0 0.75rem 0;
  16. }
  17. .text-box {
  18. padding: var(--content-box-padding) var(--content-box-padding) 0 var(--content-box-padding);
  19. font-size: var(--font-size-small);
  20. .kicker {
  21. margin-top: -0.3em;
  22. }
  23. h2, h3 {
  24. margin-top: 0.2em;
  25. margin-bottom: 0.3em;
  26. }
  27. p:last-child {
  28. margin-bottom: 0;
  29. }
  30. @media(max-width: 567px) {
  31. padding-top: calc(var(--content-box-padding) * 1.5);
  32. }
  33. }
  34. .form-box {
  35. position: relative;
  36. padding: var(--content-box-padding);
  37. transition: height 0.5s $easeInOutCubic;
  38. @media(max-width: 567px) {
  39. padding-bottom: calc(var(--content-box-padding) * 1.5);
  40. }
  41. }
  42. form {
  43. @include show;
  44. transform: translate3d(0, 0, 0) scale(1);
  45. &:not(:last-child) {
  46. height: 0;
  47. }
  48. }
  49. h3, h4 {
  50. @media(max-width: 767px) {
  51. font-size: 26px;
  52. }
  53. }
  54. legend {
  55. @include h4;
  56. color: var(--theme-color-primary);
  57. margin: 1em 0 0.5em;
  58. padding: 0;
  59. border-bottom: 0;
  60. }
  61. ul {
  62. list-style: none;
  63. padding: 0;
  64. margin: 0 -2px;
  65. li.choice {
  66. position: relative;
  67. padding: 0;
  68. + li {
  69. margin-top: 15px;
  70. }
  71. }
  72. }
  73. input[type="radio"] {
  74. position: absolute;
  75. display: block;
  76. top: 0;
  77. left: 0;
  78. width: 100%;
  79. height: 100%;
  80. z-index: 1;
  81. border-radius: var(--border-radius-md);
  82. margin: 0;
  83. -webkit-appearance: none;
  84. -moz-appearance: none;
  85. appearance: none;
  86. transition: 0.25s ease;
  87. cursor: pointer;
  88. opacity: 0.000001;
  89. @include focus-visible();
  90. &:checked + label {
  91. background-color: var(--theme-color-secondary-intensed);
  92. color: var(--theme-color-white);
  93. }
  94. &:hover + label::after {
  95. opacity: var(--button-hover-shadow-opacity);
  96. box-shadow: 0 0 0 var(--button-hover-shadow-size) var(--button-bg-color);
  97. }
  98. }
  99. label.btn {
  100. width: 100%;
  101. transition: 0.3s ease;
  102. margin: 0;
  103. text-align: center;
  104. line-height: 1.2;
  105. min-height: 48px;
  106. @media(max-width: 999px) {
  107. min-height: 44px;
  108. }
  109. }
  110. fieldset {
  111. border: 0;
  112. padding: 0;
  113. margin: 0;
  114. }
  115. fieldset + fieldset {
  116. margin-top: calc(20px + 2%);
  117. }
  118. .btn-wrapper {
  119. display: none;
  120. }
  121. .survey-result > .title {
  122. display: none;
  123. }
  124. .result-wrapper {
  125. .title {
  126. @include h4;
  127. }
  128. }
  129. .sub-result-wrapper {
  130. position: relative;
  131. display: flex;
  132. justify-content: space-between;
  133. font-size: var(--font-size-copy);
  134. line-height: 1.1;
  135. padding: 10px 15px;
  136. align-items: center;
  137. font-family: "Korb", sans-serif;
  138. min-height: 48px;
  139. @media(max-width: 999px) {
  140. min-height: 44px;
  141. }
  142. @media(max-width: 767px) {
  143. padding: 5px 5px 5px 10px;
  144. }
  145. + .sub-result-wrapper {
  146. margin-top: 15px;
  147. }
  148. div {
  149. position: relative;
  150. display: block;
  151. &.answer {
  152. overflow: hidden;
  153. max-width: calc(100% - 60px);
  154. @media(max-width: 767px) {
  155. max-width: calc(100% - 50px);
  156. }
  157. }
  158. }
  159. .bar {
  160. position: absolute;
  161. display: block;
  162. left: 0;
  163. width: 0;
  164. top: 0;
  165. bottom: 0;
  166. transition: 0.8s $easeInOutCubic;
  167. min-width: 1px;
  168. background-color: #9AD7A3;
  169. }
  170. }
  171. .survey-result {
  172. @include hide;
  173. transform: translate3d(0, 0, 0) scale(0.9);
  174. h3 {
  175. margin-bottom: 0.9em;
  176. }
  177. }
  178. &.show-result {
  179. .survey-result {
  180. @include show(0.3s);
  181. transform: translate3d(0, 0, 0) scale(1);
  182. }
  183. form {
  184. @include hide();
  185. transform: translate3d(0, 0, 0) scale(0.9);
  186. }
  187. }
  188. &[data-size='lg'] {
  189. display: flex;
  190. //align-items: center;
  191. align-items: flex-start;
  192. .text-box, .form-box {
  193. flex: 1 1 100%;
  194. max-width: 50%;
  195. }
  196. .text-box {
  197. padding: var(--content-box-padding);
  198. margin-bottom: 0.1em;
  199. .kicker {
  200. padding-top: 0.1em;
  201. }
  202. }
  203. .form-box {
  204. padding-left: 0;
  205. }
  206. }
  207. }