@charset "UTF-8";

@import "variables";

@mixin motionListStdMotion($titleFontSize) {
  .motion {
    position: relative;
    &:last-child {
      padding-bottom: 0;
    }

    > .date {
      color: #757676;
      margin-left: 20px;
      position: absolute; // no float, otherwise height gets recalculated wrong when sorting agenda items
      top: 12px;
      right: 12px;
      @media screen and (max-width: $screen-sm-max) {
        position: relative;
        top: 0;
        right: 0;
        float: right;
      }
    }

    > .title {
      margin-bottom: 3px;

      .motionIcon {
        width: 27px;
        margin-left: -30px;
        color: $colorLinksLight;
      }

      a {
        color: $colorLinks;
        font-weight: bold;
        font-size: $titleFontSize;
        line-height: $titleFontSize + 2;
        text-indent: 0;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;

        &:hover, &:focus {
          color: darken($colorLinks, 20%);
        }
      }

      .pdfLink {
        font-size: 13px;
        color: $colorLinksLight;
        margin-left: 10px;
        display: inline-block;
        font-weight: normal;
        a:hover {
          text-decoration: none;
          color: darken($colorLinksLight, 20%);
        }
      }
    }
  }

  .motion.withdrawn {
    .motionTitle, .motionPrefix {
      text-decoration: line-through;
    }
  }
  .amendment.withdrawn {
    .amendmentTitle {
      text-decoration: line-through;
    }
  }

  ul.amendments {
    list-style-type: none;
    margin: 0;
    padding: 0;

    > li {
      margin-bottom: 3px;
      position: relative;
      > a {
        font-weight: bold;
        margin-right: 5px;
      }
      > .date {
        color: #757676;
        display: block;
        margin-left: 20px;
        position: absolute; // no float, otherwise height gets recalculated wrong when sorting agenda items
        top: 0;
        right: -8px;
        @media screen and (max-width: $screen-sm-max) {
          position: relative;
          top: 0;
          right: 0;
          float: right;
        }
      }
    }
  }
  .status {
    font-style: italic;
    color: $text-color;
  }
}

.motionListStd {
  list-style-type: none;
  margin: 0 0 40px;
  padding: 0;

  @include motionListStdMotion(16px);

  &.layout1 {
    .motion {
      padding: 12px 20px 17px 50px;

      > .date {
        display: block;
      }
      > .title {
        padding-right: 65px;
        .motionPrefix {
          display: inline-block;
          &:after {
            content: ':';
          }
        }
      }
      .info {
        font-style: italic;
        color: rgb(115, 115, 115);
      }
      .clearfix {
        display: none;
      }
    }
    h4.amendments {
      display: none;
    }
    ul.amendments {
      > li {
        > .date {
          display: block;
        }
      }
    }
  }

  &.layout2 {
    .motion {
      padding: 12px 30px 17px 30px;

      > .date {
        display: none;
      }
      > .title {
        font-family: $headingFont;
        .motionIcon {
          display: none;
        }
        .motionPrefix {
          word-break: break-all;
          word-wrap: break-word;
          width: 90px;
          float: left;
          left: 30px;
          top: 13px;
        }
        .motionTitle {
          display: block;
          margin-left: 95px;
        }
        .pdfLink {
          display: none;
        }
      }
      .info {
        display: block;
        margin-left: 95px;
      }
      .clearfix {
        clear: both;
      }
    }
    ul.amendments {
      margin-bottom: 10px;
      > li {
        > a {
          float: left;
          width: 90px;
          left: 0;
          top: 0;
        }
        > .date {
          display: none;
        }
      }
    }
    h4.amendments {
      margin-top: 10px;
      margin-bottom: 5px;
      font-family: $headingFont;
      font-size: 14px;
      font-weight: bold;
      color: $colorGreenLight;
    }
  }
}

.noMotionsYet {
  font-style: italic;
}

