/*
 * Licensed 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.
 */

@import "theme-mixin";

:host {
  display: block;
  padding: 0 4px;
}

.themeMixin({

  .paragraph {
    background: @component-background;
    border: 1px solid @border-color-split;
    box-shadow: @card-shadow;
    padding: 32px 12px 12px 12px;
    position: relative;

    &.focused {
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.46);
    }

    zeppelin-notebook-paragraph-code-editor + zeppelin-notebook-paragraph-dynamic-forms {
      margin-top: 24px;
    }

    zeppelin-notebook-paragraph-progress + zeppelin-notebook-paragraph-dynamic-forms {
      margin-top: 24px;
    }

    &.simple {
      box-shadow: none;
      border-color: transparent;

      zeppelin-notebook-paragraph-control, zeppelin-notebook-paragraph-footer {
        visibility: hidden;
      }

      &:hover {
        border: 1px solid @border-color-split;
        box-shadow: @card-shadow;

        zeppelin-notebook-paragraph-control, zeppelin-notebook-paragraph-footer {
          visibility: visible;
        }
      }
    }

    &.report {
      &:hover {
        box-shadow: none;
        border-color: transparent;

        zeppelin-notebook-paragraph-control, zeppelin-notebook-paragraph-footer {
          visibility: hidden;
        }
      }
    }

    zeppelin-notebook-paragraph-control {
      position: absolute;
      right: 12px;
      top: 8px;
      z-index: 10;
    }
  }
});
