plugins/arDominionPlugin/css/less/scaffolding.less
/*
 * This file is part of the Access to Memory (AtoM) software.
 *
 * Access to Memory (AtoM) is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Access to Memory (AtoM) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Access to Memory (AtoM).  If not, see <http://www.gnu.org/licenses/>.
 */

#wrapper {
  background-image: url('../../images/separator.png');
  background-repeat: no-repeat;
  background-position: top center;
}

footer {
  min-height: 40px;
}

.page {
  margin: 20px;
}

a:hover {
  text-decoration: none;
}

// Installer

.sfInstallPlugin {
  .container {
    padding-top: 40px;
  }
  .logo {
    .clearfix();
    background-color: #367180;
    border: 1px solid @gray;
    .border-radius(4px);
  }
  .active {
    color: @blue;
  }
  .done {
    color: @green;
  }
}

// h1 multiline

.multiline {
  margin-top: 18px;
  line-height: 24px;
  img {
    float: left;
    margin-right: 8px;
  }
  .sub {
    margin-top: 4px;
    font-size: 12px;
    display: block;
    line-height: 1;
  }
}

// Open Sans is not happy forcing bold
// Maybe use font-weight 300, 400, 700, 800...?

th {
  font-weight: normal;
}

// Breadcrumbs

.breadcrumb {

  padding: 0;
  margin: 2px 0 6px 0;
  background: none;
  border: none;
  font-size: 12px;
  .clearfix();

  ul {
    margin: 0;
    list-style-type: none;
  }

  li {
    float: left;
    max-width: 240px;
    margin-right: 10px;
    position: relative;
  }

  li:after {
    content: "\f101";
    font-family: 'FontAwesome';
    color: @orange;
    position: absolute;
    top: 3px;
    right: -10px;
    padding-right: 1px;
  }

  li:last-child:after {
    display: none;
  }

  a,
  span {
    padding: 2px 4px;
    border: 1px solid transparent;
    display: block;
    .text-overflow();
  }

  a {
    .border-radius(4px);
  }

}

// Search result breadcrumb

.result .breadcrumb {
  a {
    background: none;
    color: @grayLight;
  }
  li {
    margin: -4px 8px 0 0 !important;
  }
}

// Action icons (e.g. print reports)

#action-icons {

  font-size: 12px;

  // Icons
  i {
    font-size: 14px;
    color: @grayLight;
    margin-right: 4px;
  }

  a:hover i {
    color: @orange;
  }

  ul {
    margin: 0;
    list-style: none;
    .separator {
      margin: 6px 0;
      h4 {
        margin: 0;
      }
    }
  }

  img {
    margin-right: 4px;
    margin-top: -2px;
  }

  a {
    color: @blue;
    display: block;
    padding: 2px 4px;
    &:hover {
      background-color: @grayLighter;
    }
  }

}

// jQuery Masonry bricks
// It's not working well with text, use images

@brickWidth: 170px;
@brickPadding: 15px;

.masonry {

  margin-left: -4px;

  &.centered {
    margin: 0 auto;
  }

}

.masonry-brick {
  display: block !important;
}

.digitalobject .brick {
  width: @brickWidth*1.25;
}

.brick {

  // Hide them until Masonry finish the rendering
  display: none;

  &.masonry-brick {
    display: block;
  }

  &.brick-only-text {
    width: @brickWidth;
    h4 {
      min-height: 100px;
    }
  }

  background-color: @white;
  @shadow: 0 1px 3px rgba(25, 25, 25, 0.4);
  .box-shadow(@shadow);

  // Dimensions
  width: @brickWidth;
  padding: @brickPadding;
  margin-bottom: @brickPadding;

  font-size: 11px;
  line-height: 1.5em;

  h4 {
    font-size: 22px;
    margin: -@baseLineHeight*.25 0 @brickPadding 0;
    line-height: @baseLineHeight * 1.5;
    text-align: center;
  }

  .preview {
    background-color: #f2f0f0;
    margin-bottom: @baseLineHeight;
    img {
      width: 100%;
    }
  }

  .description {
    margin: 8px 0;
    .text-overflow();
  }

  .bottom {
    margin: 0 -15px -15px -15px;
    padding: 8px 15px;
    background-color: #f2f0f0;
    .clearfix();
    p {
      margin: 0;
      color: #666;
      .text-overflow();
    }
  }

}

