ul.list {
    list-style-type: none;
    padding: 0;
}

ul.list.thin li:not(.subheader) {
    padding: 0;
}

ul.list li:not(.subheader) {
    padding: 0.25rem 0;
}

ul.list.middle li:not(.subheader):not(.date) {
    padding: 0.75rem 0;
    min-height: 5rem;
}

ul.list.thick li:not(.subheader) {
    padding: 1.5rem 0;
}

ul.list li {
    clear: both;
    position: relative;
}

ul.list li > *:not(p, .hide, form) {
    display: inline-block;
    top: 0;
}

/* Active list */

ul.list.active > li:hover:not(.subheader),
ul.list.active.all > li:hover,
ul.list.active > li.active:not(.subheader) {
    background-color: rgba(var(--movim-font), 0.04);
    cursor: pointer;
}

/* Main elements */

ul.list li .control,
ul.list li .primary {
    width: 5rem;
    height: 5rem;
    top: 50%;
    margin-top: -2.5rem;
    position: absolute;
    line-height: 5rem;
}

ul.list li .top + .primary {
    top: 5rem;
}

ul.list li .control:not(.bubble):not(.thumb):not(.top),
ul.list li .primary:not(.bubble):not(.thumb):not(.top) {
    margin-top: -3rem;
    padding: 0.5rem;
}

ul.list.middle li .control:not(.bubble):not(.thumb):not(.top),
ul.list.middle li .primary:not(.bubble):not(.thumb):not(.top) {
    margin-top: -3.5rem;
    padding: 1rem 0.5rem;
}

ul.list.thick li .control:not(.bubble):not(.thumb):not(.top),
ul.list.thick li .primary:not(.bubble):not(.thumb):not(.top) {
    margin-top: -4.25rem;
    padding: 1.75rem 0.5rem;
}

ul.list > li > *:not(img):not(.counter):not(span):not(.bubble):not(.button):not(ul):not(article),
ul.list > a > li > *:not(img):not(.counter):not(span):not(.bubble):not(.button):not(ul):not(article),
ul.list li.subheader p {
    box-sizing: border-box;
    padding-right: 2rem;
    padding-left: 2rem;
}

ul.list > li.wide > *:not(img):not(.counter):not(span):not(.bubble):not(.button):not(ul):not(article) {
    padding-left: 0;
}

ul.list li .primary > a,
ul.list li .control > a {
    display: block;
}

/* Truncated content */

ul.list li.subheader > p,
ul.list li > p.line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

ul.list li > span.active {
    transition: background-color 0.25s ease;
}

ul.list li > span.active:hover {
    cursor: pointer;
    background-color: rgba(var(--movim-font), 0.05);
}

ul.list li > p > span.second {
    color: gray;
    margin-left: 0.5rem;
}

ul.list li > p > span.info,
ul li div.bubble:after {
    float: right;
    font-size: 1.5rem;
    color: gray;
}

*[dir="rtl"] ul.list li > p > span.info {
    float: left;
}

/* Size automagicaly the content */

ul.list li > p {
    box-sizing: border-box;
    width: auto;
}

ul.list > * > li > p:first-of-type,
ul.list > li > p:first-of-type {
    line-height: 5.5rem;
    font-size: 3rem;
}

ul.list li > p.normal {
    font-size: 2rem;
}

ul.list li > p:nth-last-of-type(2) + p.normal {
    margin-top: 0.5rem;
}

ul.list li > p.bold {
    font-weight: bold;
}

ul.list li > p.center {
    text-align: center;
}

ul.list li > p:nth-last-of-type(3),
ul.list li > p:nth-last-of-type(2) {
    line-height: 3rem;
    font-size: 2rem;
}

ul.list li > p:nth-last-of-type(3) + p:not(.normal),
ul.list li > p:nth-last-of-type(2) + p:not(.normal) {
    line-height: 2.5rem;
    font-size: 1.75rem;
    max-height: 7.5rem;
    overflow: hidden;
}

ul.list li > p:nth-last-of-type(3) + p.all,
ul.list li > p:nth-last-of-type(2) + p.all {
    max-height: 100%;
}

/* In case of a card inside a li */
ul.list li > ul.list.card {
    padding-right: 1rem;
    padding-left: 8rem;
    padding-bottom: 0.5rem;
}

