/*
    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.
*/
/*
Style: Attachments

DOM Structure:
(start code)
form#uploadform
    ul.list-group
        li.droppable
            a.hidden.delete.btn.btn-danger Delete
            label
                span.canDragAndDrop
            input[type="file"][disabled=""][name="file0"][id=""]
        li.active
            a.hidden.delete.btn.btn-danger Delete
            span file-name-1
            input.done[type="file"][name="file1"][id=""]
        li.active
            a.hidden.delete.btn.btn-danger Delete
            span file-name-2
            input.done[type="file"][name="file2"][id=""]
    (end)
*/

//loading animation
#uploadform input[type=submit]:focus {
    .progress-striped .progress-bar;
    .progress.active .progress-bar;
}
#uploadform ul.list-group {

    margin-bottom:0;
    vertical-align:top;

    //hide the input[type=file] elements
    li input[type=file] {
        position:absolute;
        top:0;
        right:0;
        width:100%;height:100%;
        cursor:pointer;
        opacity:0;
    }

    li.droppable {
        color: @list-group-active-color;
        background-color: @list-group-active-bg;
        border-color: @list-group-active-border;
        text-align:center;

        * { color: inherit; }

        &.disabled { .btn.disabled; }

        &.active {
            .progress-striped .progress-bar;
            .progress.active .progress-bar;
        }
    }
    a.delete { position:relative; z-index:2; } //should be on top of the input block
    li label { display:inline; font-weight:normal; }
    li label .badge { font-size:80%; font-weight:normal;}
}

form.legacy .canDragAndDrop { .hide; }

.attach-name {
    max-width: 200px;
    //white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