// Table

.table {
  background-color: @white;
}

.table thead th {
  background-color: @grayLighter;
}

// Read more link

.read-more a,
.read-less a {
  color: @gray;
  .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
  padding: 1px 4px;
  .border-radius(4px);
  border: 1px solid @grayLight;
}

// Level of description

.level {
  color: @gray;
  text-transform: uppercase;
  font-size: 11px;
  padding-left: 5px;
}

// Modals

.modal .modal-header {
  background-color: @white;
  #gradient > .vertical(@white, lighten(@orange, 10%));
  border-bottom: 1px solid @gray;
  .box-shadow(0 1px 2px rgba(25, 25, 25, .2));
}

.modal .modal-header h3,
.modal .modal-body {
  color: @black !important;
  text-shadow: none !important;
}

.modal .modal-body h3 {
  font-style: normal;
  font-size: 14px;
  line-height: 16px;
  margin: 0;
}

// Facets

#facets {
  margin-top: 20px;
}

.facet {

  .facet-header {
    font-family: @sansFontFamily;
  }

  .facet-body {
    display: none;
    background-color: #eee;
    margin-bottom: @baseLineHeight/2;
  }

  form {
    margin: 0;
  }

  &.open {
    margin-top: @baseLineHeight/2;
    margin-bottom: @baseLineHeight/2;
  }

  // Content of .facet-header for desktops
  p {
    text-transform: lowercase;
    font-variant: small-caps;
    font-weight: normal;
    font-size: 20px;
    margin: 0 0 0 0;
    padding: 4px 4px 6px 6px;
    position: relative;
    cursor: pointer;
    &:after {
      font-variant: normal;
      position: absolute;
      right: 8px;
      content: "\f107";
      font-family: "FontAwesome";
      color: @gray;
    }
    &:hover {
      background-color: @grayLight;
      color: @white;
      &:after {
        color: @white;
      }
    }
  }

  // Content of .facet-header for mobile
  button {
  }

  // Open state of a facet
  &.open {

    // Change arrow icon
    p:after {
      content: "\f106";
    }

    .facet-header p {
      background-color: @grayLight;
      color: @white;
      &:after {
        color: @white;
      }
    }

    // Show body with fadeInDown
    .facet-body {
      display: block;
      .animation(fadeInDown, .2s);
    }

  }

  // Active facet item
  .active {
    a {
      color: @black;
    }
  }

  ul {
    .nav();
    margin-bottom: 0;
  }

  li {
    padding: 2px 32px 2px 4px;
    .text-overflow();
    position: relative;
  }

  // Selected facet results
  .active a {
    text-decoration: underline;
  }

  // Facet counter
  .facet-count {
    padding-left: 4px;
    position: absolute;
    right: 5px;
  }

}

// Date picker in facets

.facet-dates {

  label,
  ul,
  li {
    display: inline;
  }

  form,
  label,
  ul,
  li {
    margin: 0;
    padding: 0;
  }

  ul {
    list-style-type: none;
  }

  li:not(:first-child) {
    margin: 0 1px;
  }

  input[type=text] {
    width: 44px;
    padding: 0 4px;
    display: inline;
    height: 24px;
    min-height: 24px;
    margin-bottom: 3px;
    text-align: center;
  }

  button {
    height: 24px;
    min-height: 24px;
    margin: 0 0 3px 4px;
    padding: 3px 10px 0 9px;
    i {
      font-size: 16px;
      color: @gray;
    }
  }

  .facet-dates-clear {
    display: block;
  }

}

// Top facets

#header-facets {

  .top-facet {
    margin-top: @baseLineHeight;
    .badge {
      margin-left: 8px;
      font-size: 9px;
      background-color: lighten(@grayLight, 10%);
    }
  }

}

// Repository box

