/* Junethack custom styles (Bootstrap 5 override) */

ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin-bottom: 0;
}

/* misc */
.container {
  width: 96%;
  margin: 0 auto;
  max-width: inherit;
  padding-left: 0;
  padding-right: 0;
}

.card-body {
  margin: 0 30px 0 30px;
  padding-left: 0;
  padding-bottom: 0;
  line-height: 1.5em;
}

body.bg-junethack {
  background-color: #eee;
  background-image: url('background.jpg');
  background-repeat: repeat;
  background-position: top center;
  --bs-body-font-family: 'Helvetica', 'Arial', sans-serif;
}

h1 {
  font-size: 200%;
  line-height: 1.5em;
  margin-bottom: 10px;
}
h2 {
  font-size: 150%;
  line-height: 1.5em;
  margin-bottom: 10px;
}
h3 {
  font-size: 100%;
  margin: 0;
  line-height: 1.5em;
}
h1, h2, h3 {
  font-weight: bold;
}

/* Links */
a {
  color: #34f;
  text-decoration: none;
  background-color: inherit;
}
a:hover {
  color: #800;
  text-decoration: underline;
}
a.imagelink:hover {
  text-decoration: none;
}
/* let links cover the whole widht of their cell */
table a {
  display: inline-block;
  width: 100%;
}
table td.dllink a {
  display: inline;
}

/* Navbar branding */
.navbar .logo {
  height: 40px;
}

.navbar {
  background-color: #bbb;

  .nav-item.dropdown {
    border: 1px transparent solid;
    .nav-link {
      text-decoration: none;
    }
    .nav-link:hover {
      background-color: #ccc;
      border-radius: 4px;
      box-shadow: 1px 1px 10px #888;
    }
  }
  .nav-item.dropdown:hover {
    border: 1px ob solid;
  }

  .dropdown-menu {
    background-color: #ccc;
    box-shadow: 5px 5px 20px #888;

    .dropdown-item {
      text-decoration: none;
    }
    .dropdown-item:hover {
      background-color: #9f9f9f;
      color: #000;
    }
  }
}

/* Banner / Title */
.logotitles h1 {
  font-size: 2.6em;
}
.logotitles h2 {
  font-size: 2em;
}

/* Signup button */
.signup_text {
  text-align: center;
  width: 170px;
  margin: 0 auto;
}
.signup_text p {
  height: 60px;
  line-height: 60px;
}
.signup_text a {
  display: block;
  text-decoration: none;
  color: #fff;
  background-color: #a00;
  border-radius: 50px;
  box-shadow: 0px 5px 20px #555;
}
.signup_text a:hover {
  color: #fff;
  background-color: #c22;
}

.card-body.border-top,
.border-top {
  margin-top: 0;
  padding-top: 0;
}
.border-top:before {
  content: url(pale-logo.png);
  width: 114px;
  display: block;
  margin: 0 auto;
}

.table-junethack { /* replaces .scorelisting table and #accountlist */
    font-size: 85%;
    border-collapse: collapse;
    width: 100%; /* there's an inline style here.. */
    text-align: left;
    vertical-align: middle;
    margin: 10px 0;

    box-shadow: unset;
    --bs-table-color-type: unset;
    --bs-table-bg-type: unset;
}

.table-junethack td a.hidden_link {
  color: inherit;
}

table.misc,
table.compact,
.table-junethack.misc {
    width: auto;
}
.table-junethack th,
.table-junethack td {
  padding-top: 0;
  padding-bottom: 0;
}
.table-junethack th {
  text-align: left;
  vertical-align: middle;
  padding-right: 20px;
  padding-left: 8px;
  background-color: inherit
}

.table-junethack th {
  border-bottom: 1px solid #888;
}
.table-junethack td
{
  border-top: 1px solid #888;
  border-bottom: 1px solid #888;
  padding-right: 10px;
  padding-left: 10px;
  vertical-align: middle;
  box-shadow: unset;
}
.table-junethack tr:nth-child(odd) td
{
    background-color: #bbb;
}
.table-junethack tr:nth-child(even) td
{
    background-color: #ccc;
}

.table-junethack tr:hover td
{
    background-color: #9f9f9f;
    color: #000;
}

.table-junethack td.chart
{
    background-color: inherit;
    border: 0;
    padding-left: 1em;
}
.table-junethack td.table_number
{
    text-align: right;
    padding-right: 0.5em;
    padding-left: 0.5em;
}
.table-junethack td.table_date
{
    text-align: center;
    padding-right: 0;
    padding-left: 0;
}

.table-junethack td.variant,
.table-junethack td.table_date,
.table-junethack td.table_character {
    white-space: nowrap;
}
/* next two declarations are probably deprecated */
.table-junethack input[type="text"]
{
    width: 6em;
    margin: 3px 3px 3px 3px;
    padding: 0;
}
.table-junethack select
{
    font-size: 100%;
}
.table-junethack td.dllink
{
    text-align: center;
    width: 1em;
    padding-right: 0;
    padding-left: 0;
}