.motionListAgenda {
  list-style-type: none;
  margin: 15px 0 0;
  padding: 0;
  position: relative;

  @include motionListStdMotion(14px);

  ol {
    list-style-type: none;
    margin: 0 0 0 30px;
    padding: 0;
  }
  ul.motions {
    list-style-type: none;
    margin: 0 0 0 50px;
    padding: 0;
  }
  ul.amendments {
    > li > .date {
      right: 3px;
    }
  }

  .agendaItemAdder {
    padding-left: 35px;
    margin-bottom: 0;
    margin-top: -4px;
  }
  html.no-touchevents & .agendaItemAdder {
    visibility: hidden;
  }
  html.no-touchevents &:hover > .agendaItemAdder, html.no-touchevents & ol.agenda:hover > .agendaItemAdder {
    visibility: visible;
  }

  li.agendaItem {
    border: solid 1px transparent; // Otherwise: strange behavior when moving items
    padding-left: 20px;
    position: relative;

    .delAgendaItem, .delAgendaItem:link, .delAgendaItem:visited {
      color: $colorDelLink;
      position: absolute;
      top: 5px;
      right: 10px;
    }

    > div {
      margin-bottom: 5px;
      padding: 5px 10px 10px;

      > h3 {
        overflow: auto;
        padding: 2px;
        html.no-touchevents & .delAgendaItem {
          visibility: hidden;
        }
        html.no-touchevents &:hover .delAgendaItem {
          visibility: visible;
        }

        .editAgendaItem {
          font-size: 0.7em;
          margin-left: 10px;
        }
        html.no-touchevents & .editAgendaItem {
          visibility: hidden;
        }
        html.no-touchevents &:hover .editAgendaItem {
          visibility: visible;
        }
      }

      .agendaItemEditForm {
        display: none;

        input.code {
          width: 80px;
          margin-right: 10px;
        }
        input.title {
          width: 250px;
          margin-right: 10px;
        }
        .agendaMotionsRow {
          padding-top: 5px;
          font-size: 0.8em;
          color: gray;
        }
      }

      .motionCreateLink {
        float: right;
        text-align: left;
        margin-bottom: 7px;
        text-indent: -7px;
        padding-left: 18px;
        display: block;
      }
    }

    &.editing {
      > div > h3 {
        display: none;
      }
      > div > .agendaItemEditForm {
        display: block;
      }
      > ol > .agendaItemAdder {
        visibility: hidden !important;
      }
    }

    .motion {
      > .date {
        top: 0;
        right: 3px;
      }
      > .title {
        margin-right: 75px;
      }
      h4.amendments {
        font-size: 16px;
      }
    }
  }

  &.agendaListEditing {
    padding-top: 20px;
    padding-bottom: 20px;
    li.agendaItem {
      > div {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
      }
    }
  }
  h2, h3 {
    margin: 0 0 5px;
    font-size: 18px;
  }
  .moveHandle {
    float: left;
    font-size: 1.5em;
    color: lightgrey;
    margin-left: -27px;
    cursor: move;
  }
  html.no-touchevents & li.agendaItem > div > .moveHandle {
    display: none;
  }
  html.no-touchevents & li.agendaItem:hover > div > .moveHandle {
    display: block;
  }

  .movePlaceholder {
    border: dotted 1px gray;
  }
}