.repository-logo {

  margin-top: 10px;
  margin-bottom: 20px;

  a {
    color: @gray;
  }

  h2, img {
    max-width: 220px;
    padding: 8px;
    .box-sizing(border-box);
    @shadow: 2px 2px 1px rgba(25, 25, 25, .2);
    .box-shadow(@shadow);
    background-color: @white;
    margin: 0;
  }

  h2 {
    border: 8px solid @gray;
    font-size: 18px;
    line-height: 20px;
  }

  img {
    background-color: @gray;
  }

}

.repository-logo-text h2 {
  min-height: 180px;
  color: @gray;
}

// Actions section

.actions {

  min-height: 28px;
  padding: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
  background-color: @grayDark;
  #translucent > .background(@black, .2);
  .border-radius(4px);
  .box-shadow(inset 0 1px 1px rgba(0, 0, 0, .15));

  // Limit the following properties to its first descendant

  > ul {
    margin: 0;
    list-style: none;
  }

  > ul > li {
  float: left;
  }

  > ul > li > * {
    margin-right: 6px;
  }

  > ul > .divider {
    height: 1px;
    margin-right: 6px;
    background: none;
  }

}

// Front map

#front-map {
  height: 200px;
  .border-radius(4px 4px 0 0);
  border: 8px solid @white;
}

// If you want to lower down the contents in the sidebar to match the height
// of the body content. It's just a workaround until we create a custom layout
// where the heading gets a full row and the sidebar comes after that as a
// second row

.sidebar-lowering {
  padding-top: 60px;
}

.sidebar-lowering-sort {
  padding-top: 20px;
}

.field-lowering {
  padding-top: 30px;
}

// Holdings list (repository/index)

.list-menu {

  ul {

    border-top: 1px solid #999;
    margin: 0;
    list-style-type: none;
    background-color: #eee;

    a {
      display: block;
      padding: 4px;
      .text-overflow();
      &:hover {
        background-color: rgba(0, 0, 0, .20);
      }
    }

  }

  .more {
    padding: 4px;
    border-top: 1px solid #999;
    i {
      margin-right: 4px;
    }
    a {
      text-align: center;
      display: block;
      color: @grayDarker;
    }
  }

  .nav-list > li > a {
    text-shadow: none;
  }

}

// Sidebar widget (used in uploadLimit)
// It's similar to .list-menu, we should merge them?

.sidebar-widget {

  h3 {
    border-bottom: 1px solid @grayLight;
    margin-bottom: 0;
  }

  div {
    padding: 10px;
  }

  input[type=radio], input[type=checkbox] {
    margin-top: 3px;
  }

}

// Content

@borderOutlineColor: lighten(@grayLight, 25%);
@borderLineColor: lighten(@grayLight, 35%);

#content {

  background-color: @white;
  border: 1px solid @borderOutlineColor;
  .border-radius(4px);
  .box-shadow(0 1px 1px rgba(0, 0, 0, .2));

  // Section title
  h2 {
    font-size: @baseFontSize * 1.10;
    line-height: 38px;
    color: @orange;
    border-top: 1px solid @borderLineColor;
    border-bottom: 1px solid @borderLineColor;
    margin: 0;
    padding: 0 10px;
  }

  // Title with link
  section > a {
    display: block;
    position: relative;
    &:after {
      content: "»";
      position: absolute;
      top: 8px;
      right: 20px;
      font-size: @baseFontSize * 1.75;
      color: @grayLight;
      transition-property: right;
      transition-duration: 200ms;
    }
    &:hover {
      background-color: @grayLighter;
      &:after {
        color: @gray;
        text-shadow: 1px 1px 2px rgba(50, 50, 50, .25);
      }
    }
  }

  // Cancel first border
  section:first-child h2 {
    border-top: none;
  }

  p {
    margin: 0 0 10px 0;
  }

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

  li {
    margin: 0;
  }

  // Add padding to last .field
  > section .field:last-child {
      padding-bottom: 4px;
  }

}

// Fields

