/*
    JSPWiki - a JSP-based WikiWiki clone.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); fyou may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/
/*
Dynamic Style: Viewer.Carousel

DOM Structure:
    (start code)
    div.carousel
        div.carousel-progress
        ol.carousel-indicators
            li.active
            li
        div.carousel-inner(.spin)        //img, object or iframe element is inserted here
            div.item.active
                <img..>
                div.carousel-caption
            div.item
        a.controls.next
        a.controls.prev
    (end)
*/

//reuse bootstrap/carousel.less
.carousel {

    .viewport;
    width:auto;
    //overflow:hidden;

    //reveal indicators even on white backgrounds.
    &:hover .carousel-indicators li { .box-shadow(@carousel-text-shadow); }

    //only show the caption when hovering the mouse
    .carousel-caption { .opacity(0); .transition(.6s ease); }
    &:hover .carousel-caption { .opacity(1); }

    // reuse slimbox .controls, iso .carousel-controls , with simplified styling
    .controls {
        &.prev { left: .5em; }
        &.next { right: .5em; }
    }
    &:hover .controls  { .opacity(@slimbox-control-opacity); }

}

.carousel-progress {
    position:absolute;
    bottom:0;
    background:fade(@red,50%);
    height:3px;
    z-index:1;
    width:0%;
}
.sliding > .carousel-progress {
    .transition(width 10s linear);
    width:100%;
}