.motionListTags {
  #tagList {
    display: block;
    list-style-type: none;
    margin: 0;
    padding-top: 30px;
    padding-bottom: 30px;
    text-align: center;

    > li {
      display: inline-block;
      padding: 10px;
      background-color: #e2007a;
      border-radius: 3px;
      font-size: 16px;
      margin: 10px;

      > a:link, #tag_list > li > a:visited {
        color: white;
      }
    }
  }

  .motionTable {
    width: 100%;

    th {
      border-bottom: solid 1px $colorGreenLight;
      font-size: 0.80em;
      line-height: 2.5em;
      font-weight: 600;
    }
    td {
      vertical-align: top;
      padding: 0.75em 0em 0.75em 0em;
    }
    tr.motion {
      border-top: solid 1px $colorGreenLight;
      &:first-child {
        border-top: none;
      }
    }
    tr.amendment {
      .titleCol {
        .pdfLink {
          font-weight: 400;
        }
        .titleLink {
          font-weight: 400;
        }
      }
    }
    .prefixCol {
      width: 15%;
    }
    .titleCol {
      width: 45%;

      .pdfLink {
        font-weight: 600;
        font-size: 0.8em;
        float: right;
        margin-right: 20px;
      }
      .titleLink {
        font-weight: 600;
        a:link, a:visited {
          color: black;
        }
      }
    }
    .initiatorCol {
      width: 35%;
    }
    .unscreened {
      .titleCol {
        .pdfLink {
          display: none;
        }
        .titleLink {
          a:link, a:visited {
            font-weight: 400;
            color: gray;
          }
        }
      }
    }
  }
}

.motionTextHolder {
  .well & > h3.green {
    margin-bottom: 22px;
  }
  .paragraph {
    font-size: 14px;
    clear: both;
    position: relative;

    &.smallFont {
      font-size: 12px;
    }

    .text {
      padding: 15px 20px 15px;

      @include motionParagraphStd;

      .lineNumber {
        position: relative;
        left: $lineNumberOffset + -1 * $fixedWidthTextStdPadding;
        width: 0;
        display: inline-block;
        float: left; // otherwise problems appear at li > p constucts
      }
      .lineNumber:after {
        content: attr(data-line-number);
        color: #C3C3C3;
        font-size: $motionStdFontSize;
        font-style: normal;
        font-weight: normal;
        text-decoration: none;
      }

      > ul, > ol {
        padding-left: $fixedWidthTextListPadding;

        .lineNumber {
          left: $lineNumberOffset + -1 * ($fixedWidthTextListPadding + $fixedWidthTextStdPadding);
        }
        ul, ol {
          .lineNumber {
            left: $lineNumberOffset + -1 * (2 * $fixedWidthTextListPadding + $fixedWidthTextStdPadding);
          }
          ul, ol {
            .lineNumber {
              left: $lineNumberOffset + -1 * (3 * $fixedWidthTextListPadding + $fixedWidthTextStdPadding);
            }
            ul, ol {
              .lineNumber {
                left: $lineNumberOffset + -1 * (4 * $fixedWidthTextListPadding + $fixedWidthTextStdPadding);
              }
            }
          }
        }

      }

      > blockquote {
        @include motionParagraphBlockquote();
        margin-left: $fixedWidthTextQuoteMargin;

        .lineNumber {
          left: $lineNumberOffset + -1 * ($fixedWidthTextStdPadding + $fixedWidthTextQuotePadding +
            $fixedWidthTextQuoteBorder + $fixedWidthTextQuoteMargin);
        }
      }

      &.smallFont {
        font-size: 12px;
        > blockquote {
          font-size: 12px;
        }
      }
    }
    &.lineNumbers .text {
      padding: 15px 10px 15px $fixedWidthTextStdPadding;
    }

    .text.collidingAmendment {
      margin-top: -20px;
      > h3 {
        font-size: 1.2em;
        margin-top: 0;
      }
    }

    h4.lineSummary {
      font-size: inherit;
      font-weight: bold;
      margin: 0;
    }

    .textAmendment {
      width: $motionFixedWidth;
      position: relative;
      del, ul.deleted, ol.deleted, blockquote.deleted, pre.deleted {
        color: #ff0000;
        text-decoration: line-through;
      }
      ins, ul.inserted, ol.inserted, blockquote.inserted, pre.inserted {
        text-decoration: underline;
      }
      .preamble {
        position: absolute;
        top: -($inlineAmendmentPreambleHeight - 10);
        height: $inlineAmendmentPreambleHeight;
        color: $inlineAmendmentPreambleColor;
        width: 100%;
        > div {
          position: absolute;
          bottom: 0;
          left: 0;
          max-height: $inlineAmendmentPreambleHeight;
          padding-right: 50px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          width: 100%;
          h3 {
            font-size: 14px;
            display: inline-block;
            margin: 0;
            font-weight: bold;
          }
          .moreAffected {
            font-style: italic;
            font-size: 0.8em;
            margin-top: -3px;
            color: #bbccbb;
          }
        }
      }
      .movedParagraphHint {
        font-style: italic;
        font-size: 0.8em;
        margin-top: 3px;
        color: #bbccbb;
      }
    }
  }
  .tabularData {
    > tbody > tr:first-child {
      > td, > th {
        border-top: none;
      }
    }
  }
  &.fourdigitsLineNumbers .paragraph .text {
    .lineNumber {
      left: $lineNumberOffset4 + -1 * $fixedWidthTextStdPadding;
    }
    > ul, > ol {
      .lineNumber {
        left: $lineNumberOffset4 + -1 * ($fixedWidthTextListPadding + $fixedWidthTextStdPadding);
      }
    }
    > blockquote {
      .lineNumber {
        left: $lineNumberOffset4 + -1 * ($fixedWidthTextStdPadding + $fixedWidthTextQuotePadding +
            $fixedWidthTextQuoteBorder + $fixedWidthTextQuoteMargin);
      }
    }
  }
}

