/*
 * CSIS South China Sea
 * By Nick Harbaugh
 * http://sevenmilemedia.com/
 */


/* ==========================================================================
   Base styles
   ========================================================================== */

.cs-container {
    position: relative;
    color: #232323;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 0 20px;
}

.cs-container * {
    box-sizing: border-box;
}

.cs-content {
    margin: 0 auto;
    /* Set max width for charts */
    max-width: 1080px;
}

.cs-header {
    margin-top: 40px;
    margin-bottom: 30px;
}

.cs-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 30px;
    font-weight: bold;
    margin: 5px 0 15px;
    text-transform: uppercase;
}

.cs-intro {
    font-size: 14px;
    line-height: 1.6em;
}


/* ==========================================================================
   Dropdown - year select
   ========================================================================== */

.cs-chart-header {
    border: 2px solid #333;
    padding: 0;
}

.cs-chart-header h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: bold;
    font-size: 18px;
    margin: 0 10px;
    text-transform: uppercase;
    float: left;
    margin-top: 16px;
}

.cs-dropdown {
    position: relative;
    float: right;
}

.cs-dropdown button {
    outline: none;
    margin: 0;
    border: none;
    background: #333;
    color: #fff;
    width: 100px;
    padding: 5px 15px 5px 0;
    font-size: 18px;
    font-weight: bold;
    height: 50px;
    border-radius: 0;

    -webkit-transition: background 200ms;
    -moz-transition: background 200ms;
    -o-transition: background 200ms;
    transition: background 200ms;
}

.cs-dropdown button:hover,
.cs-dropdown.open button {
    background: #111;
}

.cs-dropdown button span {
    position: absolute;
    color: #F1BE2C;
    right: 10px;
    top: 50%;
    margin-top: -8px;
}

/* Remove select border in Safari */
.cs-dropdown:focus,
.cs-dropdown:active {outline:0;}

/* Remove select border in Firefox */
.cs-dropdown:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

@media only screen and (max-width: 700px) {
    .cs-chart-header h3 {
        font-size: 16px;
    }
}

@media only screen and (max-width: 400px) {
    .cs-chart-header h3 {
        margin-top: 9px;
        max-width: 140px;
    }
}

.dropdown-menu {
    border: 2px solid #333;
    padding: 0;
    margin-top: 0px;
    min-width: 102px;
    font-size: 18px;
    font-weight: bold;

    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -o-border-radius: 0;
    border-radius: 0;
}

.dropdown-menu > li > a {
    padding: 5px 20px;
    font-weight: bold;
}

.dropdown-menu > li:hover > a,
.dropdown-menu > li.selected > a {
    background: #333;
    color: #fff;
}


/* ==========================================================================
   Timeline
   ========================================================================== */

.cs-timeline-container {
    width: 100%;
    margin-top: 35px;
    margin-bottom: 40px;
    position: relative;
}

ul.cs-timeline {
    margin: 0;
    padding: 0;
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    border-left: 2px solid #333;
    border-right: 2px solid #333;
    position: relative;
}

.cs-timeline li {
    list-style: none;
    text-align: center;

    position: absolute;
    bottom: -13px;
}

.no-touch .cs-timeline li:hover,
.cs-timeline li.active {
    z-index: 999;
}

.cs-timeline a {
    color: #333;
    text-decoration: none;
    outline: none;
}

.no-touch .cs-timeline a:hover,
.cs-timeline li.active a {
    color: #222;
}

.cs-timeline li.active a {
    cursor: default;
    pointer-events: none;
}

.cs-timeline li {
    width: 14px;
}

.cs-timeline span {
    display: inline-block;
    height: 14px;
    width: 100%;
    margin-left: -7px;
    border: 2px solid #333;
    border-radius: 7px;
    background: #fff;

    -webkit-transition: background 200ms;
    -moz-transition: background 200ms;
    -o-transition: background 200ms;
    transition: background 200ms;
}

