/*
=========================================================
Comments Chat
=========================================================
 * Styling for the chat module.
 *
 * Limepark AB, 2018
=========================================================*/


/*
---------------------------------------------------------
CHAT MESSAGES
--------------------------------------------------------- */

.lp-comments-chat {
  list-style: none;
  padding: 0;
}

.lp-comments-chat__entry {
  margin: 1.5rem 0 0;
  overflow: hidden;
}

.lp-comments-chat__message-text {
  background: #f2f2f2;
  border-radius: 5px;
  padding: 1.5rem 2rem;
  position: relative;
}

p.lp-comments-chat__message-text {
  margin-top: 0;
}

.lp-comments-chat__message-text:before {
  border-color: #f2f2f2 transparent transparent transparent;
  border-style: solid;
  border-width: 1rem 0.75rem 0 0.75rem;
  content: '';
  height: 0;
  left: 1rem;
  position: absolute;
  top: 100%;
  width: 0;
}

.lp-comments-chat .lp-comments-chat__message-meta,
.lp-comments-chat .lp-comments-chat__context-menu {
  margin: 1rem 1rem 0;
}

.lp-comments-chat__message-meta {
  float: left;
}

.lp-comments-chat__message-meta time {
  font-weight: 700;
}

.lp-comments-chat__context-menu {
  float: right;
  list-style: none;
  padding: 0;
}

.lp-comments-chat__context-menu li {
  display: inline;
}

.lp-comments-chat__context-menu button {
  background-color: #eee;
  border: 0;
  border-bottom: 1px solid #ccc;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.8em;
  padding: 0.5rem 1.25rem;
}

.lp-comments-chat__context-menu button:hover,
.lp-comments-chat__context-menu button:focus {
  border-color: #999;
  background-color: #ccc;
}

.lp-comments-chat__answers-list {
  clear: both;
  list-style: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
}


/*
---------------------------------------------------------
STATES
--------------------------------------------------------- */

.lp-comments-chat__entry--is-question {
  margin-right: 4rem;
}

.lp-comments-chat__entry--is-answer {
  margin-left: 4rem;
}

.lp-comments-chat__entry--is-question .lp-comments-chat__message-text {
  font-weight: 700;
}

.lp-comments-chat__entry--is-answer .lp-comments-chat__message-text {
  background-color: #CAE7E9;
}

.lp-comments-chat__entry--is-answer .lp-comments-chat__message-text:before {
  border-top-color: #CAE7E9;
  left: auto;
  right: 1rem;
}

.lp-comments-chat__entry--is-answer .lp-comments-chat__message-meta {
  float: right;
}

.lp-comments-chat__entry--is-answer .lp-comments-chat__context-menu {
  float: left;
}

.lp-comments-chat__entry--is-hidden .lp-comments-chat__message-text,
.lp-comments-chat__entry--is-hidden .lp-comments-chat__message-meta {
  opacity: 0.5;
}

.lp-comments-chat__context-menu button[data-action="delete"] {
  background-color: #c0392b;
  border-color: #902115;
  color: #fff;
  font-weight: 700;
}

.lp-comments-chat__context-menu button[data-action="delete"]:hover,
.lp-comments-chat__context-menu button[data-action="delete"]:focus {
  background-color: #962a1f;
  border-color: #420e09;
}


/*
---------------------------------------------------------
CLOSED MESSAGE
--------------------------------------------------------- */

.normal.lp-comments-chat-closed-message {
  background: #f0f0f0;
  border-bottom: 3px solid #ccc;
  font-weight: 700;
  margin: 2rem 0;
  padding: 1.5rem 2rem;
}


/*
---------------------------------------------------------
COMMENTS PORTLET OVERRIDES
--------------------------------------------------------- */

.lp-chat div .sv-comments2-main-header {
  border-bottom: 0;
  margin: 3rem 0 1.5rem;
  padding: 0;
}

.lp-chat .sv-comments2-main-header .normal,
.lp-chat .sv-comments2-main-header .subheading,
.lp-chat .sv-comments2-main-header p,
.lp-chat .sv-comments2-main-header h2,
.lp-chat .sv-comments2-main-header h3 {
  display: block;
  margin: 0;
}

.lp-chat .sv-comments2-list {
  display: none;
}

.lp-chat .sv-comments2-comments .sv-input-section {
  padding: 0;
}

.lp-comments-chat-form-help {
  text-align: right;
}
