169 lines
2.8 KiB
SCSS
169 lines
2.8 KiB
SCSS
.card {
|
|
--on-background: #2c4678;
|
|
--on-background-secondary: #455e91;
|
|
--background: #d8e2ff;
|
|
position: relative;
|
|
}
|
|
|
|
.content {
|
|
position: relative;
|
|
margin-top: 32px;
|
|
}
|
|
.star {
|
|
position: absolute;
|
|
width: 260px;
|
|
height: 260px;
|
|
right: -120px;
|
|
top: -190px;
|
|
color: #aec6ff;
|
|
transform: rotate(-15deg);
|
|
pointer-events: none;
|
|
}
|
|
.questions {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
.item {
|
|
background: #f3f3fa;
|
|
border-radius: 20px;
|
|
transition: background 0.3s ease;
|
|
}
|
|
.expanded {
|
|
background: #fff;
|
|
}
|
|
|
|
.question {
|
|
display: grid;
|
|
grid-template-columns: 40px minmax(0, 1fr) 32px;
|
|
align-items: center;
|
|
gap: 16px;
|
|
width: 100%;
|
|
padding: 20px 24px;
|
|
border: 0;
|
|
border-radius: 20px;
|
|
background: transparent;
|
|
color: var(--on-background);
|
|
font: inherit;
|
|
font-size: 1.125rem;
|
|
font-weight: 700;
|
|
text-align: left;
|
|
line-height: 1.5;
|
|
&:focus-visible {
|
|
outline: 3px solid #2c4678;
|
|
outline-offset: 3px;
|
|
}
|
|
}
|
|
|
|
.number {
|
|
font-size: 0.85rem;
|
|
color: #455e91;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.plus {
|
|
display: block;
|
|
position: relative;
|
|
width: 32px;
|
|
height: 32px;
|
|
background: #d8e2ff;
|
|
border-radius: 50%;
|
|
&::before,
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
left: 9px;
|
|
top: 15px;
|
|
width: 14px;
|
|
height: 2px;
|
|
border-radius: 2px;
|
|
background: #2c4678;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
&::after {
|
|
transform: rotate(90deg);
|
|
}
|
|
}
|
|
.expanded .plus::after {
|
|
transform: rotate(0);
|
|
}
|
|
|
|
.answer {
|
|
display: grid;
|
|
grid-template-rows: 0fr;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
transition:
|
|
grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1),
|
|
opacity 0.25s ease,
|
|
visibility 0.35s;
|
|
> div {
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
}
|
|
p {
|
|
padding: 0 72px 24px 80px;
|
|
max-width: 960px;
|
|
color: #455e91;
|
|
font-size: 1rem;
|
|
font-weight: 500;
|
|
line-height: 1.7;
|
|
}
|
|
a {
|
|
color: #2c4678;
|
|
font-weight: 700;
|
|
text-decoration: underline;
|
|
text-underline-offset: 3px;
|
|
border-radius: 4px;
|
|
&:focus-visible {
|
|
outline: 2px solid #2c4678;
|
|
outline-offset: 3px;
|
|
}
|
|
}
|
|
}
|
|
.expanded .answer {
|
|
grid-template-rows: 1fr;
|
|
visibility: visible;
|
|
opacity: 1;
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
.question {
|
|
font-size: 1rem;
|
|
}
|
|
.answer p {
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
@media (max-width: 500px) {
|
|
.card {
|
|
padding: 24px;
|
|
}
|
|
.question {
|
|
padding: 16px;
|
|
gap: 10px;
|
|
grid-template-columns: 24px minmax(0, 1fr) 28px;
|
|
font-size: 0.95rem;
|
|
}
|
|
.plus {
|
|
width: 28px;
|
|
height: 28px;
|
|
&::before,
|
|
&::after {
|
|
left: 7px;
|
|
top: 13px;
|
|
}
|
|
}
|
|
.answer p {
|
|
padding: 0 16px 20px 50px;
|
|
}
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.item,
|
|
.plus::before,
|
|
.plus::after,
|
|
.answer {
|
|
transition: none;
|
|
}
|
|
}
|