#content {

  .field {

    overflow: hidden;
    margin-top: -1px;

    + .field {
      border-top: 0;
    }

    > h3 {

      float: left;
      width: 28%;
      padding: 1px 1% 32767px 1%; // I wish I could understand this!
      margin: 1px 0 -32767px 0;
      text-align: right;
      line-height: 20px;

      font-weight: normal;
      font-size: 13px;
      color: @grayLight;
      border-right: 1px solid @borderLineColor;

    }

    > div {
      margin-left: 30%;
      padding: 2px 4px 2px 8px;
      line-height: 20px;
    }

    ul {
      padding-top: 1px;
    }

  }

  // Fields within fields

  .field .field {

    > h3 {
      float: none;
      width: auto;
      padding: 0;
      margin: 0;
      text-align: left;
      display: inline-block;
      border: 0;
      &:after {
        content: ': ';
      }
    }

    > div {
      margin: 0;
      padding: 0;
      display: inline-block;
    }

  }

  dt {
    font-weight: normal;
    color: @grayLight;
  }

}

// .fields in forms

form .field {
  overflow: auto !important;
  margin: 0 !important;
  h3 {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    border-right: 0 !important;
    font-weight: normal !important;
    color: @textColor !important;
    font-family: @sansFontFamily !important;
  }
  > div {
    margin: 0 0 @baseLineHeight/2 0 !important;
    padding: 0 !important;
    color: @grayLight;
  }
}

// Tooltips
// It needs some refactor

form .section,
.form-item
{
  position: relative;
}

.description-left,
.description-right
{
  background: @grayLighter;
  color: @black;
  .border-radius(4px);
  border: 1px solid @grayLight;
  padding: 1em;
  display: none;
  position: absolute;
  top: 0;
  width: 156px;
  z-index: 1;
}

.description-bottom
{
  .border-radius(4px);
  padding: 4px 8px;
  background-color: darken(@grayLighter, 5%);
  margin-bottom: 1em;
}

.description-left
{
  margin-right: 3em;
  right: 100%;
}

.description-right
{
  left: 100%;
  margin-left: 3em;
}

div.description-dialog {

  position: absolute;
  color: #444;
  left: -200px;
  width: 156px;
  padding: 4px 8px;
  background-color: #def;
  .border-radius(4px);
  z-index: 10750;
}

// Contact information (.field)

.vcard > .field:last-child > div {
  // Add bottom border when multiple contacts
  border-bottom: 1px solid @borderLineColor;
}

section .vcard:last-child > .field:last-child > div {
  border-bottom: 0;
}

.vcard .agent {
  color: @orange;
}

.vcard .primary-contact {
  color: @grayDarker;
  text-transform: lowercase;
  font-variant: small-caps;
  padding-left: 8px;
}

.street-address {
  display: block !important;
}

// Static map under place
.static-map {
  display: block;
  margin-top: 4px;
}

// Upload quota

#uploadLimitDisplay {

  .usageBar,
  .usageBar > div {
    padding: 0; // Cancel inherited padding
    height: 20px;
    line-height: 20px;
    width: 200px;
    .box-sizing(border-box);
    .box-shadow(inset 0 -2px 3px rgba(50, 50, 50, .25));
    .border-radius(4px);
  }

  .usageBar {
    background-color: @grayLighter;
    border: 1px solid darken(@grayLighter, 20%);
    margin-bottom: 6px;
  }

  .usageBar > div {
    margin-left: -1px;
    margin-top: -1px;
  }

}

// Messages (metadata validation box)
// Pretty much like Twitter Bootstrap .alert plus .alert-*

.messages {

  background-color: @white;
  border: 1px solid @grayLighter;
  padding: @baseLineHeight / 2;
  margin-bottom: @baseLineHeight;
  .border-radius(4px);
  font-size: 12px;

  ul {
    margin-bottom: 0;
    margin-left: 0;
    list-style: none;
  }

  &.error {
    background-color: rgb(255, 237, 237);
    border: 1px solid #ac5562;
  }

  h3 {
    color: @grayDark;
    margin: 0;
  }

}

// Search result

