market/src/components/@shared/atoms/Modal/index.module.css

92 lines
1.4 KiB
CSS

.modalOverlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--background-body-transparent);
backdrop-filter: blur(3px);
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
animation: fadeIn 0.2s ease-out backwards;
z-index: 5;
}
.modal {
composes: box from '../Box.module.css';
padding: var(--spacer);
margin: var(--spacer) auto;
max-width: var(--break-point--small);
position: relative;
animation: moveUp 0.2s ease-out backwards;
}
.modal:focus {
outline: 0;
}
@media (min-width: 40rem) {
.modal {
padding: calc(var(--spacer) * 2);
}
}
.header {
padding-bottom: var(--spacer);
}
.title {
font-size: var(--font-size-h3);
margin: 0;
}
@media (min-width: 40rem) {
.title {
font-size: var(--font-size-h2);
}
}
.description {
margin: 0;
margin-top: var(--spacer);
}
.close {
position: absolute;
cursor: pointer;
background: none;
border: 0;
box-shadow: none;
outline: 0;
top: calc(var(--spacer) / 4);
right: calc(var(--spacer) / 2);
font-size: var(--font-size-h2);
color: var(--font-color-text);
}
.close:hover,
.close:focus {
opacity: 0.7;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes moveUp {
from {
transform: translate3d(0, 1rem, 0);
}
to {
transform: translate3d(0, 0, 0);
}
}