/* Subheader */

ul.list li.subheader {
    overflow: hidden;
}

ul.list li.subheader > p {
    font-size: 1.75rem;
    line-height: 5rem;
    font-weight: 600;
    padding: 0 2rem;
}

/* If we have a primary control */

ul.list li > .primary {
    left: 1.5rem;
}

ul.list li > .primary.bubble {
    left: 2rem;
}

ul.list li > .primary ~ *:not(.primary):not(.counter):not(.bubble):not(.control):not(ul) {
    padding-left: 9rem;
}

ul.list li > .top + .primary ~ *:not(.primary):not(.counter):not(.bubble):not(.control) {
    padding-left: 2rem;
}

/* If we have a second primary control */

ul.list li > .primary + .primary {
    left: 7rem;
}

ul.list li > .primary.bubble + .primary {
    left: 7.5rem;
}

ul.list li > .primary + .primary ~ *:not(.primary):not(.counter):not(.bubble):not(.control):not(ul) {
    padding-left: 14rem;
}

/* Place the other controls */

ul.list li > .control {
    right: 0;
}

ul.list li > .control ~ .control {
    right: 6rem;
}

ul.list li > .control ~ .control ~ .control {
    right: 12rem;
}

/* Limit the size of the main content */

ul.list li > .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: 5rem;
}

ul.list li > .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: 11rem;
}

ul.list li > .control ~ .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: 17rem;
}

/* Limit the size of the main content */

header > ul.list li .primary {
    left: 0;
}

header > ul.list li > .primary ~ :not(.primary):not(.counter):not(.bubble):not(.control) {
    padding-left: 9rem;
}

/* Tabs */

ul.tabs {
    text-align: center;
    border-bottom: 1px solid rgba(var(--movim-font), 0.12);
    overflow: hidden;
    white-space: nowrap;
    height: 6rem;
    line-height: 6rem;
    font-size: 0;
}

ul.tabs.wide > li {
    width: 33.33%;
    float: left;
}

ul.tabs:hover {
    overflow-x: auto;
}

ul.tabs > li {
    display: inline-block;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 1.75rem;
    font-weight: 600;
    opacity: 0.6;
    height: 6rem;
    box-sizing: border-box;
}

ul.tabs > li > * {
    padding: 0 3rem;
    box-sizing: border-box;
    display: block;
}

ul.tabs.narrow > li {
    min-width: 8rem;
}

ul.tabs.narrow > li > * {
    padding: 0 1rem;
}


ul.tabs > li:hover {
    cursor: pointer;
    background-color: rgba(var(--movim-font), 0.05);
}

ul.tabs > li.active {
    opacity: 1;
    border-bottom-width: 2px;
    border-bottom-style: solid;
}

/* Counter */

ul li span.counter:empty {
    display: none;
}

ul li span.counter {
    position: absolute;
    right: 1rem;
    top: calc(50% - 1.5rem);
    line-height: 2rem;
    border-radius: 3rem;
    padding: 0.5rem;
    text-align: center;
    min-width: 2rem;
    font-size: 2rem;
}

ul li span.counter.bottom {
    top: calc(50%);
}

/* Bubble */

ul li div.bubble {
    position: relative;
    box-sizing: border-box;
    display: block;
    font-size: 1.75rem;
    max-width: calc(100% - 11rem);
    float: left;

    left: 9rem;
    /*padding-left: 2rem;*/
    width: auto;
}

ul li div.bubble[dir="rtl"] {
    text-align: right;
}

ul li div.bubble:not(.sticker):not(.file) {
    padding: 1rem 1.75rem 0.5rem;
    border-radius: 0 0.5rem 0.5rem;
    line-height: 2.75rem;
    border-color: rgb(var(--movim-background-main));
    margin-bottom: 0.75rem;
}

ul li div.bubble p {
    overflow: hidden;
    display: inline;
    max-width: 100%;
    font-size: 1.75rem;
    word-wrap: break-word;
    white-space: pre-wrap;
}

ul li div.bubble p.code {
    display: inline-block;
    margin: 0.5rem 0;
    margin-bottom: 0;
}

ul li.oppose div.bubble {
    margin-right: 9rem;
    float: right;
    position: initial;
}

