/*
Style Name:     time-line.css
Description:    Stili per componente custom timeline per sito terna.it
Author:         NS12 - dream-team - rcs 
Version:        1.4
Date:           21.10.2020
Modified:      	17.12.2020
*/

/* 
>> 1.0 - Timeline
   since: ver 1.0
==============================================================*/

.timeline {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    border-left: 1px solid #295eb9;
    top: 33px;
    bottom: 48px; /* per local */
    /* bottom: 38px; per terna.it */
    left: 20px;
}

@media screen and (min-width: 48em) {
    .timeline::after {
        left: 50%;
        top: 35px;
        bottom: -32px; /* per local */
        /* bottom: -37px; per terna.it */
    }
}

/* 
>> 2.0 - TimeSet container
   since: ver 1.0
==============================================================*/

.timeset-container {
    position: relative;
    vertical-align: top;
    margin: 10px 21px;
}

/* Pallino blu su timeline */
.timeset-container::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    top: 28px;
    background-color: #295eb9;
    border-radius: 50%;
    z-index: 1;
}

.timeset-container.timeset-left::after,
.timeset-container.timeset-right::after {
    left: -5px;
}

@media only screen and (min-width: 48em) {
    .timeset-container {
        width: calc(50% - 21px);
    }

    .timeset-container.timeset-left {
        left: 0;
        margin: 10px 0 10px 21px;
    }

    .timeset-container.timeset-right {
        left: 50%;
        margin: 10px 21px 10px 0;
    }

    /* Pallino blu su timeline */
    .timeset-container::after {
        width: 11px;
        height: 11px;
        top: 30px;
    }

    .timeset-container.timeset-left::after {
        left: calc(100% - 5px);
    }

    .timeset-container.timeset-right::after {
        left: -5px;
    }
}

/* 
>> 3.0 - Timeset
   since: ver 1.0
==============================================================*/

.timeset-date {
    padding: 0 20px;
    line-height: 1.5;
}

.timeset-wrapper {
    position: relative;
    border-top: 1px solid #295eb9;
}

.timeset-left .timeset-wrapper,
.timeset-right .timeset-wrapper {
    padding: 10px 30px 10px 20px;
}

@media only screen and (min-width: 48em) {
    .timeset-left .timeset-wrapper {
        padding: 10px 20px 10px 60px;
    }
}

.timeset-wrapper .trn-txt {
    line-height: 1.2;
    color: #295eb9;
}

@media only screen and (min-width: 48em) {
    .timeset-left .timeset-date {
        text-align: right;
    }
}

.timeset-wrappe .btn {
    position: relative;
    top: 0;
    left: 100%;
    z-index: 1;
}

.tl-icons img {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
}

.timeset-left .tl-icons img {
    left: calc(100% - 28px);
}

.timeset-right .tl-icons img {
    left: calc(100% - 28px);
}

@media only screen and (min-width: 48em) {
    .timeset-left .tl-icons img {
        left: 0;
    }
}

/* 
>> 4.0 - Popover
   since: ver 1.1
==============================================================*/

.timeline .popover {
    position: absolute;
    left: 25px;
    top: 8px;
    z-index: 100;
}

.timeline .timeset-right .popover {
    left: -15px;
}

.timeline .popover-body {
    position: absolute;
    width: 300px;
    margin: 8px 0;    
    padding: .5rem .75rem;
    top: 100%;
    left: 34px;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: .3rem;
}

.timeline .popover-body {
    transition-property: transform, opacity;
    transition-duration: 200ms;
    transition-timing-function: ease;
    transform: scale(0.9);
    transform-origin: top left;    
    opacity: 0;
}

.timeline .popover-active .popover-body {
    transform: scale(1);
    display: block;
    opacity: 1;
}

.timeline .popover-body:before,
.timeline .popover-body:after {
    content: "";
    position: absolute;
    display: block;    
    left: 8px;
    border-color: transparent;
    border-style: solid;
}

.timeline .popover-body:after {
    top: -8px;
    border-width: 0 .5rem .5rem .5rem;
    border-bottom-color: #fff;
}

.timeline .popover-body:before {
    top: -9px;
    border-width: 0 .5rem .5rem .5rem;
    border-bottom-color: rgba(0,0,0,.25);
}

.timeline .popover-text {
    font-family: Roboto,sans-serif;
    font-size: .875rem;
    line-height: 1.2;
    text-indent: 0;
}

.timeline .popover-trigger {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    text-indent: 0;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0 0.5rem 0.5rem;
    font-size: 1rem;
    line-height: 0.5;
    border-radius: 0.25rem;
    outline: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.timeline .popover-trigger {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #9e9e9e;
    cursor: pointer;
}

.timeline .popover-trigger:hover {
    text-decoration: none;
    background-color: #e7e7e7;
}