/*
 * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
 * Copyright (C) 2009 Anthony Ricaud <rik@webkit.org>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer. 
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution. 
 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
 *     its contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission. 
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Adapted from WebCore\inspector\front-end\inspector.css
 * Last Opensource Revision Referenced: 71666
 */

.data-grid {
    position: relative;
    border: 1px solid #aaa;
}

.data-grid .highlight {
    background-color: rgb(255, 230, 179);
}

.data-grid tr.selected .highlight {
    background-color: transparent;
}

.data-grid table {
    table-layout: fixed;
    border-spacing: 0;
    border-collapse: collapse;
    width: 100%;
    font-size: 10px;
    font-family: Lucida Grande, sans-serif;
}

.data-grid .data-container {
    position: absolute;
    top: 16px;
    bottom: 0;
    left: 0;
    right: 0;
    padding-right: 14px;
    overflow-x: hidden;
    overflow-y: overlay;
}

.data-grid.inline .data-container {
    position: static;
}

.data-grid th {
    text-align: left;
    background-image: url(glossyHeader.png);
    background-repeat: repeat-x;
    border-right: 1px solid rgb(179, 179, 179);
    border-bottom: 1px solid rgb(179, 179, 179);
    height: 15px;
    font-weight: normal;
    vertical-align: middle;
    padding: 0 4px;
    white-space: nowrap;
}

.data-grid th.corner {
    width: 15px;
    border-right: 0 none transparent;
}

.data-grid tr.filler {
    display: table-row !important;
    height: auto !important;
}

.data-grid tr.filler td {
    height: auto !important;
    padding: 0 !important;
}

.data-grid table.data {
    position: absolute;
    left: 0;
    top: 0;
    right: 16px;
    bottom: 0;
    height: 100%;
    border-top: 0 none transparent;
    background-image: -webkit-gradient(linear, left top, left bottom, from(white), color-stop(0.5, white), color-stop(0.5, rgb(234, 243, 255)), to(rgb(234, 243, 255)));
    -webkit-background-size: 1px 32px;
}

.data-grid.inline table.data {
    position: static;
}

.data-grid table.data tr {
    display: none;
}

.data-grid table.data tr.revealed {
    display: table-row;
}

.data-grid td {
    vertical-align: top;
    height: 12px;
    line-height: 12px;
    padding: 2px 4px;
    white-space: nowrap;
    border-right: 1px solid #aaa;
    -webkit-user-select: text;
}

.data-grid td > div, .data-grid th > div {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.data-grid .centered div {
    text-align: center;
}

.data-grid .right div {
    text-align: right;
}

.data-grid th.sortable div {
    position: relative;
}

.data-grid th.sortable:active {
    background-image: url(glossyHeaderPressed.png);
}

.data-grid th.sort-ascending, .data-grid th.sort-descending {
    border-right: 1px solid rgb(107, 140, 196);
    border-bottom: 1px solid rgb(107, 140, 196);
    background-image: url(glossyHeaderSelected.png);
    background-repeat: repeat-x;
}

.data-grid th.sortable.sort-ascending:active, .data-grid th.sortable.sort-descending:active {
    background-image: url(glossyHeaderSelectedPressed.png);
}

.data-grid th.sort-ascending > div::after {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    height: 12px;
    margin-bottom: auto;
    margin-top: auto;
    width: 8px;
    content: url(treeUpTriangleBlack.png);
}

.data-grid th.sort-descending > div::after {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    height: 8px;
    margin-bottom: auto;
    margin-top: auto;
    width: 8px;
    content: url(treeDownTriangleBlack.png);
}

body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-descending {
    background-image: url(glossyHeader.png);
    border-right: 1px solid rgb(179, 179, 179);
    border-bottom: 1px solid rgb(179, 179, 179);
}

.data-grid tr.selected {
    background-color: rgb(212, 212, 212);
    color: inherit;
}

.data-grid:focus tr.selected {
    background-color: rgb(56, 121, 217);
    color: white;
}

.data-grid-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    z-index: 500;
    cursor: col-resize;
}
