/*
 * Copyright (c) 2008-2018 Haulmont.
 *
 * 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.
 *
 */

/**
 * Notification border radius
 */
$c-notification-border-radius: 3px !default;

@mixin havana-notification($primary-stylename: v-Notification) {

  .#{$primary-stylename} {
    border-radius: $c-notification-border-radius;
    cursor: pointer;
    max-width: 80%;
    opacity: 0.9;
    overflow: hidden;
    padding: $v-unit-size / 3 $v-unit-size / 2;
    -moz-border-radius: $c-notification-border-radius;
    -webkit-border-radius: $c-notification-border-radius;

    h1 {
     font-weight: bold;
     padding: $v-unit-size / 4 0;
    }
  }

  .#{$primary-stylename}-description {
    max-width: none;
  }

  .#{$primary-stylename}.humanized {
    background-color: #818e92;
    color: #ffffff;

   h1, p{
    color: #ffffff;
   }
  }

  .#{$primary-stylename}.warning {
    background: #fff1e4;
    border: 2px solid #ffaa90;
    border-radius: 5px;
    color: #dd3400;
    opacity: 1;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;

    .#{$primary-stylename}-caption,
    .#{$primary-stylename}-description,
    h1, p{
     color: #dd3400;
    }
  }

 .#{$primary-stylename}.error {
    background: #f23d00 url(images/close-error.png) no-repeat right 5px;
    border: 3px solid #c30000;
    border-radius: 6px;
    color: #ffffff;
    padding-right: 35px;
    text-align: left;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;

    h1, p {
     color: #ffffff;
    }
  }

 .#{$primary-stylename}.tray {
   background: #575e60;
   color: #e4e7ea;
   max-width: 50%;
   padding: 8px;

   h1 {
     background: #3b4245;
     border-radius: $c-notification-border-radius;
     color: #ffffff;
     margin: 0;
     text-align: left;
     padding: $v-unit-size / 4 $v-unit-size / 2;
     -moz-border-radius: $c-notification-border-radius;
     -webkit-border-radius: $c-notification-border-radius;
   }

   p {
     color: #e4e7ea;
     margin: 8px 10px 5px
   }

   .#{$primary-stylename}-caption ~ .#{$primary-stylename}-description {
     margin: 8px 10px 5px;
   }
 }

 .#{$primary-stylename}.system {
   background-color: #ff0a0a;
   color: #ffffff;
   filter: alpha(opacity=70);
   max-width:100%;
   opacity: 0.7;

   u {
    text-decoration: underline;
   }
 }
}