.bookmarks {
  float: right;
  width: 1px;
  list-style-type: none;
  padding: 0;
  margin-top: 5px;

  > li {
    width: 1px;
    height: 38px;
    position: relative;
    margin-bottom: 4px;

    > a {
      display: block;
      position: absolute;
      white-space: nowrap;
      padding: 10px;
      top: 0;
      left: 2px;
      color: #fff;
      min-width: 40px;
      -moz-border-radius-topright: 10px;
      -webkit-border-top-right-radius: 10px;
      border-top-right-radius: 10px;
      -moz-border-radius-bottomright: 10px;
      -webkit-border-bottom-right-radius: 10px;
      border-bottom-right-radius: 10px;
      font-weight: bold;
    }
    &.comment > a {
      @include linear-gradient(90deg, $bookmarkCommentColor, lighten($bookmarkCommentColor, 3.5%));
      &.zero {
        opacity: 0.5;
      }
      .count:after {
        content: attr(data-count);
        padding-left: 4px;
      }
    }
    &.amendment > a {
      @include linear-gradient(90deg, $bookmarkAmendmentColor, lighten($bookmarkAmendmentColor, 3.5%));
    }
    .hider {
      @include linear-gradient(90deg, rgb(180, 180, 180), rgb(220, 220, 220));
    }
  }
}

.commentScreeningQueue {
  margin-left: 50px;
  color: darkgray;
}

.commentForm {
  margin-top: 20px;
  margin-bottom: 20px;

  > label {
    display: block;
    text-align: center;
  }

  .submitrow {
    text-align: center;
  }
}

.motionComment {
  h3 {
    background: none;
    color: $colorLinksLight;
    font-family: $bodyFont;
    font-size: 13px;
    font-weight: bold;
    line-height: 18px;
    margin: 0 0 5px 0;
    text-transform: none;
    padding: 0;
  }

  .date {
    color: #757676;
    float: right;
    margin-left: 20px;
  }

  .commentBottom {
    margin-top: 10px;
    height: 30px;
    .commentLink {
      float: right;
    }
  }

  .delLink {
    float: right;
    margin-left: 20px;

    a:link, a:visited {
      color: #ccc;
      &:hover, &:focus {
        color: #bbb;
      }
    }
  }
}