/* Card styling for content wrappers */
.card.junethack-card {
  background-color: rgba(221,221,221,0.9);
  box-shadow: 0px 0px 8px #222;
  border: none;
  border-radius: 0 0 6px 6px;

  margin-top: 1.5em;
  padding-top: 1px;
  padding-bottom: 30px;
}

/* Title text */
.title_text {
  margin: 1.5em;
  font-weight: bold;
  font-size: 1.25em;
  text-align: center;
}

/* Duration spans */
.duration {
  white-space: nowrap;
}

/* Table overrides */
.table-junethack {
  font-size: 0.85em;
  margin-bottom: 0;
}
.table-junethack td a.hidden_link {
  color: inherit;
}
.table-junethack td.table_number {
  text-align: right;
  padding-right: 0.5em;
  padding-left: 0.5em;
}
.table-junethack td.table_date {
  text-align: center;
}
.table-junethack td.variant,
.table-junethack td.table_date,
.table-junethack td.table_character {
  white-space: nowrap;
}
.table-junethack td.dllink {
  text-align: center;
  width: 1em;
  padding-right: 0;
  padding-left: 0;
}

/* Rotated table headers */
table tr.rotated {
  height: 8em;
  white-space: nowrap;
}
tr.rotated th div {
  transform: translate(1.2rem, 2rem) rotate(300deg);
  width: 2em;
}

/* Competition table */
th.competition_value {
  width: 10em;
}
th.competition_placing {
  padding-left: 3px;
  padding-right: 3px;
  width: 3em;
}


/* variant inter page navigational link list */
#variant_navigation_list {
  display: inline-block;
  margin-top: 0;
  padding-top: 0;
  max-width: fit-content;
}
#variant_navigation_list li:first-child {
  padding-top: 0.2em;
  border-top-left-radius: 0.4em;
  border-top-right-radius: 0.4em;
}
#variant_navigation_list li:last-child {
  padding-top: 0.2em;
  border-bottom-left-radius: 0.4em;
  border-bottom-right-radius: 0.4em;
}
#variant_navigation_list .collapsed li:first-child,
#variant_navigation_list .collapsed li:last-child {
  padding-top: inherit;
  padding-bottom: inherit;
  border-radius: inherit;
}
#variant_navigation_list li {
  padding-left: 1em;
  padding-right: 1em;
}
#variant_navigation_list li:nth-child(odd) {
  background-color: #ccc;
}
#variant_navigation_list li:nth-child(even) {
  background-color: #bbb;
}
#variant_navigation_list li:hover {
  background-color: #9f9f9f;
  color: #000;
}

#clan_header {
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}

#clan_header > div,
#clan_header > h1 {
    margin-bottom: 0;
    height: 50px;
    line-height: 50px;
}

#clan_header > h1 {
    line-height: 50px;
    width: auto;
    text-align: center;
    float: left;
}
/* the group of right hand things */
#clan_header > div {
    border-left: 1px solid #ccc;
    float: right;
    padding: 0 20px;
    text-align: center;
}
/* links only - no spans here please */
#clan_header > div a {
    display: block;
}
#clan_header > div a:hover {
    background-color: #dadada;
    text-decoration: none;
}

#clan_banner {
  width: fit-content;
  text-align: center;
  margin-bottom: 10px;
  padding: 1em;
  border-radius: 1em;

  padding: 30px;
  padding-bottom: 20px;

  background-color: white; /* TODO andere Farbe */
  background-image: url('/background.jpg'); /* oder so */
  box-shadow: 1px 1px 5px #bbb;
}

#clan_banner img {
  filter: drop-shadow(0 0 0.75em black);
}

#clan_description {
    width: fit-content;
    overflow-wrap: anywhere;
    margin: 0.2em;
    margin-top: 1em;
    text-shadow: 2px 2px 2px #999;

    padding-top: 0.2em;
    padding-bottom: 0.25em;
    padding-left: 1em;
    padding-right: 1em;
    border-radius: 10px;

    /* center text */
    margin-left: auto;
    margin-right: auto;

    color: black;
    box-shadow:  2px  2px 10px #aaa,
                -2px  2px 10px #aaa,
                 2px -2px 10px #aaa,
                -2px -2px 10px #aaa;

    background-color: rgba(128, 128, 128, 0.25);

}
#clan_description_input form {
    border-bottom: 3px double #bbb;
    padding-bottom: 10px;
    margin-bottom: 10px;

    /* center text */
    margin-left: auto;
    margin-right: auto;
}

#clan_banner.clan_winner {
  position: absolute;
  top: 120px;
  right: 20%;
}

#clan_banner.user_page {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* lg */
@media (max-width: 991px) {
  #clan_banner.clan_winner,
  #clan_banner.user_page {
    position: relative;
    top: inherit;
    right: inherit;
  }
}


#clan_banner.user_page img {
  width: 40%;
}

/* Trophy display */
.trophycabinet {
  padding-top: 1px;
  /*margin-bottom: 30px;*/
  margin-bottom: 0.3rem;
}
ul.trophypage.indented {
  padding: 0;
}
ul.trophypage > li > img,
.trophycabinet img {
  height: 2rem;
  width: 2rem;
}
ul.trophypage.indented > li {
  list-style: none;
  padding-left: 0.8em;
}