.search-result {

  padding: 10px;
  border-bottom: 1px solid @grayLighter;
  .clearfix();

  // First result with digital objects

  &.media-summary {
    color: @orange;
    font-size: 16px;
    a {
      font-size: 12px;
      margin-left: 8px;
      color: @gray;
    }
  }

  // Each search result has an optional preview and the description block

  &.has-preview {

    .search-result-preview {
      display: inline-block;
      width: 17.8%;
      margin-right: 10px;
      vertical-align: top;
      img {
        width: 100%;
      }
    }

    .preview-container {
      max-height: 120px;
      overflow: hidden;
    }

    .search-result-description {
      width: 77%;
      display: inline-block;
      vertical-align: top;
    }

  }

  // Title

  .title,
  .title a {
    color: @linkColor;
  }

  /*
   * TODO: !important needed since to override #content { ... } props
   * Make #content { ul, p, ... } less generic (for view descriptions)
   */

  .title {
    font-size: @baseFontSize * 1.25; // Cancel #content p
    margin-bottom: 0 !important;
    .text-overflow();
  }

  // Cancel last pharagraph margin

  p:last-child {
    margin-bottom: 0 !important;
  }

  .creation-details {
    color: @grayLight;
    font-size: @baseFontSize * 0.90;
    margin-top: -10px !important;
  }

  // List of details

  .result-details {

    list-style-type: none;
    margin: 0;
    padding: 0;
    color: @grayLight;
    font-size: 90%;

    li {

      display: inline-block;

      &:after {
        content: '·';
        padding: 0px 4px;
        color: @black;
        #font > #family > .sans-serif();
      }

      &.reference-code {
        color: @orange;
      }

      &:last-child:after {
        content: none;
      }

      .publication-status {
        color: @orange;
      }

    }

  }

}

// Digital object reference

.digital-object-reference {

  background-color: @grayLighter;
  text-align: center;
  padding: @baseLineHeight;

}

// Horizontal space that takes the sort dropdown or a search bar in a browser

.header-options {
  .clearfix();
  margin-bottom: @baseLineHeight / 2;
}

// Form

.header-form {
  input[type=text] {
    width: 50%;
    display: inline;
  }
}

.search-filter {
  display: inline-block;
  padding: 3px 20px 3px 6px;
  margin-right: 4px;
  max-width: 240px;
  .text-overflow();
  position: relative;
  background-color: @white;
  color: @orange;
  border: 1px solid #d9d9d9;
  .box-shadow(1px 1px 1px rgba(0, 0, 0, .1));
  .border-radius(2px);
  a {
    position: absolute;
    right: 6px;
    color: @grayLight;
    font-size: 10px;
  }
}

// Manage button

.manage-button {

  align: right;
  text-align: right;
  padding-bottom: 10px;
}

// Sort header

#sort-header {

  float: right;
  text-align: right;
  margin-top: 2px;

  label {
    float: left;
    color: #666;
    margin-right: 6px;
  }

  // This is the item selected and shown, e.g. "Sort by: [Most recent]"
  .dropdown-selected {
    color: @blue;
    &:after {
      margin-left: 6px;
      margin-right: 4px;
      color: @gray;
      content: "\f0d7"; // icon-caret-down
      font-family: 'FontAwesome';
    }
  }

  .dropdown {

    float: left;
    vertical-align: middle;
    margin-left: 1px;
    position: relative;
    text-align: left;
    cursor: pointer;
    padding: 5px;
    margin: -5px;

    ul {
      list-style-type: none;
      position: absolute;
      right: 2px;
      top: 10px;
      border-bottom: 1px solid #ddd;
      z-index: 2;
      background: transparent;
      display: none;
      padding-top: 17px;
    }

    li {
      padding: 6px 12px;
      width: auto;
      white-space: nowrap;
      border: 1px solid #ddd;
      border-bottom: 0 none;
      background: #fff;
    }

    &:hover ul {
      display: block;
      z-index: 2;
    }

    .selected {
      text-decoration: none;
      cursor: default;
      span {
        color: #000;
      }
    }

    .pointer {
      padding: 0;
      margin: 0;
      position: absolute;
      top: -6px;
      right: 0;
      display: block;
      width: 18px;
      height: 22px;
      background: @white;
      border: 1px solid #ddd;
      border-bottom: 1px solid #fff;
      .border-radius(2px 2px 0 0);
      &:after {
        margin-left: 5px;
        color: @gray;
        content: "\f0d7"; // icon-caret-down
        font-family: 'FontAwesome';
      }
    }

  }

}

