@import "bootstrap-sprockets";
@import "bootstrap";
@import "color";
// Customized by YassLab team

/* Newsletter */
#mc_embed_signup {
  flex: auto;
}
input.email {
  margin-bottom: 15px;
}
input.button {
  background: #2275CA;
  border-radius: 5px;
  border: solid 2px #2275CA;
  color: #fff;
  display: inline-block;
  // font-weight: bold;
  text-align: center;
  transition: all .1s;
  &:hover {
    text-decoration: none;
    background: #f7f7f7;
    color: #2275CA;
  }
}

/* Kata */
section.kata p {
  line-height: 1.7em;
}
.kata-header {
  background-color: #777777;
  background: no-repeat center center;
  background-attachment: scroll;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;
  margin-bottom: 50px;
}
.kata-header .kata-heading {
  padding: 100px 0 50px;
  color: white;
}
@media only screen and (min-width: 768px) {
  .kata-header .kata-heading {
    padding: 150px 0;
  }
}
.kata-header .kata-heading h1 {
  font-size: 35px;
}
.kata-header .kata-heading .kata-subheading {
  line-height: 1.1;
  display: block;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 24px;
  margin: 10px 0 30px;
  font-weight: 600;
}
@media only screen and (min-width: 768px) {
  .kata-header .kata-heading h1 {
    font-size: 55px;
  }
  .kata-header .kata-heading .kata-subheading {
    font-size: 30px;
  }
}

/* Twitter Embedded Timeline */
.twitter-timeline-wrapper {
  display: flex;
  justify-content: center;
}

/* Twemoji */
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 .05em 0 .1em;
  vertical-align: -0.1em;
  border-radius: 0px;
}

/* Lazyload with fade animation */
.lazyload,
.lazyloading {
	opacity: 6;
}
.lazyloaded {
	opacity: 1;
	transition: opacity 300ms;
}

/* DojoCast Cover Photo */
.dojocast-cover {
  border-radius: 0px;
}

#searchbox {
  padding-left: 5px;
  font-size: 90%;
}

.algolia-autocomplete {
  /* Main dropdown wrapper */
  //  max-width: 100px;
}

.algolia-autocomplete .ds-dropdown-menu {
  //  width: 200px;
}

.algolia-autocomplete .algolia-docsearch-suggestion--category-header {
  /* Main category (eg. Getting Started) */
  //  color: darkgray;
  //  border: 1px solid gray;
}

.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
  /* Category (eg. Downloads) */
  //  color: gray;
}

.algolia-autocomplete .algolia-docsearch-suggestion--title {
  /* Title (eg. Bootstrap CDN) */
  //  font-weight: bold;
  //  color: black;
}

.algolia-autocomplete .algolia-docsearch-suggestion--text {
  /* Description description (eg. Bootstrap currently works...) */
  //  font-size: 0.8rem;
  //  color: gray;
}

.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
  /* Highlighted text */
  //  color: blue;
}

/* 改行位置の調整 */
.ignore-pc {
  display: none;
}
.ignore-sp {
  display: inline;
}
@media screen and (max-width: 640px) {
  .ignore-pc {
    display: inline;
  }
  .ignore-sp {
    display: none;
  }
}

/* Googleスライド・YouTube動画の調整 */
.home-point-slides {
  position: relative;
  overflow: hidden;
  margin: 15px 0 20px 0;
  padding-bottom: 50%;
  padding-top: 65px;
}
.home-point-slides iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.home-point-thumbnail {
  img {
    opacity: 0.97;
  }
  img:hover {
    opacity: 1.0;
  }

}
.home-point-video {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  padding-top: 25px;
}
.home-point-video iframe {
  position: absolute;
  top: 0;
  left: 3.5%;
  width: 95% !important;
  height: 100% !important;
}

/* 各種 heading の調整 */
.headline {
  color: white;
  background: #2275CA;
  padding: 10px 10px 10px 20px;
  margin: 30px auto;
}