.no-touch .cs-timeline a:hover span,
.cs-timeline li.active span {
    border-color: #222;
    background: #F1BE2C;
}

.cs-timeline p {
    position: absolute;
    margin: 0;
    margin-top: -15px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    font-style: italic;
    color: #383838;
    white-space: nowrap;
    pointer-events: none;

    opacity: 0;

    -webkit-transform: translate(0, 5px);
    -moz-transform: translate(0, 5px);
    -o-transform: translate(0, 5px);
    transform: translate(0, 5px);

    -webkit-transition: transform 200ms, opacity 200ms;
    -moz-transition: transform 200ms, opacity 200ms;
    -o-transition: transform 200ms, opacity 200ms;
    transition: transform 200ms, opacity 200ms;
}

.no-touch .cs-timeline a:hover p,
.cs-timeline li.active p {
    font-weight: bold;
    opacity: 1;
    -webkit-transform: translate(0, 0);
    -moz-transform: translate(0, 0);
    -o-transform: translate(0, 0);
    transform: translate(0, 0);
}

.cs-timeline a p.hidden {
    opacity: 0;
}


@media only screen and (max-width: 700px) {
    .cs-timeline li {
        width: 10px;
        bottom: -11px;
    }

    .cs-timeline span {
        height: 10px;
        width: 100%;
        margin-left: -5px;
        border-radius: 5px;
    }
}

.cs-hidden {
    opacity: 0 !important;
}


/* ==========================================================================
   Timeline nav (prev / next buttons)
   ========================================================================== */

.cs-timeline-nav {
    margin-bottom: 0;
    text-align: center;
}

.cs-timeline-nav a {
    width: 120px;
    display: inline-block;
    position: relative;
    padding: 18px 20px;
    border: 2px solid #333;
    background-color: #fff;
    line-height: 1em;
    font-size: 12px;
    color: #333;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: bold;
    outline: 0;

    -webkit-transition: background-color 200ms, color 200ms, border-color 200ms;
    -moz-transition: background-color 200ms, color 200ms, border-color 200ms;
    -o-transition: background-color 200ms, color 200ms, border-color 200ms;
    transition: background-color 200ms, color 200ms, border-color 200ms;
}

.cs-timeline-nav span {
    position: absolute;
    font-size: 16px;
    top: 50%;
    margin-top: -8px;
}

.cs-timeline-prev span {
    left: 12px;
}

.cs-timeline-next span {
    right: 12px;
}

.cs-timeline-nav span.nh-disabled {
    pointer-events: none;
    opacity: 0.5;
    background-color: #dfdfdf;
    color: #383838;
}

.cs-timeline-nav a:hover {
    background-color: #F1BE2C;
    border-color: #000;
    color: #fff;
}

.cs-timeline-next {
    text-align: left;
}

.cs-timeline-prev {
    text-align: right;
    margin-right: 10px;
}

@media only screen and (max-width: 700px) {
    .cs-timeline-nav {
        text-align: center;
        margin-top: 20px;
    }
    .cs-timeline-nav a {
        width: 48%;
        display: block;
    }
    .cs-timeline-prev {
        margin: 0;
        float: left;
    }
    .cs-timeline-next {
        float: right;
    }
}


/* ==========================================================================
   Incident cards
   ========================================================================== */

.cs-card-container {
    position: relative;
}

.cs-card {
    position: absolute;
    border: 5px solid rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.85);
    z-index: 999;
    width: 50%;
    top: 40px;

    max-height: 820px;
    overflow: auto;

    -webkit-box-shadow: 0 3px 12px -2px rgba(0, 0, 0, 0.4);
    -moz-box-shadow: 0 3px 12px -2px rgba(0, 0, 0, 0.4);
    -o-box-shadow: 0 3px 12px -2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 3px 12px -2px rgba(0, 0, 0, 0.4);

    opacity: 0;

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;

    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;

    -webkit-transform: translate3d(0, 0, 0) scale(0.9);
    -moz-transform: translate3d(0, 0, 0) scale(0.9);
    -o-transform: translate3d(0, 0, 0) scale(0.9);
    transform: translate3d(0, 0, 0) scale(0.9);
}

