/**
 * $JA#COPYRIGHT$
 */


// ------------------------------------------------------
// FORM ELEMENTS
// ------------------------------------------------------

//
// GENERIC STYLES (forms.less)
// --------------------------------------------------

form {
}

fieldset {
}

legend {
}

label {
}


// Adjust output element
output {
}


// Common form controls
// --------------------
// Shared size and type resets for form controls. Apply `.form-control` to any
// of the following form controls:
//
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.form-control,
.inputbox {
  border-radius: 0;
  box-shadow: none;

  // Customize the `:focus` state to imitate native WebKit styles.
  .form-control-focus();

  // Placeholder
  .placeholder();

  // Disabled and read-only inputs
  &[disabled],
  &[readonly],
  fieldset[disabled] & {
  }

  // Reset height for `textarea`s
  textarea& {
    height: auto;
  }
}


// Form groups
// -----------
.form-group {
  margin-bottom: @t3-global-margin;
}


// Checkboxes and radios
// ---------------------
.radio,
.checkbox {
  label {
    display: inline;
  }
}

.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
}

.radio + .radio,
.checkbox + .checkbox {
}

// Radios and checkboxes on same line
.radio-inline,
.checkbox-inline {
}

.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
}


// Form control sizing
// -------------------
.input-sm {
}

input.input-lg {
  height: 58px;
  padding: 15px 20px;
}


// Form control feedback states
// ----------------------------
// Apply contextual and semantic states to individual form controls.

// Warning
.has-warning {
}
// Error
.has-error {
}
// Success
.has-success {
}


// Static form control text
// ------------------------
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.

.form-control-static {
  margin-bottom: 0; // Remove default margin from `p`
}


// Help text
// ---------
// Apply to any element you wish to create light text for placement immediately
// below a form control. Use for general help, formatting, or instructional text.

.help-block {
}



// Inline forms
// ------------
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.

.form-inline {

  @media (min-width: @screen-sm) {

    .form-group  {
      display: inline-block;
    }

    // In navbar-form, allow folks to *not* use `.form-group`
    .form-control {
      display: inline-block;
    }

    // Remove default margin on radios/checkboxes that were used for stacking, and
    // then undo the floating of radios and checkboxes to match (which also avoids
    // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
    .radio,
    .checkbox {
    }

    .radio input[type="radio"],
    .checkbox input[type="checkbox"] {
      float: none;
    }

  }

  // End
}


// Horizontal forms
// ----------------
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.

.form-horizontal {

  // Consistent vertical alignment of labels, radios, and checkboxes
  .control-label,
  .radio,
  .checkbox,
  .radio-inline,
  .checkbox-inline {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: (@padding-base-vertical + 1); // Default padding plus a border
  }

  // Make form groups behave like rows
  .form-group {
  }

  .form-control-static {
    padding-top: (@padding-base-vertical + 1);
  }

}


//
// INPUT GROUPS (input-groups.less)
// --------------------------------------------------
// T3 Note: See "bootstrap/input-group.less"
//  if you want to style this components



//
// BUTTONS (buttons.less)
// --------------------------------------------------

// Base styles
// --------------------------------------------------

// Core styles
.btn {
  padding: (@t3-global-padding / 4) @t3-global-padding;
  font-size: @font-size-base;
  text-transform: uppercase;
  box-shadow: none;

  // Desktop
  @media screen and (min-width: @screen-md) {
    padding: (@t3-global-padding / 2.5) (@t3-global-padding * 1.5);
  }
  
  &:focus {
  }

  &:hover,
  &:focus {
    box-shadow: none;
  }

  &:active,
  &.active {
  }

  &.disabled,
  &[disabled],
  fieldset[disabled] & {
  }

}


// Alternate buttons
// --------------------------------------------------
.btn-default {
}

.btn-primary {
}

// Warning appears as orange
.btn-warning {
}

// Danger and error appear as red
.btn-danger {
}

// Success appears as green
.btn-success {
}

// Info appears as blue-green
.btn-info {
}

// T3 Note: Inverse appears as dark-grey
.btn-inverse {
  .button-variant(@btn-inverse-color; @btn-inverse-bg; @btn-inverse-border);

  &:hover, &:focus, &:active {
    .opacity(0.8);
  }
}


// Bonus Button Styles
// --------------------------------------------------

// Rounded Button
// -------------------------
.btn-rounded {
  border-radius: @btn-rounded-radius;
  padding-left: @t3-global-padding;
  padding-right: @t3-global-padding;
  text-transform: uppercase;

  &.btn-lg {
    border-radius: @btn-rounded-lg-radius;
    font-size: @font-size-large;
    padding: 20px @t3-global-padding*2;
  }
}

.btn-rounded-inverse {
  background-color: @gray-lighter;
  .button-variant(@btn-inverse-color; @btn-inverse-bg; @btn-inverse-border);

  &:hover, &:focus, &:active {
    background: @btn-inverse-bg;
    .opacity(0.8);
  }
}