.headline-anchor {
  padding-bottom: 60px;
}
.headline-kata {
  margin-top: 100px;
}

.kata {
  position: relative;
}
a.button-to-details {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-40%, -50%);
  -ms-transform: translate(-40%, -50%);
  background-color: #2275ca;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 7px 11px;
  @media screen and (max-width: 480px) {
    font-size: 9px;
    padding: 0px 6px;
  }
  border: none;
  cursor: pointer;
  border-radius: 5px;
  opacity: 0.9;
  &:hover {
    text-decoration: underline;
    opacity: 0.95;
  }
}

div #README {
  margin-top: -75px;
}

img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

a>img {
  width: 100%;
  &:hover {
    cursor: pointer;
  }
}

h2 {
  font-weight: 500;
}
h1,h2,h3,h4,h5,h6 { scroll-margin-top: 100px; }

.fontsize-bigger {
  font-size: 20px;
}

.social_buttons {
  margin-left: -32px;
  padding: 0;
}
.social_buttons ul {
  padding-left: 300px;
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  height: 200px;
}
.social_buttons li {
  float: left;
  margin: 4px;
  list-style-type: none;
  line-height: 0;
}
.social_buttons iframe {
  margin: 0 !important;
}

// Partner section
.partners_logo {
  ul {
    padding-left: 0px;
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    align-items: center;
    max-width: 680px;
  }
  li {
    list-style-type: none;
    display: inline-block;
    width: calc(50% - 6%);
    margin: 2% 3%;
    img {
      width: 100%;
      border-radius: 0px;
      &:hover {
        cursor: pointer;
      }
    }
  }
}

// Customized by @coderdojo-tokyo
.cd-fw {
  text-align: center;
  background: #2275CA;
}

.dojo>header>a {
  text-decoration: none
}

