/* overlay */
#TB_overlay {
    background: #FFFFFF;
    background: rgba(255, 255, 255, 0.9);
    bottom: 0px;
    height: 100%;
    left: 0px;
    position: fixed;
    right: 0px;
    top: 0px;
    width: 100%;
    z-index: 600;
}

#TB_close {
    right: 1%;
    top: 1%;
}

/* close button */
#TB_closeWindow, #TB_closeAjaxWindow {
    height: 0px;
    overflow: hidden;
    text-indent: -9999px;
    width: 0px;
}

#TB_closeWindowButton:not(.csc-mailform-button) {
    background: #868686;
    height: 40px;
    position: fixed;
    right: 1%;
    text-align: left;
    text-indent: -9999px;
    top: 1%;
    width: 40px;
    z-index: 604;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    -moz-transition: color 0.3s ease;
    -ms-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

@media only screen and (min-width: 74em) {
    #TB_closeWindowButton:not(.csc-mailform-button) {
        top: -6%;
        right: -6%;
    }
}


#TB_closeWindowButton:not(.csc-mailform-button):hover {
    background-color: #111111;
}

#TB_closeWindowButton:not(.csc-mailform-button):before,
#TB_closeWindowButton:not(.csc-mailform-button):after {
    background-color: #FFFFFF;
    bottom: 20%;
    content: "";
    left: 50%;
    margin-left: -1px;
    position: absolute;
    top: 20%;
    width: 2px;
}

#TB_closeWindowButton:not(.csc-mailform-button):before {
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

#TB_closeWindowButton:not(.csc-mailform-button):after {
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}


/* caption */
#TB_caption {
    background: #868686;
    bottom: 0px;
    color: #FFFFFF;
    font-size: 13px;
    left: 0px;
    padding: 10px;
    position: fixed;
    right: 0px;
    text-align: center;
    z-index: 603;
}

/* animations */
#TB_load, #TB_load:after, #TB_overlay,
#TB_closeWindowButton:not(.csc-mailform-button),
#TB_closeWindowButton:not(.csc-mailform-button):before,
#TB_closeWindowButton:not(.csc-mailform-button):after, #TB_caption {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-overflow-scrolling: touch;
}

#TB_load, #TB_overlay, #TB_closeWindowButton, #TB_caption {
    -moz-animation: fade-in 0.25s linear;
    -o-animation: fade-in 0.25s linear;
    -webkit-animation: fade-in 0.25s linear;
    animation: fade-in .25s linear;
}

@-webkit-keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in {
    from {
        -moz-opacity: 0;
        opacity: 0;
    }
    to {
        -moz-opacity: 0;
        opacity: 1;
    }
}

/* window */
#TB_window {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    text-align: left;
    /*z-index: 602;*/
    z-index: 9999999999;
}

/* to 1184px */
@media only screen and (max-width: 73.99em) {
    html:not([class*="-fullscreen"]) #TB_window,
    html.tx-p123maps-pi1-fullscreen-open #TB_window {
        bottom: 2%;
        left: 2%;
        margin: 0 !important;
        right: 2%;
        top: 2%;
        width: auto !important;
    }
}

/* from 1184px */
@media only screen and (min-width: 74em) {
    html:not([class*="-fullscreen"]) #TB_window,
    html.tx-p123maps-pi1-fullscreen-open #TB_window {
        top: 10%;
        bottom: 10%;
        width: 1000px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: auto !important;
        margin-bottom: auto !important;
        transform: translateX(-50%);
    }
}

/* csc-mailform-button as X  */
/* @ToDo: #TB_ajaxContent ???*/
#TB_window .TB_modal a.csc-mailform-button.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    height: 1em;
    width: 1em;
    padding: 0 !important;
    font-size: 1.25rem;
    text-indent: -999999em;
    cursor: pointer;
    background: none !important;
    color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    border: none !important;
}

#TB_window .TB_modal a.csc-mailform-button.close:before,
#TB_window .TB_modal a.csc-mailform-button.close:after {
    background: #555659;
    content: "";
    display: block;
    font-size: 1.6rem !important;
    height: 0.18rem;
    left: 0;
    position: absolute;
    top: 0.4em;
    width: 1em;
    margin-left: 0 !important;
}