@media only screen and (max-width: 700px) {
    .cs-card {
        width: 100%;
        top: 0;
        max-height: inherit;
    }
}

.cs-active-card {
    -webkit-transition: transform 400ms, opacity 400ms;
    -moz-transition: transform 400ms, opacity 400ms;
    -o-transition: transform 400ms, opacity 400ms;
    transition: transform 400ms, opacity 400ms;

    opacity: 1;

    -webkit-transform: translate3d(0, 0, 0) scale(1);
    -moz-transform: translate3d(0, 0, 0) scale(1);
    -o-transform: translate3d(0, 0, 0) scale(1);
    transform: translate3d(0, 0, 0) scale(1);
}

.cs-card h1,
.cs-card h2,
.cs-card h3,
.cs-card h4,
.cs-card h5 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: bold;
    margin-bottom: 10px;
}

.cs-card p,
.cs-card li {
    font-size: 14px;
    line-height: 1.5em;
}

.cs-card-header {
    text-align: center;
    background: #111;
    padding: 30px 0 25px;

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;

    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;

}

.cs-card-content {
    padding: 20px 30px;
}

.cs-card-content-top {
    padding-top: 10px;
}

.cs-card-header h1 {
    font-family: 'Roboto Slab', serif;
    font-weight: bold;
    font-size: 40px;
    color: #F1BE2C;
    text-transform: uppercase;
    margin: 0;
    line-height: 1em;

    opacity: 0;

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;

    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;

    -webkit-transform: translate3d(0, 15px, 0);
    -moz-transform: translate3d(0, 15px, 0);
    -o-transform: translate3d(0, 15px, 0);
    transform: translate3d(0, 15px, 0);
}