@font-face {
  font-family: coderdojo;
  src: url(/font/coderdojo.eot);
  src: url(/font/coderdojo.eot?#iefix) format('eot'), url(/font/coderdojo.woff) format('woff'), url(/font/coderdojo.ttf) format('truetype'), url(/font/coderdojo.svg#coderdojo) format('svg');
  font-weight: 400;
  font-style: normal
}

.cd:before {
  display: inline-block;
  font-family: coderdojo;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale
}

.cd-lg {
  font-size: 1.3333333333333333em;
  line-height: .75em;
  vertical-align: -15%
}

.dojo {
  overflow: visible;
  vertical-align: top
}

.cd-2x {
  font-size: 2em
}

.cd-3x {
  font-size: 3em
}

.cd-4x {
  font-size: 4em
}

.cd-5x {
  font-size: 5em
}

.cd-fw {
  width: 1.2857142857142858em
}

.cd-spin {
  -webkit-animation: spin 2s infinite linear;
  animation: spin 2s infinite linear
}

.cd-clock:before {
  content: "\EA01"
}

.cd-connect:before {
  content: "\EA02"
}

.cd-glyph07:before {
  content: "\EA03"
}

.cd-glyph08:before {
  content: "\EA04"
}

.cd-logo-jp:before {
  content: "\EA05"
}

.cd-logo:before {
  content: "\EA06"
}

.cd-pin:before {
  content: "\EA07"
}

.cd-spinner:before {
  content: "\EA08"
}

body {
  margin: 0;
  font-size: 16px;
  font-family: 'ヒラギノ角ゴ Pro', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', sans-serif
}

a {
  color: #2e9ad9;
}

.under-construction {
  color: #cd8585;
  font-size: 75%;
  margin: 0;
  padding: .2em;
  background: #FFF
}


.footer-bottom {
  //margin: -.25em 0 0;
  padding: 2.0em 1.0em;
  color: #fff;
  background: #2275CA
}

.footer-bottom>h2 {
  font-size: 14.0px;
  margin-top: 0;
  margin-bottom: 2em
}

.footer-link {
  color: #fff;
  text-decoration: underline
}

.footer-link:link {
  color: #fff;
  text-decoration: underline
}

.footer-link:visited {
  color: #fff;
  text-decoration: underline
}

.title,
body>footer a:hover {
  color: #fff;
  text-decoration: none
}

.title {
  padding-top: 15px;
  background: #2275CA;
}

.title>i.cd:before {
  font-size: 500%;
  display: block
}

.title>h1 {
  font-size: 1.5em;
  margin: .5em 0 0.3em
}

.title>p {
  padding: 0 1em;
  margin: 0 auto;
  max-width: 680px; //font-size: 130%
}

@media only screen and (min-width: 560px) {
  body>footer>ul li {
    border-radius: 3px;
    line-height: 2.8em
  }
  .title>i.cd:before {
    font-size: 800%
  }
  .title>h1 {
    font-size: 1.7em;
    margin-bottom: .5em
  }
  .title>p {
    padding: 0 3em;
    font-size: 110%
  }
}

@media only screen and (min-width: 720px) {
  .title>i.cd:before {
    font-size: 1000%
  }
  .title>h1 {
    font-size: 2.2em;
    margin-bottom: .2em
  }
  .title>p {
    padding: 0 5em;
    font-size: 90%
  }
}

@media only screen and (min-width: 560px) {
  .introduction {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.5em;
    background: #fff
  }
  .detail-introduction {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.5em;
  }
}

.introduction {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5em;
  line-height: 1.7em;
  font-size: 17.2px;
  background: #fff
}

.introduction>p {
  margin-bottom: .8em;
  line-height: 1.7em;
  text-align: center
}

.detail-introduction {
  max-width: 800px;
  margin: auto;
  padding: 0.5em 2em;
  padding-bottom: 1.5em;
  line-height: 1.7em;
  font-size: 18px;
}

.list>ul {
  display: inline-block;
  text-align: left;
  padding-left: 2em;
  color: #555;
}

.detail-introduction>h2 {
  font-size: 150%;
  font-weight: 900;
  color: #999;
  margin-bottom: .4em
}

.grayscale-bg {
  background: #f7f7f7;
}

/* Top Cover Photo */
.cover {
  overflow: hidden;
  min-height: 125px;
  position: relative;
  background-color: #000;
  z-index: 0;
  overflow: hidden;
  max-height: 50vh;
  &::before {
    content: '';
    -ms-filter: blur(6px);
    filter: blur(10px);
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    z-index: -1;
    background: url('/coderdojo-japan_cover.min.webp') no-repeat center;
    background-size: cover;
    opacity: 0.6;
  }
}

.cover img {
  height: 100%;
  width: 100%;
  max-height: 50vh;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  border-radius: 0px;
  object-fit: contain;
}

// Each Dojo: /#dojos
.dojos>ul {
  text-align: center;
  padding: 0 0 1.5em
}

.dojos>h2 {
  font-size: 150%;
  font-weight: 900;
  color: #999;
  padding-top: 1em;
  margin: .4em
}
.dojo-flex{
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
}

.dojo {
  width: 45%;
  margin: 5px;
  padding: 15px 0;
  background: #fff;
  position: relative;
  text-align: center;
  height: auto;

  //display: block;
  display: flex;
  flex-direction: column;
  p {
    font-size: 70%;
    padding: 10px 10px 5px;
    text-align: center;
    margin: 5px 0;
    margin-top: auto;
  }
}

.dojo-picture {
  display: block;
  height: 96px;
  width: 96px;
  // border-radius: 48px;
  margin: 0 auto;
}

.dojo-name {
  display: block;
  margin: .5em 0;
  font-weight: bold;
  .tooltip-arrow {
    border-bottom-color: #777 !important;
  }
  .tooltip-inner {
    background:  #777;
    color:       #ffffff;
  }
}
.dojo-counter {
  font-weight: bold;
  background:  #B8B8B8;
  color:       #ffffff;
  padding:     5px 4px;
  font-size:   70%;
  border-radius: .9em;
}

.dojo-private {
  font-size: 80%;
  color: #fff;
  border-radius: .3em;
  padding: .3em;
  margin: .2em;
  background: #66CCFF;
}

.dojo-private:hover {
  text-decoration: none;
}

/*Dojo一覧スマートフォン用*/
.dojo-sp {
  width: 100%;
  padding: 7px;
  margin: 3px;
  border-radius: 5px;
  header {
    text-align: left;
  }
  .tags {
    text-align: left;
    margin: 0;
  }
}
.dojo-picture-sp {
  width: 50px;
  height: 50px;
  margin: 0 5px 5px 0;
}
.dojo .dojo-sp-info {
  text-align: left;
  display: inline-block;
  padding: 0;
  vertical-align: middle;
}
.dojo-name-sp {
  margin: .2em 0;
  font-size: 1.5rem;
}

// twitter timeline
.twitter-timeline-wrap {
  display: flex;
  justify-content: center;
}

// Each Event: /events
.event-region {
  padding: 50px 0 20px 0;
}

.event-ul {
  padding: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.event {
  border: 1px solid #e8e8e8;
  display: inline-table;
  min-height: 200px;
  margin: 5px;
  background: #fff;
  position: relative;
  text-align: center;
  @media only screen and (max-width: 560px) {
    display: block;
  }
}

.event>header {
  background: #2275CA;
  color: #fff;
  text-align: center;
  padding: 10px;
}

.event>header p.event-date,
.event>header p.event-at {
  margin: 0;
}

.event>header p.event-date {
  font-size: 120%;
  font-weight: bold;
}

.event>header div.event-ribbon {
  width:  80px;
  height: 80px;
  overflow: hidden;
  position: absolute;

  top:   0px;
  right: 0px;

  &::before, &::after {
    position: absolute;
    z-index: -1;
    content: '';
    display: block;
    border: 5px solid #2980b9;

    border-top-color:   transparent;
    border-right-color: transparent;
  }
  &::before {
    top:  0;
    left: 0;
  }
  &::after {
    bottom: 0;
    right:  0;
  }

  span {
    position: absolute;
    display: block;
    width: 220px;
    padding: 5px 0;
    background-color: #ffd700;
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
    color: #fff;
    font: 850 8px/1 'Lato', sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,.2);
    text-transform: uppercase;
    text-align: center;

    left: -48px;
    top:   10px;
    transform: rotate(45deg);
  }
}

.event-tag-pokemon {
  background-color: $lightblue;
  font-weight: bold;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
}
.event-tag-pokemon-cover {
  text-align: left;
  padding: 0 10px;
}


.event>p {
  margin: 10px;
  text-align: left;
}

.event>p>a {
  text-decoration: none
}

@media only screen and (min-width: 560px) {
  .dojo {
    width: calc(220px - 10px);
    margin: 10px;
  }
  .event {
    width: 220px;
    margin: 10px;
  }
}

.spinner {
  height: 3em;
  color: #ccc
}

// Dojo tags style
.tags {
  margin: 0 5px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  @media only screen and (max-width: 720px) {
    justify-content: flex-start;
  }

  li {
    display: inline-block;
    font-size: 80%;
    color: #fff;
    border-radius: .3em;
    border: 1px solid #e8e8e8;
    padding: .2em .8em;
    margin: .1em;
    background: #99CCFF
  }

  // Tags after 5th tag are shown as Bootstrap tooltip.
  .tooltip.tags-more-tooltip {
    opacity: 1 !important;
    .tooltip-arrow { border-bottom-color: #99CCFF !important; }
    .tooltip-inner {    background-color: #99CCFF !important; color: #fff !important; }
  }
}

.title>h1 {
  font-family: 'Fjalla One', sans-serif
}

.loaded {
  width: 90%;
  display: inline-block
}

#accordion a:hover {
  text-decoration: none;
}
@media only screen and (max-width:720px) {
  .highcharts-root {
    transform: scale(0.8);
  }
  #transition-table {
    padding: 20px 0;
    font-size: 12px;
    width: 520px;
    height: auto;
    margin: auto;
  }
}

@media only screen and (max-width:560px) {
  .highcharts-container, .highcharts-root {
    width:  100% !important;
    height: 100% !important;
  }
  .highcharts-container, .highcharts-title {
    font-size: 26px !important;
  }
  #transition-table {
    font-size: 10px;
    width:     100%;
  }
}

