/*
 * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * WSO2 Inc. licenses this file to you under the Apache License,
 * Version 2.0 (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.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.
 */

.source-view-enabled {
    height: 100%;
}

.design-view-container {
    height: 100%;
    display: flex;
}

.toggle-controls-container {
    position: absolute;
    bottom: 2%;
    right: 2%;
    z-index: 1;
}

.toggle-view-button {
    transition: 0.15s;
    font-weight: bold;
    color: white;
    background-color: #f57e30;
}

.toggle-view-button:hover {
    color: #333;
    transition: 0.15s;
}

.toggle-button-text {
    padding-left: 5px;
}

.grid-container {
    /* Temp */
    width: calc(100% - 80px);
    position: relative;
    overflow: scroll; /* This should be applied to design-view-container once the two dedicated sour view/design view buttons are removed */
    background: linear-gradient(-90deg, rgba(0, 0, 0, .03) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .03) 1px, transparent 1px),
    linear-gradient(-90deg, rgba(0, 0, 0, .03) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .03) 1px, transparent 1px),
    linear-gradient(transparent 3px, transparent 3px, transparent 78px, transparent 78px),
    linear-gradient(-90deg, transparent 1px, transparent 1px),
    linear-gradient(-90deg, transparent 3px, transparent 3px, transparent 78px, transparent 78px),
    linear-gradient(transparent 1px, transparent 1px), transparent;
    background-size: 10px 10px,
    10px 10px,
    10px 10px,
    10px 10px,
    10px 10px,
    10px 10px,
    10px 10px,
    10px 10px;
    background-color: #fff;
}

.sourceDrop{
    background-image: url("../images/source.svg");
}

.sinkDrop{
    background-image: url("../images/sink.svg");
}

.streamDrop {
    background-image: url("../images/streams.svg");
}

.tableDrop {
    background-image: url("../images/table.svg");
}

.windowDrop {
    background-image: url("../images/window.svg");
}

.triggerDrop {
    background-image: url("../images/trigger.svg");
}

.aggregationDrop {
    background-image: url("../images/aggregate.svg");
}

.functionDrop {
    background-image: url("../images/function.svg");
}

.projectionQueryDrop {
    background-image: url("../images/query.svg");
}

.filterQueryDrop {
    background-image: url("../images/filter-query.svg");
}

.windowQueryDrop {
    background-image: url("../images/window-query.svg");
}

.joinQueryDrop {
    background-image: url("../images/join-query.svg");
}

.patternQueryDrop {
    background-image: url("../images/pattern-query.svg");
}

.sequenceQueryDrop {
    background-image: url("../images/sequence-query.svg");
}

/*
    Dropped Elements corresponding to their toolbox elements
*/

.streamDrop, .tableDrop, .windowDrop, .triggerDrop, .aggregationDrop, .projectionQueryDrop, .filterQueryDrop,
.windowQueryDrop, .joinQueryDrop, .patternQueryDrop, .sequenceQueryDrop, .sourceDrop, .sinkDrop, .functionDrop {
    border-radius: 0.5em;
    opacity: 0.8;
    width: 60px;
    height: 40px;
    line-height: 80px;
    cursor: pointer;
    text-align: center;
    z-index: 20;
    position: absolute;
    background-size: 60px 40px;
    background-repeat: no-repeat;
    color: black;
    font-family: helvetica, sans-serif;
    padding: 0.5em;
    font-size: 0.9em;
    -webkit-transition: -webkit-box-shadow 0.15s ease-in;
    -moz-transition: -moz-box-shadow 0.15s ease-in;
    -o-transition: -o-box-shadow 0.15s ease-in;
    transition: box-shadow 0.15s ease-in;
}

.partitionDrop {
    border: 1px solid #346789;
    width: 250px;
    height: 250px;
    border-radius: 0.5em;
    opacity: 0.8;
    line-height: 80px;
    cursor: move;
    text-align: center;
    z-index: 1;
    position: absolute;
    background-color: transparent;
    color: black;
    font-family: helvetica, sans-serif;
    font-size: 0.9em;
    -webkit-transition: -webkit-box-shadow 0.15s ease-in;
    -moz-transition: -moz-box-shadow 0.15s ease-in;
    -o-transition: -o-box-shadow 0.15s ease-in;
    transition: box-shadow 0.15s ease-in;
    box-sizing: border-box;
}