// Ghost Buttons
// -------------------------
.btn-border {
  background: transparent;
  border: @btn-border-width solid @gray;
  color: @gray;

  &:hover, &:focus, &:active {
    background: @brand-primary;
    border-color: @brand-primary;
    color: @white;
  }

  &.btn-primary {
    border-color: @brand-primary;
    color: @brand-primary;

    &:hover, &:focus, &:active {
      color: @white;
    }
  }

  &.btn-danger {
    border-color: @brand-danger;

    &:hover,
    &:focus {
      background: @brand-danger;
      border-color: @brand-danger;
      color: @white;
    }
  }

  &.btn-warning {
    border-color: @brand-warning;

    &:hover,
    &:focus {
      background: @brand-warning;
      border-color: @brand-warning;
      color: @white;
    }
  }

  &.btn-success {
    border-color: @brand-success;

    &:hover,
    &:focus {
      background: @brand-success;
      border-color: @brand-success;
      color: @white;
    }
  }

  &.btn-info {
    border-color: @brand-info;

    &:hover,
    &:focus {
      background: @brand-info;
      border-color: @brand-info;
      color: @white;
    }
  }

  &.btn-inverse {
    .button-variant(@btn-inverse-color; @btn-inverse-bg; @btn-inverse-border);
    border: 3px solid @white;

    &:hover, &:focus, &:active {
      background: @btn-inverse-bg;
      border-color: @white;
      .opacity(0.8);
    }
  }

  &.btn-white {
    border: 3px solid @white;
    color: @white;

    &:hover, &:focus, &:active {
      background: rgba(255, 255, 255, 0.2);
      color: @white
    }
  }
}


.btn-border-inverse {
  border: 3px solid @white;
  color: @white;

  &:hover, &:focus, &:active {
    background: rgba(0,0,0,0.3);
    border-color: @white;
    color: @white;
  }
}

// Action Buttons
// -------------------------
.btn-action {
  border-radius: 26px;
  margin: 0 (@t3-global-margin / 4);
  padding: (@t3-global-padding / 2) (@t3-global-padding * 2);
  position: relative;
}


// Link buttons
// --------------------------------------------------
// Make a button look and behave like a link
.btn-link {

  &,
  &:active,
  &[disabled],
  fieldset[disabled] & {
  }

  &,
  &:hover,
  &:focus,
  &:active {
  }

  &:hover,
  &:focus {
  }

  &[disabled],
  fieldset[disabled] & {
    &:hover,
    &:focus {
    }
  }

}


// Button Sizes
// --------------------------------------------------
.btn-lg {
  font-size: @t3-font-size-bigger;
  padding: 15px 30px;
  line-height: @line-height-computed;
}

.btn-sm,
.btn-small,
.btn-xs {
  font-size: @t3-font-size-smaller;
  padding: 6px 18px;
  line-height: @line-height-computed;

  // Desktop
  @media screen and (min-width: @screen-md) {
    padding: 6px 18px;
  }
}

.btn-xs {
}


// Block button
// --------------------------------------------------
.btn-block {
}

// Vertically space out multiple block buttons
.btn-block + .btn-block {
  margin-top: 5px;
}



//
// BUTTON GROUPS (button-groups.less)
// --------------------------------------------------
// T3 Note: See "bootstrap/buttons-group.less"
//  if you want to style this component




// T3 Note: We added legacy form elements to get better
// compatibility with Joomla Core.

// ------------------------------------------------------
// LEGACY FORM ELEMENTS (base-bs3/less/legacy-forms.less)
// ------------------------------------------------------


//
// GENERIC STYLES
// ------------------------------------------------------

// Common form controls
// --------------------

// Legacy class below
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.inputbox {

  // Focus states
  &:focus {}

  // Placeholder
  .placeholder();

  // Disabled and read-only inputs
  &[disabled],
  &[readonly],
  fieldset[disabled] & {
  }

  // Reset height for `textarea`s
  textarea& {
    height: auto;
  }

  // Reset Width for Legacy classes in Medium Screen
  @media screen and (min-width: @screen-sm) {
    width: auto;
  }

}

// Redefine padding for <select>
select,
select.form-control,
select.inputbox,
select.input {
  padding-right: 5px;
}


// Legacy Input Size
// -------------------
// General classes for quick sizes
.input-mini {
}

.input-small {
}

.input-medium {
}

.input-large {
}

.input-xlarge {
}

.input-xxlarge {
}



// Inline forms
// ------------
.form-inline {
}


// Horizontal forms
// ----------------
.form-horizontal {
}



//
// OTHER LEGACY CLASSES FROM BS2
// ------------------------------------------------------

// FORM ACTIONS
// ------------
// Adding the legacy "form-actions" from BS2
.form-actions {
}


// INPUT GROUPS
// ------------
// Allow us to put symbols and text within the input field for a cleaner look
.input-append,
.input-prepend {

  input,
  select,
  .uneditable-input {
    // Focus state
    &:focus {
    }
  }

  .add-on {
  }

  .active {
    background-color: lighten(@green, 30);
    border-color: @green;
  }

}

.input-prepend {

  .add-on,
  .btn {
  }

  .add-on:first-child,
  .btn:first-child {
  }

}

.input-append {

  input,
  select,
  .uneditable-input {
  }

  .add-on,
  .btn,
  .btn-group {
  }

  .add-on:last-child,
  .btn:last-child,
  .btn-group:last-child > .dropdown-toggle {
  }

}


.input-prepend.input-append {

  input,
  select,
  .uneditable-input {
  }

  .add-on:first-child,
  .btn:first-child {
  }

  .add-on:last-child,
  .btn:last-child {
  }

  .btn-group:first-child {
  }

}



//
// BUTTONS
// ------------------------------------------------------

// Lagacy Button Sizes
// --------------------------------------------------

// Large
.btn-large {
}

.btn-large [class^="icon-"],
.btn-large [class*=" icon-"] {
}

// Small
.btn-small {
}

.btn-small [class^="icon-"],
.btn-small [class*=" icon-"] {
}


// Mini
.btn-mini {
}

.btn-mini [class^="icon-"],
.btn-mini [class*=" icon-"] {
}




//
// FORM VALIDATION
// -------------------------------------------------------

// Invalid
// -----------------------
.invalid {
  border-color: @red;
}

label.invalid {
  color: @red;
}

input.invalid {
  border: 1px solid @red;
}
