/*
 * Copyright (c) 2013-2018 the original author or authors.
 *
 * Licensed under the MIT License (the "License");
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at
 *
 *     http://www.opensource.org/licenses/mit-license.php
 *
 * 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. 
 */

.treemap-widget {
    overflow-y: hidden;
    overflow-x: hidden;
    height: 100%;

    .treemap {

        text {
            pointer-events: none;
        }

        rect {
            stroke: #fff;
            stroke-width: 1px;

            &.parent {
                stroke-width: 2px;
            }
        }

        .grandparent {

            &:hover rect {
                fill: darkgrey;
            }

            text {
                font-weight: bold;
            }

            rect {
                stroke-width: 2px;
                cursor: pointer;
            }

            .icon {
                font-family: FontAwesome;
            }
        }

        .legend {
            rect {
                stroke-width: 0px;
            }

            text {
                text-anchor: middle;
                pointer-events: auto;
                font-size: 12px;
                font-family: sans-serif;
                fill: black;
            }
        }

        .children {
            rect.parent {
                opacity: 1;
                cursor: pointer;
            }

            rect.child {
                opacity: 0;
            }

            &:hover {
                rect.child {
                    opacity: 1;
                    stroke-width: 1px;
                }
                rect.parent {
                    opacity: 0;
                }
            }
        }

        /* Overrides for color-less widget */
        svg.monochrome {
            .children:hover {
                rect.child {
                    fill: #aaa;
                }
            }
            rect.parent, rect.child {
                fill: #ddd;

                &:hover {
                    fill: #aaa;
                }
            }
        }

    }
}

.widget-noscroll .treemap-widget {
    overflow-y: hidden;
    overflow-x: hidden;
}