.cs-active-card .cs-card-header h1 {
    -webkit-transition: transform 600ms, opacity 600ms;
    -moz-transition: transform 600ms, opacity 600ms;
    -o-transition: transform 600ms, opacity 600ms;
    transition: transform 600ms, opacity 600ms;

    opacity: 1;

    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.cs-card-header h1 span {
    font-family: 'Roboto', sans-serif;
    font-size: 1.6em;
    vertical-align: middle;
}

@media only screen and (max-width: 900px) {
    .cs-card-header h1 {
        font-size: 30px;
    }
}

@media only screen and (max-width: 500px) {
    .cs-card-header h1 {
        font-size: 26px;
    }
}

/* Date */

.cs-date-container {
    border-top: 1px solid #ccc;
    max-width: 50%;
    margin: 0 auto;

    opacity: 0;

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;

    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;

    -webkit-transform: translate3d(0, 0, 0) scale(0.6);
    -moz-transform: translate3d(0, 0, 0) scale(0.6);
    -o-transform: translate3d(0, 0, 0) scale(0.6);
    transform: translate3d(0, 0, 0) scale(0.6);
}

.cs-active-card .cs-date-container {
    -webkit-transition: transform 600ms, opacity 600ms;
    -moz-transition: transform 600ms, opacity 600ms;
    -o-transition: transform 600ms, opacity 600ms;
    transition: transform 600ms, opacity 600ms;

    opacity: 1;

    -webkit-transform: translate3d(0, 0, 0) scale(1);
    -moz-transform: translate3d(0, 0, 0) scale(1);
    -o-transform: translate3d(0, 0, 0) scale(1);
    transform: translate3d(0, 0, 0) scale(1);
}

.cs-date-container p {
    font-size: 14px;
    font-weight: bold;
    color: #eee;
    background: #111;
    display: inline-block;
    position: relative;
    top: -11px;
    margin: 0;
    padding: 0 8px;

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;

    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;

    -webkit-transform: translate3d(0, 0, 0) scale(1.4);
    -moz-transform: translate3d(0, 0, 0) scale(1.4);
    -o-transform: translate3d(0, 0, 0) scale(1.4);
    transform: translate3d(0, 0, 0) scale(1.4);
}

.cs-active-card .cs-date-container p {
    -webkit-transition: transform 600ms, opacity 600ms;
    -moz-transition: transform 600ms, opacity 600ms;
    -o-transition: transform 600ms, opacity 600ms;
    transition: transform 600ms, opacity 600ms;

    -webkit-transform: translate3d(0, 0, 0) scale(1);
    -moz-transform: translate3d(0, 0, 0) scale(1);
    -o-transform: translate3d(0, 0, 0) scale(1);
    transform: translate3d(0, 0, 0) scale(1);
}

/* Outcome */

.cs-card-outcome {
    margin-bottom: 20px;
}

.cs-card-outcome-item {
    padding: 5px 10px 5px 7px;
    background: #555;
    border-left: 4px solid #F1BE2C;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    width: 220px;
    min-height: 55px;
    position: relative;
}

.cs-card-outcome-item .cs-outcome-code,
.cs-card-outcome-item .cs-outcome-content {
    position: absolute;
    top: 50%;

    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

.cs-card-outcome-item .cs-outcome-code {
    text-align: center;
    width: 50px;
}

.cs-card-outcome-item .cs-outcome-content {
    left: 70px;
}

.cs-card-outcome-item h3,
.cs-card-outcome-item h4 {
    margin: 0;
}

.cs-card-outcome-item h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 24px;
    margin: 0;
    text-transform: uppercase;
    position: relative;
    letter-spacing: -0.07em;
}

.cs-card-outcome-item h4 {
    font-family: 'Roboto Condensed', serif;
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    margin-bottom: 3px;
}

.cs-card-outcome-item p {
    color: #fff;
    font-size: 10px;
    line-height: 1.2em;
    margin: 0;
    padding-right: 5px;
}

/* Breakdown */

.cs-card-breakdown {
    background: #555;
}

.cs-card-breakdown ul {
    padding-left: 30px;
}

.cs-card-breakdown li {
    list-style: none;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3em;
    font-size: 13px;
}

.cs-card-breakdown li:before {
    content:'\2022';
    display: block;
    position: relative;
    max-width: 0px;
    max-height: 0px;
    left: -30px;
    top: 2px;
    color: #F1BE2C;
    font-size: 40px;
}

/* Response */

.cs-card-responses p {
    font-size: 13px;
    line-height: 1.4em;
}

.cs-card-response.cs-align-left {
    width: 48%;
}

.cs-card-response.cs-align-left:first-of-type {
    margin-right: 4%;
}

/* Vessel icons */

.cs-card-vessels {
    text-align: center;
    margin-bottom: 20px;
}

.cs-card-vessels h4 {
    text-align: left;
}

.cs-country-vessels {
    width: 49%;
    text-align: center;
    display: inline-block;
    vertical-align: middle;
}

.cs-country-vessels h5 {
    font-size: 13px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.cs-popover-trigger {
    display: inline-block;
    position: relative;
}

.cs-vessel-container {
    height: 60px;
    position: relative;
    border-radius: 3px;
}

.cs-vessel-icon {
    width: 100%;
    height: 100%;
    background-size: 95%;
    background-repeat: no-repeat;
    background-position: center;

    opacity: 1;

    -webkit-transition: opacity 400ms;
    -moz-transition: opacity 400ms;
    -o-transition: opacity 400ms;
    transition: opacity 400ms;
}

.cs-vessel-icon:hover {
    opacity: 0.8;
}

.cs-vessel-fv .cs-vessel-icon { background-image: url(../images/fv.svg); background-position: center 90%; }
.cs-vessel-fv { width: 36%; }

.cs-vessel-cg .cs-vessel-icon { background-image: url(../images/cg.svg); }
.cs-vessel-cg { width: 90%; }

.cs-vessel-nv .cs-vessel-icon { background-image: url(../images/nv.svg); }
.cs-vessel-nv { width: 90%; }

.cs-vessel-msv .cs-vessel-icon { background-image: url(../images/msv.svg); background-position: center 80%; }
.cs-vessel-msv { width: 40%; }

.cs-vessel-uv .cs-vessel-icon { background-image: url(../images/uv.svg); background-position: center 80%; }
.cs-vessel-uv { width: 60%; }

.cs-card .cs-vessel-count {
    color: #fff;
    background: #F1BE2C;
    position: absolute;
    top: 10px;
    left: 10px;
    font-weight: bold;
    height: 22px;
    padding: 0 8px;
    text-align: center;
    line-height: 1.7em;
    border-radius: 11px;
    letter-spacing: -0.05em;
}

/* Popover */

.cs-popover-trigger {
    outline: none !important;
}

.cs-popover {
    width: 300px;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 0;
    background: #fff;
}

.popover-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 2px solid #111;
    background: #fff;
    padding: 0;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.cs-popover table {
    width: 100%;
}

.cs-popover th,
.cs-popover td {
    padding: 0 5px;
    font-size: 13px;
    line-height: 1.4em;
}

.cs-popover tr:nth-child(odd) {
    background: #f0f0f0;
}

.cs-popover tr:nth-child(1) {
    background: #fff;
}

.cs-popover-empty {
    width: inherit;
}

.cs-popover-empty .popover-title {
    border: none;
    margin: 0;
    padding: 0;
}

/* Footer */

.cs-card-sources,
.cs-card-methodology {
    float: right;
    margin-left: 10px;
}

.cs-card-footer a.cs-popover-trigger {
    font-weight: bold;
    font-size: 11px;
    color: #999;
    text-decoration: underline;
    text-transform: uppercase;
}

.cs-card-footer a.cs-popover-trigger:hover {
    text-decoration: none;
}

.cs-sources-popover,
.cs-methodology-popover {
    min-width: 300px;
}

.cs-sources-popover ul {
    padding: 0;
    margin-left: 20px;
}

.cs-sources-popover li {
    font-size: 12px;
    line-height: 1.2em;
    margin-bottom: 5px;
}

.cs-methodology-popover p {
    font-size: 13px;
    line-height: 1.4em;
    margin-bottom: 10px;
}

.cs-sources-popover a,
.cs-methodology-popover a {
    color: #772132;
}

.cs-sources-popover a {
    word-break: break-all;
}


/* ==========================================================================
   Google map
   ========================================================================== */

.cs-map-container {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 900px;
}

@media only screen and (max-width: 700px) {
    .cs-map-container {
        display: none;
    }
}

#map-canvas {
    width: 100%;
    height: 100%;
    background-color: #ccc;
    background-repeat: no-repeat;
    background-image: url(../images/loading.svg); background-position: center 20%;
    background-size: 100px;
}

.cs-logo-watermark {
    position: absolute;
    /*bottom: 20px;*/
    bottom: 35px;
    right: 5px;
    height: 60px;
    width: 40px;
    background-repeat: no-repeat;
    background-image: url(../images/cp-logo-black.svg); background-position: center;
    opacity: 0.2;
}

@media only screen and (max-width: 1140px) {
    .cs-logo-watermark {
        bottom: 55px;
    }
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

@media only screen and (min-width: 700px) {
    .cs-align-left {
        float: left;
    }

    .cs-align-right {
        float: right;
    }
}

@media only screen and (max-width: 700px) {
    .cs-card-response.cs-align-left {
        float: left;
    }
    .cs-card-response.cs-align-right {
        float: right;
    }
}

@media only screen and (max-width: 450px) {
    .cs-card-response.cs-align-left,
    .cs-card-response.cs-align-right {
        width: 100%;
        float: none;
    }
}

