/**
 * China Military Interactive
 *
 * Written by Seven Mile Media
 * http://sevenmilemedia.com/
 */

/* ================================================== */
/* Main styles
/* ================================================== */

/*html, body {
    height: 100%;
}

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    color: #333;
    background-color: #fff;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}*/

.int-interactive {
  text-align: left;
}

.int-interactive h1,
.int-interactive h2,
.int-interactive h3,
.int-interactive h4,
.int-interactive h5,
.int-interactive h6 {
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  letter-spacing: 0.01em !important;
  color: #263d45 !important;
  text-align: left !important;
}

.int-interactive p {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-align: left;
}

@media screen and (min-width: 450px) {
  .int-interactive p {
    font-size: 16px;
  }
}

.int-interactive ul {
  padding: 0;
  margin: 0;
}

.int-interactive a {
  color: #ed392a;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.int-interactive a:hover {
  color: #ed392a;
  text-decoration: none;
  box-shadow: inset 0px -2px 0px 0 #d4d0cb;
}

.int-interactive {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 20px;
}

.int-content {
  position: relative;
  padding-top: 25px;
  text-align: left;
}

/* ================================================== */
/* Header
/* ================================================== */

.int-header {
  margin-bottom: 25px;
}

.int-header h1 {
  font-size: 24px !important;
  line-height: 1 !important;
  margin-bottom: 15px !important;
}

.int-header p {
  margin: 0 !important;
}

@media screen and (min-width: 768px) {
  .int-header {
    margin-bottom: 20px;
    display: flex;
  }

  .int-header h1 {
    font-size: 32px !important;
    margin: 0 !important;
    margin-right: 10px !important;
    flex: 1 !important;
  }

  .int-header p {
    margin: 0 !important;
    flex: 2 !important;
  }
}

/* ================================================== */
/* Chart
/* ================================================== */

.int-chart-container {
  margin: 0 -10px;
}

.int-chart {
  position: relative;
  display: inline-block;
  margin: 10px;
  margin-bottom: 50px;
  cursor: pointer;
  /* disable grey highlight on tap */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.int-chart-text {
  position: absolute;
  margin-right: 10px;
}

.int-chart p {
  color: #273d44 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  margin: 0 0 5px !important;
}

.int-label-country {
  font-weight: bold;
}

.int-label-figure {
  white-space: nowrap;
}

/* ================================================== */
/* Legend
/* ================================================== */

.int-chart-legend {
  display: flex;
  position: absolute;
  right: 0;
  top: 10px;
}

.int-legend-marker {
  margin-right: 5px;
  height: 20px;
  width: 20px;
  background-color: #99b0bd;
  border-radius: 2px;
}

.int-legend-label {
  font-size: 14px;
  margin: 0;
}

/* ================================================== */
/* Chart input
/* ================================================== */

.int-chart-input {
  border-top: 2px solid #465a63;
  border-bottom: 1px solid #a9b8c0;
  padding: 10px 0 20px;
}

.int-chart-input h3 {
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: normal !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

@media screen and (min-width: 768px) {
  .int-input-row {
    margin: 0 -10px;
    display: flex;
    justify-content: space-between;
  }
}

@media screen and (min-width: 768px) {
  .int-input-col-1,
  .int-input-col-2 {
    margin: 0 10px;
    width: 100%;
  }

  .int-input-col-1 {
    width: 400px;
  }

  .int-input-col-2 {
    width: inherit;
  }
}

/* ================================================== */
/* Dropdown menu
/* ================================================== */

.int-dropdown-container {
  margin-bottom: 15px;
}

.int-dropdown-container:last-of-type {
  margin-bottom: 20px;
}

@media screen and (min-width: 768px) {
  .int-dropdown-container {
    width: 400px;
  }

  .int-dropdown-container:last-of-type {
    width: 250px;
    margin: 0;
  }
}

.int-dropdown {
  position: relative;
  color: #273d44;
}

.selectric {
  border-color: #465a63;
  border-width: 2px;
  background: #fff;
}

.selectric-items {
  border-color: #465a63;
  background: #fff;
}

.selectric .label,
.selectric-items ul,
.selectric-items li {
  font-size: 16px;
  color: #465a63;
}

.selectric-items li::before {
  content: "";
  display: none;
}

.selectric-items li:hover {
  background: #465a63;
  color: #fff;
}

.selectric-items li.selected {
  background: #273d44;
  color: #fff;
}

.selectric .label {
  font-size: 14px;
  padding: 10px;
  letter-spacing: 0.02em;
}

#int-metric-dropdown .selectric .label {
  position: relative;
  font-weight: bold;
  font-size: 16px;
  padding: 18px;
  padding-left: 35px;
}

@media screen and (min-width: 768px) {
  #int-metric-dropdown .selectric .label {
    font-size: 20px;
    padding: 18px;
    padding-left: 35px;
    letter-spacing: 0.01em;
  }
}