/* Stats */
.stats {
  line-height:   1.8em;
  margin-bottom: 50px;

  ul {
    text-align: center;
    list-style: none;
    padding: 0 0 1.5em;
  }
  h2 {
    font-size: 150%;
    font-weight: 900;
    color: #999;
    padding-top: 1em;
    margin: .4em
  }
  h3, h4#prefectures { margin-top: 80px; }

  tr {
    padding: 3px 5px;
    .compact { padding: 0px 5px; }
  }
  th,td {
    text-align: center;
    padding: 5px 10px;
  }
  table.compact {
    th, td { padding: 0px 5px; }
    @media only screen and (max-width: 560px) {
      th, td { padding: 0px 2px; }
    }
  }
}

#japan-map-container canvas {
  margin: 20px auto 30px;
}
#japan-map-text {
  display: block;
}

@media only screen and (max-width: 651px) {
  #japan-map-container canvas {
    margin: 50px auto;
    width: 100%;
  }
  #japan-map-text {
    display: none;
  }
}

.btn-cover {
  display: flex;
  max-width: 600px;
  margin: auto;
  justify-content: center;
  @media only screen and (max-width: 600px) {
    flex-wrap: wrap;
    margin: 0 24px;
  }
}
.btn-blue {
  background: #2275CA;
  border-radius: 5px;
  border: solid 2px #2275CA;
  color: #fff;
  display: inline-block;
  font-weight: bold;
  margin: 5px;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  transition: all .1s;
  width: 100%;
  &:hover {
    text-decoration: none;
    background: #f7f7f7;
    color: #2275CA;
  }
  &:visited, &:focus, &:active{
    // TODO: クリック後のテキスト色のみを白色にしたい
    //background: #2275CA;
    text-decoration: none;
    font-color: #fff;
  }
}