#clan_trophies .trophyicon {
  margin-left: 5px;
  margin-top: 5px;
  background: #eee;
  display: inline-block;
  width: 50px;
  height: 50px;
}

.trophycabinet .trophyleft {
  vertical-align: top;
}
.trophycabinet .trophyright {
  width: 90%;
}
.text_cabinet.trophycabinet .trophyleft {
  width: 20%;
}
.text_cabinet.trophycabinet .trophyright {
  margin-bottom: 0px;
  width: 75%;
}
.trophycabinet .trophyleft,
.trophycabinet .trophyright {
  display: inline-block;
  vertical-align: top;
}
.trophycabinet .trophyright,
.trophycabinet .trophyleft {
  margin: 5px 0px;
}
.trophycabinet h2,
.trophycabinet h3 {
  line-height: 2.5em;
  margin-bottom: 0;
  border-bottom: 3px double #bbb;
}
.trophycabinet .endofcabinetrow,
.trophycabinet > ul li {
  border-bottom: 1px solid #ccc;
}

h2 .min-max-trophies,
.trophycabinet .min-max-trophies {
  margin-left: 0.25em;
  font-size: 1rem;
  color: #888;
  line-height: inherit;
}
.trophycabinet .min-max-trophies {
  font-size: 0.8rem;
}
.min-max-trophies:hover {
  color: #444;
  transform: scale(1.1);
}

/* Collapsed trophy list */
ul.collapsed li {
  display: inline-block;
}
ul.collapsed .trophyright {
  display: none;
}
ul.collapsed img.trophyleft {
  margin-left: 0px;
}

/* Trophy page */
ul.trophypage {
  list-style: disc;
}
ul.trophypage > li {
  margin-top: 5px;
}
li.multiline > img {
  vertical-align: middle;
}
li.multiline > span {
  display: inline-block;
  vertical-align: middle;
  max-width: 500px;
}

/* Trophy table cells */
th.trophy,
.trophies td.trophy {
  padding: 0;
  width: 1px;
}
.trophies td.trophy {
  border: 1px solid #888;
}
th.trophy img,
.trophies td.trophy img {
  vertical-align: middle;
  width: 2em;
  height: 2em;
}
th.trophy img {
  vertical-align: bottom;
  margin-bottom: 3px;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.trophyleft a {
  color: inherit;
}
h1:hover a, h2:hover a, h3:hover a, h4:hover a, h5:hover a, h6:hover a,
.trophyleft a:hover {
  color: #888;
}

/* Rules page */
#page_rules {
  font-size: 1.25em;
}
#page_rules ul {
  list-style-type: disc;
}
#page_rules h1 {
  font-size: 1.6em;
  line-height: 2em;
}
#page_rules h2 {
  font-size: 1.3em;
  line-height: 2em;
}

/* Small print */
.small_print {
  font-size: 0.9em;
}

/* Footer */
footer.junethack-footer {
  padding-top: 0.5rem;
  text-align: center;
  background-color: rgba(221,221,221,0.9);
  box-shadow: 0px 0px 8px #222;
  border-radius: 6px 6px 0 0;
}

/* Big red buttons */
.btn-junethack-red {
  color: #fff;
  background-color: #a00;
  border: 0;
  border-radius: 50px;
  box-shadow: 0px 5px 20px #555;
  padding: 10px 30px;
}
.btn-junethack-red:hover {
  color: #fff;
  background-color: #c22;
}

/* Section dividers */
.section-divider {
  border-top: 1px solid #ccc;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Back to top */
#back_to_top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: none;
}

/* Scoreboard banner positioning */
.scorelisting #clan_banner {
  position: absolute;
  top: 120px;
  right: 20%;
}

td.clan-banner-small {
  padding: 0 3px 0 3px;
}

/*
 * No-more-tables: on small screens, tables with .no-more-tables collapse
 * into stacked rows using data-title attributes on <td> elements.
 * Based on http://css-tricks.com/responsive-data-table-roundup/
 */
@media (max-width: 767.98px) {
  .no-more-tables table,
  .no-more-tables thead,
  .no-more-tables tbody,
  .no-more-tables th,
  .no-more-tables td,
  .no-more-tables tr {
    display: block;
  }

  .no-more-tables thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .no-more-tables tr {
    border: 1px solid #ccc;
    margin-bottom: 0.5em;
  }

  .no-more-tables td {
    border-bottom: 0;
    position: relative;
    padding-left: 40%;
    white-space: normal;
    text-align: left;
    min-height: 1.8em;
  }

  .no-more-tables td:before {
    content: attr(data-title);
    position: absolute;
    top: 0;
    left: 0.5em;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }

  /* Reset text-align overrides in stacked mode */
  .no-more-tables td.table_number,
  .no-more-tables td.table_date {
    text-align: left;
    padding-left: 40%;
  }
  .no-more-tables  td.dllink {
    text-align: left;
    width: 100%;
    padding-left: 40%;
  }
}

/* Navbar icon sizing */
nav .fas {
  font-size: 1.1em;
}
