/* Promotion → Email form 스타일링 ------------------------------------------------------ */
.emailContainer {
&__block {
position: relative;
width: rem(228);
@include media('>=lg') {
width: rem(540);
}
label {
letter-spacing: -0.04em;
color: get-color(gray);
transition: all 0.2s ease(out-expo);
@include font-and-line-height(13px, 1.35);
@include position(absolute, top 12px left 15px);
@include media('>=lg') {
top: 18px;
font-size: rem(16);
}
}
input {
width: 100%;
border: 0;
border-radius: rem(50);
background: get-color(white);
@include fsp(13, 18 20 7);
@include media('>=lg') {
border-radius: 0;
font-size: rem(16);
@include fsp(16, 23 20 16);
}
}
input:focus + label {
top: 3px;
left: 20px;
font-size: rem(11);
@include media('>=lg') {
top: 5px;
left: 19px;
font-size: rem(12);
}
}
input:valid {
color: get-color(black);
}
input:invalid {
border-bottom: 3px solid get-color(red);
color: get-color(red);
}
[role='alert'] {
display: none;
margin-top: rem(5px);
line-height: 1.35;
letter-spacing: -0.04em;
font-size: rem(14px);
font-weight: bold;
color: get-color(red);
}
}
// emailContainer____block--valid (--nvalid)
&__block--invalid [role='alert'] {
display: block;
@include text(align center);
@include media('>=lg') {
text-align: left;
@include p(l rem(20));
}
}
&__block--valid label,
&__block--invalid label {
top: 3px;
left: 20px;
font-size: rem(11px);
@include media('>=lg') {
top: 5px;
left: 19px;
font-size: rem(12px);
}
}
}