/*
CSS3 Transitions and Animations - Practice
*/

/* Keyframes */



/* General */

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 1em;
    color: #eee;
    background-color: #383838;
    background-image: url(../img/bg.png)
}
h2 {
    text-transform: uppercase;
    text-align: center;
    font-size: 32px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Concert Map */

.concert-map {
    width: 800px;
    height: 500px;
    position: relative;
    margin: 50px auto;
    background-image: url(../img/concert-map.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position-y: -300px;
    border: 3px solid #c0c0c0;
}
.pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #f3244a;
    position: absolute;
    cursor: pointer;
}
.pin.madrid {
    top: 380px;
    left: 105px;
}
.pin.turin {
    left: 305px;
    top: 295px;
}
.pin.hamburg {
    left: 340px;
    top: 105px;
}
.pin.krakow {
    left: 485px;
    top: 165px;
}
.pin .town {
    position: absolute;
    top: -1px;
    left: 20px;
    color: #fafafa;
    text-shadow: 1px 1px 0px #555555;
}
.pin .popover {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    min-width: 150px;
    height: auto;
    background: #333;
    padding: 10px;
    bottom: 22px;
    left: -8px;
    box-shadow: 4px 4px 0px 0px rgba(33, 33, 33, 0.2);
    z-index: 3;
}
.pin .popover:before {
    content: '';
    width: 10px;
    height: 10px;
    background: #333;
    position: absolute;
    bottom: -5px;
    -webkit-transform: rotateZ(45deg);
    -o-transform: rotateZ(45deg);
    -moz-transform: rotateZ(45deg);
    transform: rotateZ(45deg);
}
.pin .popover .place {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}
.pin .popover .date {
    font-size: 12px;
    font-style: italic;
}
.pin .popover .button {
    display: block;
    padding: 10px;
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    color: #fafafa;
    background-color: #f3244a;
}

.pin:before,
.pin:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    border-radius: 50%;
    border: 1px solid #f3244a;
    width: 0;
    height: 0;
    margin-left: -2px;
    margin-top: -2px;
}

@keyframes pinBeforeWave {
    from {
        width: 0;
        height: 0;
        margin-left: -2px;
        margin-top: -2px;
    }
    to {
        width: 40px;
        height: 40px;
        margin-left: -21px;
        margin-top: -21px;
        opacity: 0;
    }
}
@keyframes pinAfterWave {
    from {
        width: 0;
        height: 0;
        margin-left: -2px;
        margin-top: -2px;
    }
    to {
        width: 66px;
        height: 66px;
        margin-left: -34px;
        margin-top: -34px;
        opacity: 0;
    }
}

.pin:before {
    animation: pinBeforeWave 1s ease-in infinite;
}
.pin:after {
    animation: pinAfterWave 1s ease-in infinite;
}

.pin:hover:before,
.pin:hover:after {
    animation-play-state: paused;
}

.pin:hover .popover {
    visibility: visible;
    opacity: 1;
}

.pin.popover .button:hover {
    background-color: #e10087;
}