/*
* Projects bar for nic.cz websites
*
* Style contents
* ==========================================================================================
*
* RESET
* GENERAL
* KEYFRAMES

/* restet */

#tb-projects-bar div,
#tb-projects-bar span,
#tb-projects-bar a,
#tb-projects-bar img,
#tb-projects-bar table,
#tb-projects-bar tbody,
#tb-projects-bar tr,
#tb-projects-bar th,
#tb-projects-bar td {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-weight: normal;
    font-size: 100%;
    vertical-align: baseline;
    text-align: left;
    background-color: transparent;
    color: #555;
}

#tb-projects-bar table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* projects bar widget */

div#tb-projects-bar {
    background: #fff;
    border-bottom: 1px solid #d5d5d5;
    white-space: nowrap;
    min-width: 900px;
    height: auto;
    max-height: 36px;
    position: relative;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 15px;
    display: flex; /* also done dynamically */
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    -o-flex-direction: row;
    flex-direction: row;
}

div#tb-projects-bar a {
    text-decoration: underline;
}

div#tb-projects-bar table tr td a {
    margin: 3px 10px 2px;
    display: block;
}

div#tb-projects-bar a:focus {
    outline: 1px dotted #003893;
}

div#tb-projects-bar a:hover {
    color: #0f78b3;
    text-shadow: rgba(255, 255, 255, 0.4) 1px 1px;
    text-decoration: none;
}

div#tb-projects-bar.tb-opening {
    border-bottom: 1px solid #d5d5d5;
    max-height: 360px; /* usefull for transition/animation */
    transition: all 0.5s linear;
}

div#tb-projects-bar.tb-closing {
    border-bottom: 1px solid #d5d5d5;
    height: 36px;
    max-height: 36px; /* ()usefull for transition/animation */
    transition: all 0.5s linear;
}

div#tb-projects-bar.hide {
    visibility: hidden;
    display: none;
}

div#tb-projects-bar.shrink {
    height: 0;
    border: 0;
}

div#tb-projects-bar.forceshrink {
    transition: all 0 ease-in;
    height: 0;
    border: 0;
}

div#tb-projects-bar table {
    margin: 8px 2px 0;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0);
    position: relative;
    border-collapse: collapse;
    border-spacing: 0;
    border: 0;
    margin-left: -50%;
}

div#tb-projects-bar table tr td {
    border-right: 1px solid #d5d5d5;
    line-height: 15px;
}

div#tb-projects-bar table tr td:last-child {
    border-right: 0;
}

div#tb-projects-bar .tb-logo-wrapper a img {
    width: 100%;
    height: auto;
}

div#tb-projects-bar .tb-logo-wrapper a {
    width: 84px;
    height: auto;
    text-align: right;
    border: 0;
    position: absolute;
    margin: 8px 10px 0 31px;
}

div#tb-projects-bar .tb-control-panel-wrapper a {
    display: inline-block;
    cursor: pointer;
    text-align: right;
    margin-top: 10px;
    vertical-align: top;
    text-decoration: underline;
    position: relative;
}

div#tb-projects-bar .tb-control-panel-wrapper a::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 9px;
    background: transparent url('../../img/widgets/projects-bar-arrows.png') no-repeat;
    bottom: 3px;
    left: -9px;
    background-position: -12px 0;
}

div#tb-projects-bar .tb-control-panel-wrapper a:hover::before {
    background-position: -18px 0;
}

div#tb-projects-bar.tb-opening .tb-control-panel-wrapper a::before {
    background-position: 0 0;
}

div#tb-projects-bar.tb-opening .tb-control-panel-wrapper a:hover::before {
    background-position: -6px 0;
}

div#tb-projects-bar .tb-control-panel-wrapper a:hover {
    color: #0f78b3;
    text-shadow: rgba(255, 255, 255, 0.4) 1px 1px;
    text-decoration: none;
}

div#tb-projects-bar .tb-logo-wrapper {
    width: 160px;
    display: inline-block;
    vertical-align: top;
    position: relative;
}

div#tb-projects-bar .tb-control-panel-wrapper {
    display: inline-block;
    position: absolute;
    margin: 0 20px;
    right: 0;
    top: 0;
    text-align: right;
}

div#tb-projects-bar .tb-table-wrapper {
    margin: 8px auto 7px;
    position: sticky;
}

div#tb-projects-bar .tb-table-wrapper table {
    display: table;
    margin: 0;
}

div#tb-projects-bar .tb-table-wrapper table tr {
    display: none;
}

div#tb-projects-bar .tb-table-wrapper table tr:nth-child(1),
div#tb-projects-bar.tb-opening .tb-table-wrapper table tr {
    display: table-row;
}

div#tb-projects-bar .tb-table-wrapper table tr td {
    display: table-cell;
}

div#tb-projects-bar.tb-opening .tb-logo-wrapper a {
    width: 112px;
    height: auto;
    margin-top: 24px;
    animation: tb-imgEnlarge 0.25s linear 0s 1 normal;
    -moz-animation: tb-imgEnlarge 0.25s linear 0s 1 normal;
    -webkit-animation: tb-imgEnlarge 0.25s linear 0s 1 normal;
    transition: all 0.25s linear;
}

div#tb-projects-bar.tb-closing .tb-logo-wrapper a {
    width: 84px;
    height: auto;
    margin-top: 8px;
    animation: tb-imgScaleDown 0.25s linear 0s 1 normal;
    -moz-animation: tb-imgScaleDown 0.25s linear 0s 1 normal;
    -webkit-animation: tb-imgScaleDown 0.25s linear 0s 1 normal;
    transition: all 0.25s linear;
}

div#tb-projects-bar tr.tb-hideable,
div#tb-projects-bar.tb-closing tr.tb-hideable {
    display: none;
}

div#tb-projects-bar.tb-opening tr.tb-hideable {
    display: table-row;
}

div#tb-projects-bar.tb-opening tr.tb-hideable td {
    animation: tb-fadein 0.3s ease 0.25s 1 normal;
    -moz-animation: tb-fadein 0.3s ease 0.25s 1 normal;
    -webkit-animation: tb-fadein 0.3s ease 0.25s 1 normal;
    animation-fill-mode: backwards;
    -moz-animation-fill-mode: backwards;
    -webkit-animation-fill-mode: backwards;
}

div#tb-projects-bar .jump,
div#tb-projects-bar .jump:hover {
    color: #fff;
    display: block;
    font-size: 0.9em;
    position: absolute;
    margin: 9px -9999px;
}

div#tb-projects-bar .jump:focus {
    margin: 11px 121px;
    color: #333;
    background-color: #fff;
    z-index: 999;
}

/* keyframes */

@keyframes tb-fadein {
    from {
        opacity: 0;
        border-color: transparent;
    }
    to { opacity: 1; }
}

@-moz-keyframes tb-fadein {
    from {
        opacity: 0;
        border-color: transparent;
    }
    to { opacity: 1; }
}

@-webkit-keyframes tb-fadein {
    from {
        opacity: 0;
        border-color: transparent;
    }
    to { opacity: 1; }
}
