Files
wedding/src/components/RsvpButton/RsvpButton.css
2017-02-13 11:54:13 +00:00

103 lines
1.5 KiB
CSS

@import '../variables.css';
.root {
margin: 0 auto;
max-width: 420px;
position: relative;
}
.rsvp,
.rsvpForm {
position: absolute;
width: 100%;
transition: opacity ease-in-out 0.25s;
display: none;
opacity: 0;
}
.rsvpVisible,
.rsvpFormVisible {
display: block;
opacity: 1;
}
.formGroup {
margin-bottom: 15px;
}
.label {
display: inline-block;
position: fixed;
top: -1000px;
left: -1000px;
}
.input {
display: block;
box-sizing: border-box;
padding: 12px 16px;
width: 100%;
height: 50px;
opacity: 0.75;
outline: 0;
border: 3px solid #fff;
border-radius: 14px;
background: #fff;
color: #616161;
font-size: 18px;
line-height: 1.3333333;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.input:focus {
opacity: 1;
box-shadow: 0 0 4px #fff;
}
.inputInvalid {
animation: shake 0.5s linear;
}
.invalidMsg {
display: none;
padding: 10px 16px;
border: 2px solid var(--colour-red);
border-radius: 14px;
background: var(--colour-nearblack);
color: #fff;
text-decoration: none;
font-size: 18px;
line-height: 1.3333333;
transition: opacity ease-in-out 0.25s, box-shadow ease-in-out 0.25s;
}
.invalidMsgVisible {
display: inline-block;
opacity: 0.9;
}
@keyframes shake {
8%,
41% {
transform: translateX(-10px);
}
25%,
58% {
transform: translateX(10px);
}
75% {
transform: translateX(-5px);
}
92% {
transform: translateX(5px);
}
0%,
100% {
transform: translateX(0);
}
}