// Coverflow
// Overrides imageflow.css

#coverflow {
  padding-top: 20px;
  background-color: @black;
  background-color: rgba(0, 0, 0, .75);
  #imageflow_caption {
    color: @white;
  }
  .imageflow .caption {
    font-weight: normal;
    font-family: @sansBoldFontFamily;
  }
  img {
    cursor: pointer !important
  }
  .result-count {
    margin: 0 0 10px 0;
    color: @white;
    a {
      border: 2px solid @white;
      margin-left: 8px;
      padding: 4px;
      .border-radius(4px);
      color: @white;
      font-size: 10px;
      &:hover {
        background-color: @white;
        color: @black;
      }
    }
  }
}

// Customization of repositories

#repository-html-snippet {
}

#repository-banner {
  margin-bottom: @baseLineHeight;
  img {
    .border-radius(4px);
  }
}

// Admin pages with erros

.admin-message {

  width: 50%;
  margin: @baseLineHeight*2 auto 0 auto;
  background-color: @white;
  padding: 0 20px 20px 20px;
  .border-radius(4px);
  border: 1px solid @gray;

  h2, h3 {
    color: @grayDark;
  }

  h2 {
    border-bottom: 1px solid @grayLighter;
    margin: 0 -20px 20px -20px;
    padding: 0 20px 0 20px;
  }

  i {
    margin-right: 8px;
  }

  &#error-404 i {
    color: @red;
  }
}

// Elements under #content that need some padding

.text-section,
.delete-list {
  margin: 20px;
}

// Login page

.login {

  margin-top: 40px;
  padding: 20px 20px 0 20px;

  h1 {
    margin-top: 0px;
    font-size: 20px;
  }

  .form-actions {
    margin-top: 40px;
  }

}

// Update check

#update-check {
  background-color: #ff8800;
  color: @black;
  border-bottom: 1px solid @gray;
  text-align: center;
  span {
    display: block;
    padding: 4px;
  }
  a,
  a:hover,
  a:focus,
  a:active {
    color: @white;
  }
  a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 767px) {
  #update-check {
    margin-left: -20px;
    margin-right: -20px;
  }
}

// Plugin manager (sfPluginAdminPlugin/plugins)

.plugin-name {
  font-size: 18px;
  margin-bottom: 6px;
}

.plugin-screenshot {
  float: left;
  margin-right: 10px;
  border: 1px solid @grayLight;
  .box-shadow(2px 2px 2px rgba(0, 0, 0, .2));
}

// Password strength indicator

.password-parent {

  label,
  input {
    width: 50% !important;
  }

  > #password-strength {
    width: 42%;
    padding-right: 20px;
    float: right;
    margin: 20px 0 0 20px;

    > .password-strength-title {
      display: inline;
    }

    > #password-strength-text {
      display: none;
    }

    > #password-indicator {
      background-color: #C4C4C4;
      height: 1em;
      width: 100%;
      > div {
        height: 100%;
        width: 0%;
        background-color: #47C965;
      }
    }

  }

}

.confirm-parent {

  label,
  input {
    width: 50% !important;
  }

  > div.password-confirm {
    visibility: hidden;
    > .ok {
      color: @green;
    }
    > .error {
      color: @red;
    }
  }

}

// Responsive design

@media (min-width: 768px) {

  #facets {
    .content {
      display: block !important;
    }
  }

}

@media (max-width: 767px) {

  .breadcrumb {
    .hide;
  }

  .field-lowering {
    padding-top: 0;
  }

  #context-menu {

    margin-top: 20px;

    a {
      display: block;
      padding: 10px;
      border: 2px solid @white;
      .border-radius(4px);
      margin-bottom: 8px;
      font-size: 18px;
    }

  }

  #facets {
    margin-bottom: @baseLineHeight;
    .content {
      .hide();
    }
  }

}
