/* License: AGPLv3 or later (http://www.gnu.org/licenses/), Copyright 2013, Martin Owens <doctormo@gmail.com> */
body.resource #left-column {
  line-height: 1.1;
  width:76% !important;
}
#gallery, #ballot-block{
  display: grid;
  column-gap: 1%;
  row-gap: 5px;
  margin:5px 0;
  grid-template-columns: 24.5% 24.5% 24.5% 24.5%;
}

#ballot-block, #gallery.photos {
  row-gap: 35px;
}


.galleryitem {
  display: inline-flex;
  width:100%;
  padding: 0px;
  text-align: center;
  vertical-align: middle;
  margin: 0;
  position:relative;
  height: 100%;
  flex: auto;
  flex-direction:column;
}

.galleryitem:hover {
  transform:scale(1.1);
  z-index:9999999999999;
  background-color:#fff;
  padding:10px;
  margin:-11px;
  border-width:1px;
  border-style:solid;
  border-color:#ccc;
  border-radius:4px;
  
}
.galleryitem.notvoted,.galleryitem.voted {
  display: flex;
  flex-direction: column;
  
}

.galleryitem.notvoted,.galleryitem.voted{
  margin-bottom:4px;
}


.galleryitem.unavailable {
  opacity: 0.5;
}
.galleryitem a.link img,
a.link .galleryitem img {
  width: 100%;
  vertical-align: middle;
  display: inline-block;
}
a.link .galleryitem img {
  min-width: 100%;
  margin:auto;
}

.galleryitem a.link {
 
  outline: none;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color:#eee;
  padding:6px;
  border-radius:3px;
  max-height:300px;
  overflow:hidden;
}

.galleryitem a.link img {
 
  height:auto !important;
}

.galleryitem > p {
  display:block;
}

.galleryitem.notvoted > p, .galleryitem.voted > p {
  flex-grow: 1;
  display:table;  
}

.galleryitem:hover .label {
  word-wrap: break-word;
  vertical-align: middle;
}
.galleryitem .label {
  text-align: center;
  padding: 8px 4px;
  margin: 0px;
  word-wrap: break-word;
  font-size:0.8rem;
  margin-bottom:3px;
}
.galleryitem .label:hover {
  border-radius: 0px;
}

.galleryitem .label a {
  color: #333;
  display: block;
  outline: none;
}
.galleryitem .label a:hover {
  text-decoration: none;
}
.galleryitem p.new a {
  background-color: #efe;
  outline: none;
}
.galleryitem progress {
  height: 15px;
  margin: 23px 0px;
  width: 130px;
}
.galleryitem div.link input {
  max-width: 150px;
  max-height: 150px;
  vertical-align: middle;
  display: inline-block;
}
.galleryitem div.link {
  min-width: 150px;
  min-height: 150px;
  display: block;
  line-height: 150px;
}
.galleryitem div.input input {
  max-width: 140px;
  text-align: center;
}
.galleryitem div.input {
  background-color: #EEF;
  display: table-cell;
  margin: 2px;
  padding: 3px;
  color: #035;
  height: 4em;
  width: 150px;
  vertical-align: middle;
}

.galleryitem.nothing {
  color: #798488;
  width: 50%;
  text-align: left;
}

.galleryitem.nothing:hover {
  border: 2px solid white;
  background-color: transparent;
}
.galleryitem.empty a.link > img {
  opacity: 0.5;
}

.galleryitem.removed {
  border: 1px dashed #f00 !important;
  background-color: #fee;
  padding: 0px;
  border-radius:3px;
}
.galleryitem.removed p a {
  background-color: transparent !important;
}
.galleryitem.unpublished {
  border: 1px solid #e58 !important;
  background-color: #fee;
  padding: 0px;
  border-radius:3px;
}
.galleryitem.unpublished p a {
  background-color: transparent !important;
}
.galleryitem.voted {
  padding: 2px;
}
.galleryitem.voted .label {
  background-color: #8ccaff;
  border-radius: 3px;
}

.galleryitem .minitabs {
  position:relative;
  width:100%;
  text-align: center;
  height:auto;
}

.galleryitem .minitabs > img,
.galleryitem .minitabs > a {
  visibility: hidden;
}
.galleryitem .minitabs  img {
  margin:4px;
  height:15px;
}
.galleryitem:hover .minitabs > img,
.galleryitem:hover .minitabs > a {
  visibility: visible;
}
.galleryitem span.ribbon {
  visibility: visible;
  text-align:center;
}
.galleryitem span.ribbon p {
  position: absolute;
  top: 0px;
  width: 100%;
  display:block;
  text-align: center;
  color: white;
  font-weight: bold;
  font-weight:normal;
  font-size:14px;
  margin:0;
}
svg.ribbon{
  width:90%;
  margin-top:-3px;
}
@media only screen and (min-width: 460px) {
  svg.ribbon{
  margin-top:-5px;
}
}

@media only screen and (min-width: 620px) {
  svg.ribbon{
  margin-top:-7px;
}
}
@media only screen and (min-width: 1190px) {
  svg.ribbon{
  margin-top:-10px;
}
}