#TB_window .TB_modal a.csc-mailform-button.close:before {
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

#TB_window .TB_modal a.csc-mailform-button.close:after {
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

/* image & content */
#TB_Image,
#TB_ajaxContent {
    -moz-box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.75);
    box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.75);
    -ms-touch-action: none;
    touch-action: none;
}

#TB_Image {
    position: relative;
    display: block;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

@media only screen and (max-width: 64em) {
    #TB_Image {
        height: auto !important;
        position: absolute;
        /*top: 50%;*/
        width: 100% !important;
        /*-moz-transform: translateY(-50%);*/
        /*-ms-transform: translateY(-50%);*/
        /*-o-transform: translateY(-50%);*/
        /*-webkit-transform: translateY(-50%);*/
        /*transform: translateY(-50%);*/
    }
}

/* TB_ajaxContent */
#TB_ajaxContent {
    background: #FFFFFF;
    clear: both;
    line-height: 15.5px;
    overflow: auto;
    padding: 2px 15px 15px 15px;
    position: relative;
    text-align: left;
    z-index: 602;
}

html:not([class*="-fullscreen"]) #TB_ajaxContent,
html.tx-p123maps-pi1-fullscreen-open #TB_ajaxContent {
    bottom: 0px;
    overflow-y: auto;
    position: absolute;
    top: 0px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html:not([class*="-fullscreen"]) #TB_ajaxContent,
html.tx-p123maps-pi1-fullscreen-open #TB_ajaxContent {
    height: auto !important;
    width: 100% !important;
}

html:not([class*="-fullscreen"]) #TB_title ~ #TB_ajaxContent,
html.tx-p123maps-pi1-fullscreen-open #TB_title ~ #TB_ajaxContent {
    top: 42px;
}

#TB_ajaxContent.TB_modal {
    padding: 15px;
}

#TB_ajaxContent p {
    padding: 5px 0px 5px 0px;
}


/*#TB_title #TB_ajaxWindowTitle {*/
#TB_ajaxWindowTitle {
    display: inline-block;
    margin: 0px 40px 0px 15px;
    padding: 0px;
    font-weight: bold;
    vertical-align: middle;
}

#TB_title {
    position: relative;
    height: 42px;
    background: #555659;
    z-index: 604;
}

#TB_title:before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    *zoom: 1;
}


#TB_title #TB_ajaxWindowTitle {
    color: #FFFFFF;
}

#TB_title #TB_closeAjaxWindow {
    color: #FFFFFF;
}

#TB_iframeContent {
    border: none;
    clear: both;
    margin-bottom: -1px;
    margin-top: 1px;
    _margin-bottom: 1px;
}

/* hideSelector */
#TB_HideSelect {
    background-color: #FFFFFF;
    border: none;
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99;
    -moz-opacity: 0;
    opacity: 0;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
    filter: alpha(opacity=0);
}

@media all and (min-width: 0\0) {
    #TB_HideSelect {
        -ms-filter: none;
        filter: none;
    }
}

/* IE9+ */
/* activity indication */
#TB_load, #TB_load:after {
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
}

#TB_load img {
    display: none;
}

#TB_load {
    background: #444444;
    background: rgba(0, 0, 0, 0.5);
    height: 40px;
    left: 50%;
    margin: -20px 0px 0px -20px;
    padding: 10px;
    position: fixed;
    top: 50%;
    width: 40px;
    z-index: 601;
    -moz-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.75);
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.75);
}

#TB_load:after {
    background: #FFFFFF;
    content: "";
    display: block;
    height: 20px;
    width: 20px;
    -moz-animation: tb-load 0.5s ease infinite;
    -o-animation: tb-load 0.5s ease infinite;
    -webkit-animation: tb-load 0.5s ease infinite;
    animation: tb-load 0.5s ease infinite;
}

