/*
 * Code copied for Django admin base.css. The sorting-icons.svg is also ripped
 * off from Django admin. Since we're using the same code for displaying
 * sorting options (code copied fro Django admin's implementation with minor
 * changes) we can safely use these styles with some tweaks for it to co-exist
 * nicely with Bootstrap styles.
 */
thead th.sorted .text {
    padding-right: 42px;
}

thead th.sorted a.sortremove {
    visibility: hidden;
}

table thead th.sorted:hover a.sortremove {
    visibility: visible;
}

table thead th.sorted .sortoptions {
    float: right;
    text-align: right;
}

table thead th.sorted .sortpriority {
    font-size: .6em;
    text-align: center;
    vertical-align: 3px;
    margin-left: 1px;
    margin-right: 1px;
}

table thead th.sorted .sortoptions a {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-block;
    background: url(../img/sorting-icons.svg) 0 0 no-repeat;
    background-size: 14px auto;
}

table thead th.sorted .sortoptions a.sortremove {
    background-position: 0 0;
}

table thead th.sorted .sortoptions a.sortremove:after {
    content: '\\';
    position: absolute;
    top: -6px;
    left: 3px;
    font-weight: 200;
    font-size: 18px;
    color: #999;
}

table thead th.sorted .sortoptions a.sortremove:focus:after,
table thead th.sorted .sortoptions a.sortremove:hover:after {
    color: #447e9b;
}

table thead th.sorted .sortoptions a.sortremove:focus,
table thead th.sorted .sortoptions a.sortremove:hover {
    background-position: 0 -14px;
}

table thead th.sorted .sortoptions a.ascending {
    background-position: 0 -28px;
}

table thead th.sorted .sortoptions a.ascending:focus,
table thead th.sorted .sortoptions a.ascending:hover {
    background-position: 0 -42px;
}

table thead th.sorted .sortoptions a.descending {
    top: 1px;
    background-position: 0 -56px;
}

table thead th.sorted .sortoptions a.descending:focus,
table thead th.sorted .sortoptions a.descending:hover {
    background-position: 0 -70px;
}    

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