/* GLOBAL */

th {
  text-align: right;
}

.module {
  h2,
  caption {
    text-align: right;
  }

  ul,
  ol {
    margin-left: 0;
    margin-right: 1.5em;
  }
}

.viewlink,
.addlink,
.changelink,
.deletelink {
  padding-left: 0;
  padding-right: 16px;
  background-position: 100% 1px;
}

.object-tools {
  float: left;
}

thead th:first-child,
tfoot td:first-child {
  border-left: none;
}

/* LAYOUT */

#user-tools {
  right: auto;
  left: 0;
  text-align: left;
}

div.breadcrumbs {
  text-align: right;
}

#content-main {
  float: right;
}

#content-related {
  float: left;
  margin-left: -300px;
  margin-right: auto;
}

.colMS {
  margin-left: 300px;
  margin-right: 0;
}

/* SORTABLE TABLES */

table thead th.sorted .sortoptions {
  float: left;
}

thead th.sorted .text {
  padding-right: 0;
  padding-left: 42px;
}

/* dashboard styles */

.dashboard .module table td a {
  padding-left: 0.6em;
  padding-right: 16px;
}

/* changelists styles */

.change-list .filtered table {
  border-left: none;
  border-right: 0px none;
}

#changelist-filter {
  border-left: none;
  border-right: none;
  margin-left: 0;
  margin-right: 30px;

  li.selected {
    border-left: none;
    padding-left: 10px;
    margin-left: 0;
    border-right: 5px solid var(--hairline-color);
    padding-right: 10px;
    margin-right: -15px;
  }
}

#changelist table tbody {
  td:first-child,
  th:first-child {
    border-right: none;
    border-left: none;
  }
}

/* FORMS */

.aligned label {
  padding: 0 0 3px 1em;
  float: right;
}

.submit-row {
  text-align: left;

  p.deletelink-box {
    float: right;
  }

  input.default {
    margin-left: 0;
  }
}

.vDateField,
.vTimeField {
  margin-left: 2px;
}

.aligned .form-row input {
  margin-left: 5px;
}

form {
  .aligned {
    p.help,
    div.help {
      clear: right;
    }

    ul {
      margin-right: 163px;
      margin-left: 0;
    }
  }

  ul.inline li {
    float: right;
    padding-right: 0;
    padding-left: 7px;
  }
}

input[type="submit"].default,
.submit-row input.default {
  float: left;
}

fieldset .fieldBox {
  float: right;
  margin-left: 20px;
  margin-right: 0;
}

.errorlist li {
  background-position: 100% 12px;
  padding: 0;
}

.errornote {
  background-position: 100% 12px;
  padding: 10px 12px;
}

/* WIDGETS */

.calendarnav-previous {
  top: 0;
  left: auto;
  right: 10px;
}

.calendarnav-next {
  top: 0;
  right: auto;
  left: 10px;
}

.calendar caption,
.calendarbox h2 {
  text-align: center;
}

.selector {
  float: right;

  .selector-filter {
    text-align: right;
  }
}

.inline-deletelink {
  float: left;
}

form .form-row p.datetime {
  overflow: hidden;
}

.related-widget-wrapper {
  float: right;
}

/* MISC */

.inline-related h2,
.inline-group h2 {
  text-align: right;
}

.inline-related h3 span.delete {
  padding-right: 20px;
  padding-left: inherit;
  left: 10px;
  right: inherit;
  float: left;

  label {
    margin-left: inherit;
    margin-right: 2px;
  }
}