.selectric-items li {
  position: relative;
  padding-left: 30px;
}

#int-metric-dropdown .int-label-flag,
#int-metric-dropdown .selectric-items li:after {
  content: "";
  position: absolute;
  width: 15px;
  top: 2px;
  left: 2px;
  bottom: 2px;
  border-radius: 2px;
}

#int-metric-dropdown .int-label-flag {
  z-index: 10;
  width: 20px;
  background-color: #99b0bd;
  top: 6px;
  left: 6px;
  bottom: 6px;
}

#int-metric-dropdown .selectric-items li:nth-of-type(1):after {
  background-color: #98b0be;
}
#int-metric-dropdown .selectric-items li:nth-of-type(2):after {
  background-color: #4891ba;
}
#int-metric-dropdown .selectric-items li:nth-of-type(3):after {
  background-color: #96739d;
}
#int-metric-dropdown .selectric-items li:nth-of-type(4):after {
  background-color: #3d987d;
}

.selectric-hover .selectric {
  border-color: #273d44;
}

.selectric-open .selectric {
  background: #fff;
}

.int-dropdown {
  width: 100%;
}

/* Num stepper */

.numstepper {
  margin: 0;
}

.numstepper--default .numstepper__input {
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: #465a63;
  height: 45px;
  width: 90px;
  box-shadow: none;
  border: none;
  border-top: 2px solid #a9b8c0;
  border-bottom: 2px solid #a9b8c0;
  margin: 0;
}

.numstepper--default .numstepper__btn {
  border: 2px solid #465a63;
  border-radius: 0;
}

.numstepper__btn {
  content: "" !important;
  height: 45px;
  width: 45px;
  outline: 0;
}

.flexbox .numstepper__btn {
  flex: none;
}

.numstepper--default .numstepper__input {
  border-radius: 0 !important;
}

@media screen and (min-width: 768px) {
  .numstepper--default .numstepper__input {
    height: 58px;
  }

  .numstepper__btn {
    height: 58px;
    width: 58px;
  }
}

.numstepper--default .numstepper__btn::before {
  right: 15px;
  left: 15px;
  height: 2px;
  background-color: #455a64;
  opacity: 1;
  transition: opacity 200ms;
}

.numstepper--default .numstepper__btn::after {
  top: 15px;
  bottom: 15px;
  width: 2px;
  background-color: #455a64;
  opacity: 1;
  transition: opacity 200ms;
}

.numstepper__btn:hover::before,
.numstepper__btn:hover::after {
  opacity: 0.6;
}

/* Dropdown caret */
.selectric .button {
  color: #455a64;
  padding: 23px;
}
.selectric .button:after {
  border: 8px solid transparent;
  border-top-color: #455a64;
}
#int-metric-dropdown .selectric .button {
  padding: 31px;
}

/* ================================================== */
/* Tooltip
/* ================================================== */

/* Tooltip container */
.int-tooltip {
  display: none;
  pointer-events: none;
  visibility: hidden;
  height: 195px;
  width: 320px;
  background-color: #fff;
  border: 2px solid #333;
  text-align: center;
  padding: 15px;

  /* Tooltip position */
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -160px;
  margin-bottom: 20px;
  z-index: 999;

  /* Tooltip drop shadow */
  box-shadow: 0 3px 10px 1px rgba(0, 0, 0, 0.3);

  /* Tooltip animation */
  opacity: 0;
  transition: opacity 0.3s;
}

@media screen and (min-width: 768px) {
  .int-tooltip {
    display: block;
  }
}

/* Tooltip arrow */
.int-arrow {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -12px;
  border-width: 10px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Show the tooltip when you mouse over a chart */
.int-chart:hover .int-tooltip,
.int-chart:active .int-tooltip {
  visibility: visible;
  opacity: 1;
}

/* ================================================== */
/* Bar chart
/* ================================================== */

.int-legend {
  margin: 0 -10px;
  margin-bottom: 15px;
  display: flex;
}

.int-legend p {
  font-size: 14px;
  margin: 0;
}

.int-legend-item {
  margin: 0 10px;
  display: flex;
}

.int-legend-item span {
  display: inline-block;
  height: 15px;
  width: 15px;
  border-radius: 3px;
  margin-right: 5px;
}

.int-legend-item:nth-of-type(1) span {
  background-color: #e83d3a;
}
.int-legend-item:nth-of-type(2) span {
  background-color: #465a62;
}

.int-axis-label {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
}

.int-axis-label p {
  font-size: 12px;
  margin: 0;
}

.int-axis path {
  stroke: #aaa;
}

/*==============================
=            Source            =
==============================*/

.int-source {
  margin: 2rem 0 2rem auto;
  text-align: right;
}

.int-source img {
  max-width: 300px;
  height: auto;
}

.int-source p {
  font-size: 0.8rem;
  line-height: 1.1;
  margin: 0;
  text-align: right;
  color: gray;
}