svg.ribbon path.part_a { fill:#7e7e7e; }
svg.ribbon path.part_b { fill:#a9a9a9; }
svg.ribbon path.part_c { fill:#494949; }
.winner svg.ribbon path.part_a { fill:#e1b000; }
.winner svg.ribbon path.part_b { fill:#fbc400; }
.winner svg.ribbon path.part_c { fill:#a97610; }
.purple svg.ribbon path.part_a { fill:#614266; }
.purple svg.ribbon path.part_b { fill:#845a8b; }
.purple svg.ribbon path.part_c { fill:#413044; }
.blue svg.ribbon path.part_a { fill:#2e5a92; }
.blue svg.ribbon path.part_b { fill:#3a71b8; }
.blue svg.ribbon path.part_c { fill:#243c5a; }
.red svg.ribbon path.part_a { fill:#982828; }
.red svg.ribbon path.part_b { fill:#c23030; }
.red svg.ribbon path.part_c { fill:#5e2920; }
.green svg.ribbon path.part_a { fill:#289842; }
.green svg.ribbon path.part_b { fill:#30c256; }
.green svg.ribbon path.part_c { fill:#205e23; }
.orange svg.ribbon path.part_a { fill:#aa7216; }
.orange svg.ribbon path.part_b { fill:#de9314; }
.orange svg.ribbon path.part_c { fill:#6b4c13; }
.grey svg.ribbon path.part_a { fill:#606060; }
.grey svg.ribbon path.part_b { fill:#797979; }
.grey svg.ribbon path.part_c { fill:#3f3f3f; }
.plat svg.ribbon path.part_a { fill:#8d8d8d; }
.plat svg.ribbon path.part_b { fill:#bcbcbc; }
.plat svg.ribbon path.part_c { fill:#5d5d5d; }
.galleryitem .minitabs .blank {

  text-align: center;
  margin-left: 0;
  padding: 2px 5px;
}
.galleryitem.notvoted .minitabs .blank, .galleryitem.voted .minitabs .blank {
  line-height:1.5;
  font-size:15px;
}
.galleryitem .blank .votebox {
  background-color: white;
  height: 24px;
  width: 24px;
  display: inline-block;
  border: solid 1px #aaa;
  border-radius: 4px;
  font-size: 2rem;
  line-height: 1.15rem;
  color: #8ccaff;
  margin-top:3px;
}
.galleryitem .blank .votebox:hover {
  border: solid 1px #666;
}
.galleryitem a.visible {
  visibility: visible;
}
.galleryitem .blank .votebox.add { color: white; }
.galleryitem .blank .votebox.add:hover { color: #8ccaff; }
.galleryitem .blank .votebox.remove,
.galleryitem .blank .votebox.rerank
{
  font-size: 1rem;
  line-height:1.5;
  color: #666f;
}
.galleryitem .blank .votebox.remove:hover,
.galleryitem .blank .votebox.rerank:hover
{
  font-weight: normal !important;
}
.galleryitem .blank .votebox.remove:hover {
  color: #aa0000 !important;
}
.galleryitem .minitabs img{
  position: relative;
  right: 0px;
  float: left;
  transform:scale(1.5);
  transform-origin:top center;
}

.galleryitem .minitabs .blank {
  position: relative;
  right: 0px;
  float: left;

}
.galleryitem .minitabs > img:last-child,
.galleryitem .minitabs > a:last-child img,
.galleryitem .minitabs .blank:last-child {
  float: right;
  left: -4px;
}
.galleryitem.notvoted .minitabs .blank:last-child ,
.galleryitem.voted .minitabs .blank:last-child {
  left: 0px;
  background-color:#bbbb;
  margin:5px 4px 8px 3px;
  min-width:20px;
  border-radius:4px;
}
.galleryitem .minitabs a:hover {
  text-decoration: none;
  font-weight: bold;
}

div#category_desc {
  color: #798488;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: 1em;
  padding: 1em;
  background-color: #eee;
}

.btn.dragging #drop {
  border: 1px solid rgba(0,0,0, 0.25);
  background-color: white;
}
.btn #drop img {
  display: none;
}
.btn.dragging #drop img {
  border: dashed 1px rgba(0,0,0,0.25);
  padding: 5px;
  margin: 19px 5px 14px;
  display: inline-block;
}
.bootstrap-tagsinput input {
  line-height: 1.9em;
}

.vote_round {
  border:1px;
  padding:10px;
  border-style:solid;
  border-color:#dedede;
  margin-top:-10px;
  overflow:hidden;
}

.vote_round dt{
  background-color:#ccc;
  border-radius:3px;
  padding:8px;
  color:#333;
  display:block;
  width:65%;
  margin:5px;
  float:left;
  clear:left;
}

.vote_round dd{
  background-color:#34A7C1;
  border-radius:3px;
  padding:8px;
  color:#fff;
  display:block;
  float:left;
  margin:5px;
  width:5%;
  text-align:right;
}

.vote_round .winner {
  font-weight: bold;
  background-color: #518e5a;
  color: white;
}
.vote_round .loser {
  opacity: 0.6;
  background-color: #ffaeae;
}
@media screen and (max-width: 960px) {
    #gallery{
         row-gap: 15px;
    }
    .galleryitem span.ribbon p {
        top: 3px;
    }
}
@media screen and (max-width: 700px) {
  #gallery{
      grid-template-columns: 32.5% 32.5% 32.5%;
  } 
  .galleryitem span.ribbon p {
    line-height:1;
    font-size:15px;
    margin-top:0px;
  }
}
@media screen and (max-width:530px) {
  .galleryitem span.ribbon p {

    margin-top:-3px;
  }
}
@media screen and (max-width: 420px) {
  #gallery{
      grid-template-columns: 49.5% 49.5%;
  } 
  .galleryitem span.ribbon p {
    margin-top:0;    
  }
} 