section {
  scroll-margin-top: 70px;
  scroll-snap-align: center;
}

.form {
  max-width: 500px;
  margin: 20px auto;
  &__field {
    display: block;
    width: 100%;
  }
  &__submit {
    appearance: none;
    background: $main-blue;
    border: none;
    color: #fff;
    font-weight: bold;
    font-family: sans-serif;
    display: block;
    margin: 40px auto 20px;
    max-width: 320px;
    width: 100%;
  }
  .field {
    margin-top:    12px;
    margin-bottom: 24px;
  }
  &__h2 {
    margin-top: 30px;
    font-size:  16px;
    font-weight: bold;
  }
  &__terms ul {
    font-size: 16px;
    line-height: 1.6em;
    li {
      margin-bottom: 10px;
    }
  }
}

.alert-alert {
  background: #ffefdd;
  margin: 10px 20px;
}

.event-notice {
  background: #e3f0ff;
  padding: 8px;
  border-radius: 6px;
}
.form-notes {
  margin-top: 100px;
  font-size: 11.8px;
  line-height: 1.7em;
  color: #909090;
}

/* Stats and Dojos table styling */
.stats-table {
  table-layout: auto;
  
  th {
    padding: 10px;
    text-align: center;
  }
  
  td {
    padding: 1px 10px 1px 10px;
    text-align: right;
    font-size: smaller;
    
    &.url-cell {
      white-space:   normal;         /* 改行を許可 */
      word-wrap:     break-word;     /* 古めのブラウザ向け */
      overflow-wrap: break-word;     /* 新しめのブラウザ向け */
      word-break:    break-all;      /* 英数字が続く場合の保険 (必要に応じて) */
      text-align:    left;
    }
    
    &.inactive-item {
      background-color: gainsboro;
    }
  }
  
  // Activity page specific style for expired events
  span.expired a {
    color: red;
    background-color: #ffe5e5; /* 薄い赤背景 */
  }
}
