/*
| Form
*/
.ec-error {
    display: none;
    color: darkred;
}

.ec-antispam {
    display: none;
}

/*
| List of messages
*/

.ec-message {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}
.ec-message p:last-child {
    margin-bottom: 0;
}
.ec-message__meta {
    margin: 0 0 6px 0;
    line-height: 32px;
}
.ec-message__meta .ec-message__author {
    float: left;
    font-weight: bold;
}
.ec-message__meta .ec-message__date {
    float: left;
}
.ec-message__meta .ec-message__votes {
    float: right;
}
.ec-message__date {
    font-size: 12px;
    color: #999;
    padding-left: 20px;
}

.ec-message__reply {
    background: #fff;
    padding: 10px;
    margin-left: 20px;
}
.ec-message__reply p:last-child {
    margin-bottom: 0;
}

/*
| Default stars
*/
.ec-stars,
.ec-rating-stars {
    --ec-star-width: 16px;
    --ec-star-height: 16px;
    --ec-star-gap: 4px;
}
.ec-stars,
.ec-stars span,
.ec-rating-stars span {
    background-image: url('/assets/components/easycomm/img/web/stars2.svg');
    background-size: calc(var(--ec-star-width) + var(--ec-star-gap)) calc(var(--ec-star-height) * 2);
}

/*
| Input element
*/
.ec-rating {

}
.ec-rating-stars {
    float:left;
    margin-right: 20px;
}
.ec-rating-stars span {
    display:block;
    float:left;
    width: calc(var(--ec-star-width) + var(--ec-star-gap));
    height: var(--ec-star-height);
    margin: 0;
    background-position: 0 calc(-1 * var(--ec-star-height));
    background-repeat: no-repeat;
    cursor:pointer;
}
.ec-rating-stars span.active {
    background-position: 0 0;
}
.ec-rating-stars span.active2 {
    background-position: 0 0;
}
.ec-rating-stars span.active-disabled {
    background-position: 0 calc(-1 * var(--ec-star-height));
}
.ec-rating-description {
    float:left;
    padding-top: 1px;
    color:#999;
    line-height: 1;
}

/*
| Stars
*/
.ec-stars {
    margin: 10px 0;

    width: calc(5 * var(--ec-star-width) + 4 * var(--ec-star-gap));
    height: var(--ec-star-height);

    background-position: 0 calc(-1 * var(--ec-star-height));
    background-repeat: repeat-x;
}
.ec-stars span {
    display: block;
    width: var(--ec-star-width);
    height: var(--ec-star-height);
    background-position: 0 0;
    background-repeat: repeat-x;
}

.ec-stars span.rating-0 {width: 0;}
.ec-stars span.rating-1 {width: var(--ec-star-width);}
.ec-stars span.rating-2 {width: calc(2 * var(--ec-star-width) + 1 * var(--ec-star-gap));}
.ec-stars span.rating-3 {width: calc(3 * var(--ec-star-width) + 2 * var(--ec-star-gap));}
.ec-stars span.rating-4 {width: calc(4 * var(--ec-star-width) + 3 * var(--ec-star-gap));}
.ec-stars span.rating-5 {width: calc(5 * var(--ec-star-width) + 4 * var(--ec-star-gap));}