@-webkit-keyframes tb-load {
    from {
        opacity: 0.5;
        -webkit-transform: scale(0.75);
        transform: scale(0.75);
    }
    50% {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    to {
        opacity: 0.5;
        -webkit-transform: scale(0.75);
        transform: scale(0.75);
    }
}

@keyframes tb-load {
    from {
        -moz-opacity: 0.5;
        opacity: 0.5;
        -moz-transform: scale(0.75);
        -ms-transform: scale(0.75);
        -o-transform: scale(0.75);
        transform: scale(0.75);
    }
    50% {
        -moz-opacity: 1;
        opacity: 1;
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
        transform: scale(1);
    }
    to {
        -moz-opacity: 0.5;
        opacity: 0.5;
        -moz-transform: scale(0.75);
        -ms-transform: scale(0.75);
        -o-transform: scale(0.75);
        transform: scale(0.75);
    }
}

/* prev & next */
#TB_next, #TB_prev {
    display: block;
    font-size: 0px;
    height: 0px;
    line-height: 0px;
    overflow: hidden;
    text-indent: -9999px;
    width: 0px;
}

#TB_next a, #TB_prev a {
    background: #868686;
    height: 40px;
    margin-top: -20px;
    position: fixed;
    top: 50%;
    width: 40px;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    -moz-transition: color 0.3s ease;
    -ms-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

#TB_next a:hover, #TB_prev a:hover {
    background: #111111;
}

#TB_next a {
    right: 1%;
}

#TB_prev a {
    left: 1%;
}

#TB_next a:before, #TB_next a:after, #TB_prev a:before, #TB_prev a:after {
    background-color: #FFFFFF;
    content: "";
    left: 50%;
    margin-left: -1px;
    position: absolute;
    width: 2px;
}

#TB_next a:before {
    bottom: 20%;
    top: 44%;
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

#TB_next a:after {
    bottom: 44%;
    top: 20%;
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

#TB_prev a:before {
    bottom: 20%;
    top: 44%;
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

#TB_prev a:after {
    bottom: 44%;
    top: 20%;
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

@media print {
    #TB_window {
        max-width: 100%;
        margin: 0px !important;
        -moz-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
    }

    #TB_ajaxContent {
        max-width: 100%;
    }

    #TB_closeWindow, #TB_closeAjaxWindow {
        display: none;
    }

    #TB_title {
        height: auto;
        min-height: 27px;
    }
}

/* window + ajaxContent  as tb_error + tb_dialog*/
html:not([class*="-fullscreen"]) #TB_window.tb_error,
html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_error,
#TB_window.tb_error,
html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_dialog,
html:not([class*="-fullscreen"]) #TB_window.tb_dialog,
#TB_window.tb_dialog {
    position: fixed;
    text-align: left;
    z-index: 602;
}

/* override css */
html:not([class*="-fullscreen"]) #TB_window.tb_error,
html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_error,
#TB_window.tb_error,
html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_dialog,
html:not([class*="-fullscreen"]) #TB_window.tb_dialog,
#TB_window.tb_dialog {
    /*top: 2%;*/
    top: 50%;
    right: 2%;
    /*bottom: 2%;*/
    bottom: auto;
    left: 2%;
    margin: 0 !important;
    width: auto !important;
    height: 395px !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    transform: translateY(-50%);
}

html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_dialog,
html:not([class*="-fullscreen"]) #TB_window.tb_dialog,
#TB_window.tb_dialog {
    height: 450px !important;
}

#TB_window.tb_error #TB_ajaxContent.TB_modal,
#TB_window.tb_dialog #TB_ajaxContent.TB_modal {
    height: 100% !important;
    width: 100% !important;
}

/* 660px and min-height 400px*/
@media only screen and (min-width: 41.25em) and (min-height: 25em)  {
    /* override css */
    html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_error,
    html:not([class*="-fullscreen"]) #TB_window.tb_error,
    #TB_window.tb_error,
    html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_dialog,
    html:not([class*="-fullscreen"]) #TB_window.tb_dialog,
    #TB_window.tb_dialog {
        /*top: 50%;*/
        right: auto;
        left: 50%;
        width: 650px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transform: translate(-50%,-50%);
    }

    html.tx-p123maps-pi1-fullscreen-open #TB_window.tb_dialog,
    html:not([class*="-fullscreen"]) #TB_window.tb_dialog,
    #TB_window.tb_dialog {
        height: 395px !important;
    }
}

@media only screen and (min-width: 74em) {
    #TB_caption {
        top: -50px !important;
        bottom: auto !important;
    }

    #TB_next a {
        right: -6%;
    }

    #TB_prev a {
        left: -6%;
    }
}