.commentSupporterHolder {
  float: left;
  .likes, .dislikes {
    display: inline-block;
    border: solid 1px lightgray;
    margin: 1px;
    padding: 2px;
    @include border-radius(3px);
  }
  .likes span, .dislikes span {
    color: lightgray;
  }
  button.likes:hover {
    background-color: #A2BC04;
  }
  button.dislikes:hover {
    background-color: red;
  }
  button {
    background-color: transparent;
  }
  .currently {
    display: inline-block;
  }
  .revoke {
    text-align: center;
    display: none;
  }
  .mine {
    display: inline-block;
    height: 20px;
    width: 240px;
    position: relative;
  }
  .mine:hover .revoke {
    display: inline-block;
  }
  .mine:hover .momentan {
    display: none;
  }
  .currently, .revoke {
    position: absolute;
    top: 5px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin-left: 20px;
    font-size: 10px;
    height: 20px;
    width: 240px;
    border: solid 1px gray;
    @include border-radius(3px);
    background-color: #eee;
  }
}

.withdrawForm {
  text-align: center;
  .ask {
    font-size: 16px;
    margin-bottom: 15px;
    margin-top: 15px;
  }
}

.sectionType3 { // Images
  padding: 10px;
  img {
    max-height: 200px;
    max-width: 100%;
  }
}

.motionRightCol {
  padding-left: 0;
  padding-top: 0;
  &.col-md-3 {
    padding-left: 0;
    padding-top: 0;
  }

  > section {
    padding-left: 0;
    padding-top: 0;
    padding-bottom: 20px;
  }
}

iframe.pdfViewer {
  width: 100%;
  height: 600px;
  border: none;
}

.sectionType5 { // PDFs
  margin-left: -1px;
  margin-right: -1px;
}

.share_buttons {
  &:after,
  &:before {
    content: " ";
    display: table;
  }
  &:after {
    clear: both;
  }
  ul {
    padding: 0;
    margin: 0;
  }
  li {
    height: 30px;
    display: inline-block;
    margin-right: 14px;
    overflow: hidden;
    width: 103px;
    &:last-child {
      margin-right: 0;
    }
    a {
      font-family: Arial, Helvetica, sans-serif;
      color: #fff;
      position: relative;
      display: block;
      padding-left: 10px;
      padding-right: 5px;
      font-size: 12px;
      line-height: 31px;
      text-decoration: none;
      border: 1px solid #ddd;
      background-color: #fff;
      &:hover {
        background-color: #eee;
      }
    }
    &.facebook {
      a {
        color: #247bbd;
        padding-left: 5px;
        .icon {
          font-size: 17px;
        }
      }
    }
    &.twitter {
      a {
        color: #247bbd;
        .icon {
          font-size: 20px;
        }
      }
    }
  }
}

#amendmentMergeForm {
  #motionTitlePrefix, .dropdown-toggle {
    max-width: 230px;
  }
  .checkButtonRow {
    text-align: center;
    margin: 20px 0;
  }
  .otherAmendmentStatus {
    .row {
      margin-bottom: 15px;
    }
    .by {
      display: block;
      font-size: 0.8em;
    }
    .amendmentAjaxTooltip {
      float: right;
      color: gray;
      margin-right: -15px;
      margin-top: 7px;
    }
  }
  .affectedParagraphs {
    .paragraph.unmodified .affectedBlock {
      display: none;
    }
    .paragraph.modified .unmodifiedVersion {
      display: none;
    }
  }
  .affectedBlock {
    margin-top: 20px;

    > textarea {
      display: none;
    }
  }
  .modifySelector {
    margin-top: 15px;
    label {
      margin-right: 20px;
      font-weight: normal;
    }
  }
  .save-row {
    text-align: center;
  }
  .saveholder {
    .checkAmendmentCollissions {
      display: none;
    }
  }
}

.amendmentCollissionsHolder {
  .amendmentBy {
    color: gray;
  }
  .amendmentOverrideBlock {
    background-color: #f5f5f5;
    margin: 15px -10px;
    padding: 10px;
    border: solid 1px #ddd;
    border-radius: 4px;

    > h3 {
      font-size: 18px;
      margin-top: 0;
    }

    > textarea {
      display: none;
    }
  }
}