ul li.oppose div.bubble.file {
    word-break: break-all;
}

ul li.oppose div.bubble:not(.sticker):not(.file) {
    background-color: rgba(var(--movim-background-main), 0.5);
    border-color: rgba(var(--movim-background-main), 0.5);
    border-radius: 0.5rem 0 0.5rem 0.5rem;
}

ul li div.bubble span.info {
    float: right;
    padding-left: 1rem;
}

ul li div.bubble:after {
    /*display: block;*/
    content: attr(data-publishedprepared);
    clear: both;
    /*position: absolute;
    width: 20rem;*/
    line-height: 3rem;
    text-align: left;
    /*padding-top: 1rem;*/
}

ul li div.bubble.sticker:after {
    padding-top: 0.5rem;
}

ul li.oppose div.bubble:after {
    right: 9rem;
    text-align: right;
}

ul li:not(.oppose) div.bubble:after {
    left: 0;
}

ul li .quote {
    font-style: italic;
}

ul li div.bubble:not(.sticker):not(.file):before {
    content: "";
    position: absolute;
    top: 0;
    left: -1.5rem;
    border: 0.75rem solid transparent;
    border-top-color: inherit;
    border-right-color: rgb(var(--movim-background-main));
}

ul li.oppose div.bubble:not(.sticker):not(.file):before {
    left: calc(100% - 9rem);
    top: 0.75rem;
    border-right-color: transparent;
    border-left-color: inherit;
}

/* Date separator */
ul li.date {
    min-height: 0;
    text-align: center;
}

ul li.date > p.normal {
    line-height: 2.5rem;
    font-size: 1.5rem;
    display: inline-block;
    border-radius: 2rem;
    margin: 1rem;
}

ul.list.middle li.separator:not(.subheader):not(.date) {
    display: block;
    min-height: 0;
    padding: 0;
    border-top: 0.15rem dashed #BBB;
    margin: 0 1.5rem;
}

/* Icon */

.icon.tiny {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Menu */

ul.context_menu {
    border-radius: 0.25rem;
    overflow: hidden;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.5rem;
    z-index: 3;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.26), 0px 2px 10px 0px rgba(0, 0, 0, 0.16);
    display: none;
}

ul.context_menu.shown {
    display: block;
}

/* Divided */

ul.list li.divided,
*.divided:not(.spaced):not(li) > *:not(:last-child),
*.divided.spaced > *:not(:last-child).subheader,
*.divided.spaced > *:not(:last-child):not(.subheader):after {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

*.divided.spaced > *:not(:last-child):after {
    position: absolute;
    right: 0;
    bottom: 0rem;
    content: "";
    display: block;
    width: calc(100% - 9rem);
}

/* RTL */

/*
*[dir="rtl"] :not(nav) ul.list li > .primary {
    left: auto;
    right: 1.5rem;
}

*[dir="rtl"] :not(nav) ul.list li > .primary.bubble {
    left: auto;
    right: 2rem;
}

*[dir="rtl"] :not(nav) ul.list li > .primary ~ *:not(.primary):not(.counter):not(.bubble):not(.control):not(ul) {
    padding-left: 2rem;
    padding-right: 9rem;
}

*[dir="rtl"] :not(nav) ul.list li > .top + .primary ~ *:not(.primary):not(.counter):not(.bubble):not(.control) {
    padding-left: 2rem;
    padding-right: 2rem;
}


*[dir="rtl"] :not(nav) ul.list li > .control {
    right: auto;
    left: 0;
}

*[dir="rtl"] :not(nav) ul.list li > .control ~ .control {
    right: auto;
    left: 6rem;
}

*[dir="rtl"] :not(nav) ul.list li > .control ~ .control ~ .control {
    right: auto;
    left: 12rem;
}


*[dir="rtl"] :not(nav) ul.list li > .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: auto;
    margin-left: 6rem;
}

*[dir="rtl"] :not(nav) ul.list li > .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: auto;
    margin-left: 12rem;
}

*[dir="rtl"] :not(nav) ul.list li > .control ~ .control ~ .control ~ *:not(.control):not(.bubble):not(.counter) {
    margin-right: 0;
    margin-left: 18rem;
}*/

ul li img.preview {
    max-width: 100%;
    margin: 1rem 0;
}