/*
    Element Divisions added as classes when the element is appended
*/
.title {
    padding: 10px;
    cursor: move;
}

.connection {
    -moz-border-radius: 50px;
    -webkit-border-radius: 50px;
    border-radius: 50px;
    font-size: 10px;
    text-align: center;
    cursor: pointer;
    width: 10px;
    height: 10px;
    margin-left: -10px;
    margin-top: 80px;
    border: 1px solid darkblue;
    background-color: darkblue;
}

.property {
    float: left;
    margin-top: 10px;
    background: #f4f4f4;
    border: 1px solid #aaaaaa;
    height: 800px;
    overflow-y: scroll;
    overflow-x: scroll;
}

/*
*Styles for the configuration icons
*/
.element-prop-icon, .element-conn-icon, .element-close-icon {
    float: right;
    width: 26px;
    height: 26px;
    background-color: transparent;
    border: 1px solid transparent;
    margin-top: -65px;
    cursor: pointer;
    color: red;
    border-radius: 40px;
}

.element-prop-icon {
    margin-right: 25px;
}

.element-conn-icon {
    margin-right: 50px;
}

.element-close-icon {
    margin-right: 0;
}

input {
. form-control input-md;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.disableContainer {
    pointer-events: none;
    opacity: 0.4;
}

table {
    border: 2px solid transparent;
}

td {
    padding: 5px;
    border: 1px solid transparent;
}

.queryDiv {
    margin: 20px 0 20px 0;
    width: 600px;
    box-shadow: 3px 4px 5px 6px #707070;
}

.simpleQueryLabel, .windowStreamLabel {
    background-color: #565656;
    text-align: center;
    margin: 20px 0 20px 0;
    color: transparent;
    text-shadow: 0 2px 3px rgba(255, 255, 255, 0.3);
    -webkit-background-clip: text;
}

.connectorInStream, .connectorInTable, .connectorInWindow, .connectorInTrigger, .connectorInAggregation,
.connectorInQuery, .connectorInPatternQuery, .connectorInSequenceQuery, .connectorInJoinQuery, .connectorInSink {
    float: left;
    margin-top: -33%;
    margin-left: -13px;
}

.connectorOutStream, .connectorOutTable, .connectorOutWindow, .connectorOutTrigger, .connectorOutAggregation,
.connectorOutQuery, .connectorOutPatternQuery, .connectorOutSequenceQuery, .connectorOutJoinQuery, .connectorOutSource {
    float: right;
    margin-top: -33%;
    margin-right: -13px;
}

.connectorIn {
    float: left;
    margin-top: -37%;
    margin-left: -13px;
}

.connectorOut {
    float: right;
    margin-top: -37%;
    margin-right: -13px;
}

.connectorInPart {
    margin-left: -5px;
    margin-top: 20px;
    width: 15px;
    height: 15px;
    border: 1px solid darkblue;
    background-color: darkblue;
}

.connectorStream {
    float: right;
    margin-top: 25%;
    margin-right: -10%;
}

.aggregationNameNode, .triggerNameNode, .windowNameNode, .tableNameNode, .streamNameNode, .queryNameNode,
.partitionNameNode, .patternQueryNameNode, .joinQueryNameNode, .sequenceQueryNameNode, .sourceNameNode, .sinkNameNode,
.functionName {
    width: inherit;
    height: inherit;
    background-color: transparent;
    border: 1px solid transparent;
    margin-top: -10px;
    font-weight: bolder;
}

/* Window Stream */

.checkboxStyleWindow {
    float: right;
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: 1px solid transparent;
    margin-top: -82px;
    margin-right: 0;
    cursor: pointer;
    color: red;
    border-radius: 40px;
    padding-left: 10px;
    padding-top: 4px;
}

.design-view-form-content .well {
    background: transparent;
    padding: 0;
}

.design-view-form-content {
    padding: 10px;
}

select.form-control,
.btn-group > div {
    background: #2f2f2f !important;
}

.design-view-form-content th {
    color: #fff;
}
