$navbar-height: 46px;
$main-color: #875a7b;
$o-notification-info-bg-color: #fcfbea;
$o-main-text-color: #666666;

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
}

/***** Generic stuff *****/
.dropdown-toggle.o-no-caret::before,
.dropdown-toggle.o-no-caret::after {
  content: normal;
}

.dropdown-item {
  font-size: 13px;
  line-height: 20px;

  &:hover {
    background-color: #e9ecef;
  }
  &:active {
    color: #212529;
    background-color: #dee2e6;
  }
}

.o_hidden {
  display: none;
}

/***** Web Client *****/
.o_web_client {
  font-family: sans-serif;
  height: 100%;
  display: grid;
  grid-template-rows: $navbar-height auto;
}

/***** Navbar *****/
.o_navbar {
  background-color: $main-color;
  color: white;
  display: flex;
  line-height: $navbar-height;
  font-size: 13px;

  &.o_in_home {
    background-color: #bba2a5;
    a.o_title:hover {
      background-color: #bba2a5;
    }
  }

  a.o_title {
    padding: 13px 16px 16px 20px;
    color: white;
    font-size: 18px;
    text-decoration: none;
  }

  a.o_title:hover,
  a.o_menu_brand:hover {
    background-color: darken($main-color, 10);
  }

  a.o_menu_brand {
    font-size: 20px;
    color: white;
    text-decoration: none;
    padding: 1px 12px;
  }

  ul {
    list-style-type: none;
    display: inline-flex;
    height: 100%;
    margin: 0;
  }

  .o_menu_sections > li {
    margin: 0 4px;
    &:hover {
      background-color: darken($main-color, 10);
    }

    > a {
      display: block;
      height: 40px;
      font-size: 15px;
      color: white;
      text-decoration: none;
      padding: 0 10px;
    }
  }
}

/***** Home Menu *****/
.o_home_menu {
  background-color: #bba2a5;
  display: flex;
  justify-content: center;

  .o_apps {
    margin-top: 100px;
    width: 100%;
    max-width: 850px;
    display: flex;
    flex-flow: row wrap;

    .o_app {
      width: 16.6666667%;
      max-height: 110px;
      padding: 20px 0;
      text-decoration: none;
      text-align: center;
      color: white;
      text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
      font-size: 15px;
      transition: background-color 0.3s ease 0s;
      &:hover {
        background-color: darken(#bba2a5, 4);
      }

      .o_app_icon {
        max-width: 70px;
        width: 80%;
        margin: auto;
        box-shadow: 0 8px 0 -10px black;
      }
    }
  }
}

/***** Notifications *****/
.o_notification_container {
  position: absolute;
  width: 300px;
  right: 5px;
  top: $navbar-height;
  bottom: 0;

  .o_notification {
    padding: 0;
    margin: 5px 0 0 0;
    background-color: $o-notification-info-bg-color;
    box-shadow: 0px 0px 5px 1px $o-main-text-color;
    position: relative;

    .o_close {
      position: absolute;
      top: 5px;
      right: 5px;
      color: rgba(0, 0, 0, 0.3);
      text-decoration: none;
    }

    .o_notification_title {
      display: flex;
      align-items: center;

      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      padding: 10px 10px 10px 20px;

      font-weight: bold;

      .o_icon {
        display: inline-block;
        margin-right: 20px;
        color: rgba(0, 0, 0, 0.3);
      }
    }
    .o_notification_content {
      padding: 10px;
    }
  }
}

/***** Discuss *****/
.o_discuss {
  padding: 20px;
  font-size: 15px;

  button {
    padding: 5px;
  }
}

/***** Loading indicator *****/
.o_loading {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1051; // lol...
  background-color: $main-color;
  color: white;
  padding: 4px;
  font-size: 14px;
}
