/* Styles for LCG widgets implemented in widgets.py and lcg.js */

/* FoldableTree widget */

.foldable-tree-widget {
    line-height: 1.3em;
}
.foldable-tree-widget ul {
    display: block;
    list-style-type: none;
    padding: 2px 2px 2px 5px;
    margin: 0;
}
.foldable-tree-widget ul ul {
    padding: 0 0 0 13px;
}
.foldable-tree-widget li {
    width: 100%;
    padding: 0;
    position: relative;
}
.foldable-tree-widget .collapsed ul {
    display: none;
}
.foldable-tree-widget .item {
    display: block;
    clear: both;
    text-decoration: none;
    margin: 1px;
}
.foldable-tree-widget .item .icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    float: left;
    position: relative;
    top: .5em;
    background: url(lcg-icons.png) 0 -40px no-repeat;
}
.foldable-tree-widget .foldable > .item .icon {
    background-position: 0 -28px;
}
.foldable-tree-widget .foldable.collapsed > .item .icon {
    background-position: 0 -16px;
}
.foldable-tree-widget .item .label {
    display: block;
    padding: .2em .1em;
    margin-left: 15px;
    border-radius: 3px;
}
.foldable-tree-widget .current .label {
    background-color: #ddd;
}

.foldable-tree-widget .expander {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 0;
    box-sizing: border-box;
    width: 1px;
    height: 1px;
    vertical-align: middle;
    outline: none;
    border: 1px dotted #ccc;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    overflow: hidden;
}
.foldable-tree-widget .expander .icon {
    display: block;
    background: url(lcg-icons.png) -68px 0 no-repeat;
    width: 16px;
    height: 16px;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.foldable-tree-widget .expanded > .expander .icon {
    background-position: -68px -16px;
}
.foldable-tree-widget .expander .label {
    /* Hide the label from the screen and leave it present for VoiceOver, but work around
       VO scrolling the expander when VO cursor moves over it. (as with text-indent) */
    display: block;
    width: 1px;
    height: 1px;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}
@media only screen and (max-width: 600px) {
    .foldable-tree-widget .expander {
        opacity: 1;
        width: 1.7em;
        height: 1.7em;
    }
    .foldable-tree-widget .item .label {
        padding-right: 1.8em;
    }
}

.foldable-tree-widget button.toggle-menu-expansion {
    padding: 0;
    margin: 0;
    border: none;
    width: 12px;
    height: 12px;
    background: url(lcg-icons.png) 0 -16px no-repeat;
}
.foldable-tree-widget button.toggle-menu-expansion.expanded {
    background-position: 0 -28px;
}

/* Notebook widget */

.notebook-widget ul.notebook-switcher {
    margin: 1.6em 0 1em 0;
    padding: 0;
    border-bottom: solid #777 1px;
    display: block;
}
.notebook-widget li.notebook-tab {
    display: inline-block;
    margin: 0 0 0 4px;
    padding: 0;
    line-height: 2em;
    height: 2em;
    box-sizing: border-box;
}
.notebook-widget li.notebook-tab a {
    position: relative;
    top: -1px;
    display: inline-block;
    border-radius: 4px 4px 0 0;
    border: solid #777 1px;
    border-bottom: none;
    padding: 0 .7em;
    background-color: #ddd;
    color: #000;
    font-size: 1.1em;
    font-weight: bold;
    white-space: nowrap;
    text-decoration: none;
    outline: none;
}
.notebook-widget li.notebook-tab a:focus {
    outline: rgba(0, 0, 0, .3) dotted 1px;
}
.notebook-widget li.notebook-tab a.current {
    background-color: #fff;
    padding-bottom: 1px;
}

/* Popup menu & Dropdown selection widget */

.popup-menu-ctrl-widget {
    display: inline-block;
    position: relative;
}
.popup-menu-ctrl-widget .invoke-menu {
}
.popup-menu-ctrl-widget .popup-arrow {
    display: inline-block;
    width: 16px;
    height: 12px;
    background: url(lcg-icons.png) 0px 0px no-repeat;
    position: relative;
    bottom: -1px;
    margin: 0 2px;
    text-indent: -9999px;
    text-align: left;
    overflow: hidden;
    outline: none;
}
.popup-menu-widget, .dropdown-selection-widget {
    position: absolute;
    width: auto;
    padding: 0;
    border: 1px solid #aaa;
    z-index: 240;
    line-height: 1.6em;
}
.popup-menu-widget {
    background-color: #ddd;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    box-shadow: 1px 1px 12px rgba(0, 0, 0, .6);
    -moz-box-shadow: 1px 1px 12px rgba(0, 0, 0, .6);
    -webkit-box-shadow: rgba(0, 0, 0, .6) 1px 1px 12px;
}
.dropdown-selection-widget {
    background-color: #fff;
    border-color: #777;
    max-height: 400px;
    overflow-y: auto;
}
.popup-menu-widget ul, .dropdown-selection-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.popup-menu-widget ul li, .dropdown-selection-widget ul li {
    font-weight: normal; /* Avoid inherited bold when used inside h3 etc. */
    white-space: nowrap;
    min-width: 100px;
    margin: 0;
}
.popup-menu-widget li .icon {
    float: left;
    opacity: .6;
    margin: .3em 0;
}
.popup-menu-widget li.active .icon {
    opacity: 1;
}
.popup-menu-widget li .label.indented {
    margin-left: 22px;
    display: block;
}

.popup-menu-widget li a,
.popup-menu-widget li a:hover,
.dropdown-selection-widget li a,
.dropdown-selection-widget li a:hover {
    display: block;
    color: #777;
    padding: 5px 10px;
    text-decoration: none;
    min-height: 14px;
    outline: none;
}
.popup-menu-widget li.active a,
.dropdown-selection-widget li.active a {
    color: #000;
}
.popup-menu-widget li.active:hover {
    background-color: #fff;
}
.popup-menu-widget.keyboard-navigated li.active a:focus {
    outline: #000 dotted 1px;
}
.dropdown-selection-widget li.active a:focus {
    background-color: #3af;
}
.popup-menu-widget .close-menu {
    display: inline-block;
    position: absolute;
    top: -7px;
    right: -7px;
    width: 13px;
    height: 13px;
    overflow: hidden;
    text-indent: 20px;
    border: solid 1px #aaa;
    border-radius: 7px;
    -moz-border-radius: 7px;
    -webkit-border-radius: 7px;
    background: url(lcg-icons.png) -23px -39px no-repeat #ddd;
}

.tooltip-widget {
    position: absolute;
    top: 32px;
    left: 90px;
    width: auto;
    display: none;
    background-color: #ddd;
    background-color: rgba(220, 220, 220, .95);
    border: 1px solid #777;
    z-index: 240;
    box-shadow: 1px 1px 12px rgba(0, 0, 0, .6);
    -moz-box-shadow: 1px 1px 12px rgba(0, 0, 0, .6);
    -webkit-box-shadow: rgba(0, 0, 0, .6) 1px 1px 12px;
}

.collapsible-pane-widget .collapsible-pane-heading {
    display: inline-block;
    font-size: 1.1em;
    padding: 0;
    margin-top: .7em;
    margin-bottom: .4em;
    border: none;
}
.collapsible-pane-widget .collapsible-pane-heading,
.collapsible-section-widget .collapsible-section-heading,
.collapsible-pane-widget .pane-title {
    cursor: pointer;
}
.collapsible-section-widget .collapsible-section-heading .icon,
.collapsible-pane-widget .pane-title .icon {
    vertical-align: middle;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url(lcg-icons.png) -13px -16px no-repeat;
}
.collapsible-pane-widget .collapsible-pane-heading,
.collapsible-section-widget .collapsible-section-heading,
.collapsible-pane-widget .pane-title {
    cursor: pointer;
}
.collapsible-section-widget .collapsible-section-heading .icon,
.collapsible-pane-widget .pane-title .icon {
    margin-left: 4px;
}
.collapsible-pane-widget .pane-title a {
    text-decoration: none;
}
.collapsible-section-widget.expanded > div > div > div > .collapsible-section-heading .icon,
.collapsible-pane-widget.expanded > .pane-title .icon {
    background-position: -12px -28px;
}
.collapsible-section-widget.expanded > section > div > div > .collapsible-section-heading .icon {
    /* For unknown reasons, HTML 5 <section> needs this icon offsets. */
    background-position: -48px -37px;
}

/* Audio player displayed at the bottom of the page. */

.audio-player-widget .jp-no-solution {
    display: none;
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 2px 4px;
    background-color: #eee;
    border: 2px solid #009be3;
    color: #000;
    z-index: 9999;
}

.audio-player-widget .jp-jplayer, .audio-player-widget audio {
    width: 0;
    height: 0;
}

.audio-player-widget .jp-gui {
    position: fixed;
    bottom: 0;
    right: 0;
    border: 1px solid #ccc;
    background-color: #eee;
    color: #000;
    width: 300px;
    height: 22px;
    padding: 0;
}

.audio-player-widget button {
    display: inline-block;
    position: relative;
    top: 0;
    width: 20px;
    height: 22px;
    padding: 3px;
    margin: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    background: none;
    box-shadow: none;
    overflow: hidden;
}
.audio-player-widget button span {
    display: inline-block;
    overflow: hidden;
    text-indent: -9999px;
    background: url("lcg-icons.png") 0 0 no-repeat;
    width: 16px;
    height: 16px;
}
.audio-player-widget button:focus { outline: none; }
.audio-player-widget button::-moz-focus-inner { border: 0; }

.audio-player-widget .hidden-label {
    display: none;
}

/* Playback controls */

.audio-player-widget .play-pause span {
    background-position: -34px 0;
}
.audio-player-widget .jp-state-playing .play-pause span {
    background-position: -52px 0;
}
.audio-player-widget .fast-forward span {
    left: 0px;
    background-position: -34px -16px;
}
.audio-player-widget .rewind span {
    left: 66px;
    background-position: -52px -16px;
}

/* Progress bar */

.audio-player-widget .jp-progress {
    position: absolute;
    top: 3px;
    left: 66px;
    width: 160px;
    height: 6px;
    background-color: #ddd;
    overflow: hidden;
}
.audio-player-widget .jp-seek-bar {
    width: 0;
    height: 100%;
    cursor: pointer;
}
.audio-player-widget .jp-play-bar {
    width: 0;
    height: 100%;
    background: #009be3;
}
.audio-player-widget .jp-seeking-bg {
    background: url("jplayer-seeking.gif");
}

/* Current track, time and duration */

.audio-player-widget .status {
    position: absolute;
    top: 9px;
    left: 66px;
    width: 160px;
    font-size: 11px;
}
.audio-player-widget .jp-current-time {
    float: left;
    cursor: default;
}
.audio-player-widget .jp-duration {
    float: right;
    text-align: right;
    cursor: pointer;
}

/* Volume controls */

.audio-player-widget .jp-volume-controls {
    position: absolute;
    top: 0;
    left: 227px;
}
.audio-player-widget .jp-state-no-volume .jp-volume-controls {
    display: none;
}
.audio-player-widget .jp-volume-bar {
    overflow: hidden;
    position: absolute;
    top: 9px;
    left: 22px;
    width: 28px;
    height: 5px;
    cursor: pointer;
    background: #aaa;
}
.audio-player-widget .jp-volume-bar-value {
    width: 0;
    height: 5px;
    text-indent: -9999px;
    background: #009be3;
}
.audio-player-widget .volume-down {
    left: 0;
}
.audio-player-widget .volume-down span {
    background-position: -34px -32px;
}
.audio-player-widget .volume-up {
    left: 31px;
}
.audio-player-widget .volume-up span {
    background-position: -52px -32px;
}
