/*
 * Copyright (c) 2018, 2023 Eclipse Foundation, Inc.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * Contributors:
 *   Christopher Guindon <chris.guindon@eclipse-foundation.org>
 *   Olivier Goulet <olivier.goulet@eclipse-foundation.org>
 * 
 * SPDX-License-Identifier: EPL-2.0
*/

// Classes styles
// css classes for page formating and other utilities.

@import "classes-blocks.less";
@import "classes-colors.less";
@import "classes-grid.less";
@import "classes-flex.less";
@import "classes-lists.less";
@import "classes-padding-margin.less";
@import "classes-shapes.less";
@import "classes-typography.less";

//== Sizing and Spacing

// Generates margin and padding classes from 0 to 60px in vertical and
// horizontal direction.
// E.g. .padding-x-0, .padding-x-10, .padding-x-20, ... .padding-x-60
.generate-layout-classes(@index) when (@index <= 60) {
  .padding-x-@{index} {
    padding-left: @index * 1px;
    padding-right: @index * 1px;
  }

  .padding-y-@{index} {
    padding-top: @index * 1px;
    padding-bottom: @index * 1px;
  }

  .margin-x-@{index} {
    margin-left: @index * 1px;
    margin-right: @index * 1px;
  }

  .margin-y-@{index} {
    margin-top: @index * 1px;
    margin-bottom: @index * 1px;
  }
  
  .generate-layout-classes(@index + 10);
}

.generate-layout-classes(0);

.margin-x-auto {
  margin-left: auto;
  margin-right: auto;
}

//== Colors
.bg-secondary {
  background-color: @brand-secondary;
}

//== Animations
.fade-anim:hover {
  zoom: 1;
  filter: alpha(opacity=50);
  opacity: 0.5;
  -webkit-transition: opacity .15s ease-in-out;
  -moz-transition: opacity .15s ease-in-out;
  -ms-transition: opacity .15s ease-in-out;
  -o-transition: opacity .15s ease-in-out;
  transition: opacity .15s ease-in-out;
}

//== Layout

// Offset
.footer-offset {
  margin-bottom: @footer-offset-margin-bottom;
}

//== Components 

// Tags
.solstice-tags {
  line-height: 2em;
  a {
    font-size: 0.85em;
    background-color: @eclipse-highlight-grey;
    border-bottom: 2px solid #dfdfdf;
    margin: 2px;
    padding: 0 5px 2px 5px;
  }
}

img.desaturate {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}

// Tables
.table-layout-fixed {
  table-layout: fixed;
}

.table.table-solstice {
  th {
    background: @brand-info;
    color: @white;
    vertical-align: middle;
    &:nth-child(even) {
      background: #40bbdc;
    }
  }
}

.deprecated #novaContent {
  background: url("../../images/template/bg-deprecated.gif") center 75px no-repeat ! important;
}

// Forms
.form-control:focus {
  .box-shadow (none);
  border-color: @brand-warning;
}

.textfield-underline {
  border-top:none;
  border-left:none;
  border-right:none;
  border-bottom:1px solid inherit;
  background-color:transparent;
  border-radius:0;
  box-shadow:none;
  margin:10px auto;
  color: inherit;
  // Do not group these rules
  &:-moz-placeholder { /* Firefox 18- */
    color: inherit;
  }
  &::-moz-placeholder {  /* Firefox 19+ */
    color: inherit;
  }
  &:-ms-input-placeholder {
    color: inherit;
  }
  &::-webkit-input-placeholder {
    color: inherit;
  }
}

.hidden-label{
  label.control-label{
    .sr-only;
  }
}

// loading spinner container + styling
.solstice-loading {
  padding: @solstice-loading-padding;
  text-align: center;
}
.solstice-loading > i.fa {
  font-size: @solstice-loading-size;
}

.dropdown-menu li a {
  background-color: #fff;
  &:hover{
    background-color: #efefef;
  }
  &.active {
    background-color: #efefef;
  }
}

//== Resets

.border-reset{
  border:0 !important;
}

.link-unstyled,
.link-unstyled:visited,
.link-unstyled:link,
.link-unstyled:focus,
.link-unstyled:hover {
    color: inherit;
    text-decoration: inherit;
}