/*
| Votes
*/
.ec-message__votes {
    position: relative;
    padding: 5px 15px;
    background: #ffffff;
    border-radius: 5px 5px 0 0;
}
.ec-message__votes-item {
    float: left;
    display: block;
}
.ec-message__votes-item + .ec-message__votes-item {
    margin-left: 15px;
}
.ec-message__votes-button {
    display: block;
    height: 22px;
    line-height: 22px;
    padding-left: 20px;
    cursor: default;

    color: #8b8b8b;
    text-decoration: none;
}
.ec-message__votes-button:hover,
.ec-message__votes-button:active,
.ec-message__votes-button:focus {
    text-decoration: none;
}
.ec-message__votes-button:hover,
.ec-message__votes-button:active,
.ec-message__votes-button:focus {
    color: #8b8b8b;
}
.ec-message__votes-button.enabled {
    cursor: pointer;
}
.ec-message__votes-button.enabled:hover,
.ec-message__votes-button.enabled:active,
.ec-message__votes-button.enabled:focus {
    color: #337ab7;
}
.ec-message__votes-button.active {
    color: #337ab7;
}
.ec-message__votes-button-like {
    background: url('../../img/web/vote.svg#like') 0 center no-repeat;
    filter: grayscale(100%) brightness(5) brightness(80%);
}
.ec-message__votes-button-dislike {
    background: url('../../img/web/vote.svg#dislike') 0 center no-repeat;
    filter: grayscale(100%) brightness(5) brightness(80%);
}
.ec-message__votes-button-like.enabled:hover,
.ec-message__votes-button-dislike.enabled:hover {
    filter: none;
}
.ec-message__votes-button-like.active,
.ec-message__votes-button-dislike.active {
    filter: none;
}
.ec-message__votes-bar {
    display: block;
    position: absolute;
    height: 2px;
    bottom: -2px;
    left: 0;
    right: 0;
    background: #dddddd;
}
.ec-message__votes-bar span {
    display: block;
    width: 0;
    height: 2px;
    background: #337ab7;
}

/*
| Detailed Rating
*/
.ec-d-rating {
    width: 100%;
    max-width: 500px;
    background: #eee;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e3e3e3;
    display: flex;
}
.ec-d-rating:after {
    content: "";
    clear: both;
    display: table;
}
.ec-d-rating__col-info {
    width: 130px;
    padding-top: 12px;
}
.ec-d-rating__col-lines {
    width: 250px;
    width: calc(100% - 130px);
}
.ec-d-rating__value {
    font-size: 50px;
    line-height: 1;
    color: #333333;
}
.ec-d-rating__stars {

}
.ec-d-rating__desc {
    margin-top: 12px;
    color: #8b8b8b;
}

.ec-d-rating__lines {

}
.ec-d-rating__line {
    position: relative;
    line-height: 1;
    color: #8b8b8b;
    margin: 10px 0;
}
.ec-d-rating__line:after {
    content: "";
    clear: both;
    display: table;
}
.ec-d-rating__line-rate {
    float: left;
    text-align: left;
    padding-left: 5px;
}
.ec-d-rating__line-progress {
    position: absolute;
    left: 30px;
    right: 60px;
    top: 50%;
    margin-top: -2px;
    background-color: #dddddd;
}
.ec-d-rating__line-progress > span {
    display: block;
    height: 4px;
    background-color: #337ab7;
}
.ec-d-rating__line-volume {
    float: right;
    width: 60px;
    text-align: right;
}

/*
| common
*/
.ec-clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/*
| Theme "stars2"
*/
.ec-stars--stars2,
.ec-rating-stars--stars2 {
    --ec-star-width: 20px;
    --ec-star-height: 20px;
    --ec-star-gap: 4px;
}

.ec-stars--stars2,
.ec-stars--stars2 span,
.ec-rating-stars--stars2 span {
    background-image: url('../../img/web/stars2.svg');
    background-size: calc(var(--ec-star-width) + var(--ec-star-gap)) calc(var(--ec-star-height) * 2);
}

/*
| Theme "stars3"
*/
.ec-stars--stars3,
.ec-rating-stars--stars3 {
    --ec-star-width: 20px;
    --ec-star-height: 20px;
    --ec-star-gap: 4px;
}
.ec-stars--stars3,
.ec-stars--stars3 span,
.ec-rating-stars--stars3 span {
    background-image: url('../../img/web/stars3.svg');
    background-size: calc(var(--ec-star-width) + var(--ec-star-gap)) calc(var(--ec-star-height) * 2);
}

/*
| Theme "hearts"
*/
.ec-stars--hearts,
.ec-rating-stars--hearts {
    --ec-star-width: 20px;
    --ec-star-height: 20px;
    --ec-star-gap: 4px;
}
.ec-stars--hearts,
.ec-stars--hearts span,
.ec-rating-stars--hearts span {
    background-image: url('../../img/web/hearts.svg');
    background-size: calc(var(--ec-star-width) + var(--ec-star-gap)) calc(var(--ec-star-height) * 2);
}
.ec-rating-stars--hearts span {
    transition: all 0.3s;
}
