ul.list > * > li,
ul.list > li {
    clear: both;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-sizing: border-box;
    position: relative;
}

header:not(.big) > ul.list > li,
nav > ul.list > li,
ul.list.fill > li,
ul.list.controls > li {
    padding: 0;
}

article header > ul.list li {
    padding: 0 1rem;
}

ul.list li > * {
    order: 2;
    flex: 1;
    min-width: 0;
}

ul.list li:not(.subheader) > *:not(.primary):not(.control):not(.bubble):not(.main) {
    padding: 0.25rem 0;
}

ul.list.thin li:not(.subheader) > *:not(.primary):not(.control):not(.bubble):not(.main) {
    padding: 0;
}

ul.list.middle li:not(.subheader) > *:not(.primary):not(.control):not(.bubble):not(.main) {
    padding: 0.75rem 0;
}

ul.list.thick li:not(.subheader) > *:not(.primary):not(.control):not(.bubble):not(.main) {
    padding: 1.5rem 0;
}

/* Active list items */

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

ul.list li > span.color.active:hover {
    opacity: 0.8;
    cursor: pointer;
}

/* Clicked list items */

ul.list.active li:active:not(.subheader),
ul.list.active.all li:active,
ul.tabs > li:active,
ul.list li > span:not(.color).active:active {
    background-color: rgba(var(--movim-font), 0.08);
    transition: background-color 0.15s ease;
}

ul.list li > span.color.active:active {
    opacity: 0.6;
}

/* Main elements */

ul.list li .control,
ul.list li .primary {
    height: 5rem;
    line-height: 5rem;
    flex: 0 0 5rem;
}

ul.list li > span.primary {
    order: 1;
}

ul.list li > span.control {
    order: 3;
}

ul.list li > span.control:last-of-type {
    margin-right: -1.5rem;
}

header > ul.list li > span.control:last-of-type,
nav > ul.list li > span.control:last-of-type,
ul.list.fill li > span.control:last-of-type,
ul.list.controls li > span.control:last-of-type{
    margin-right: 0;
}

ul.list li > span.thumb {
    flex: 0 0 7rem;
}

ul.list li:not(.subheader) .control:not(.bubble):not(.thumb),
ul.list li:not(.subheader) .primary:not(.bubble):not(.thumb):not(.small) {
    padding: 0.25rem 0.5rem;
}

ul.list li:not(.subheader) .control.bubble,
ul.list li:not(.subheader) .primary.bubble:not(.small) {
    margin: 0.25rem 0.5rem;
}

ul.list.thin li:not(.subheader) .control:not(.bubble):not(.thumb),
ul.list.thin li:not(.subheader) .primary:not(.bubble):not(.thumb):not(.small) {
    padding: 0 0.5rem;
}

ul.list.thin li:not(.subheader) .control.bubble,
ul.list.thin li:not(.subheader) .primary.bubble:not(.small) {
    margin: 0 0.5rem;
}

ul.list.middle li:not(.subheader) .control:not(.bubble):not(.thumb),
ul.list.middle li:not(.subheader) .primary:not(.bubble):not(.thumb):not(.small) {
    padding: 1rem 0.5rem;
}

ul.list.middle li:not(.subheader) .control.bubble,
ul.list.middle li:not(.subheader) .primary.bubble:not(.small) {
    margin: 1rem 0.5rem;
}

ul.list.thick li:not(.subheader) .control:not(.bubble):not(.thumb),
ul.list.thick li:not(.subheader) .primary:not(.bubble):not(.thumb):not(.small) {
    padding: 1.75rem 0.5rem;
}

ul.list.thick li:not(.subheader) .control.bubble,
ul.list.thick li:not(.subheader) .primary.bubble:not(.small) {
    margin: 1.75rem 0.5rem;
}

ul.list li .primary ~ *:not(.primary):not(.control):not(.bubble) {
    margin-left: 1rem;
}

ul.list li .control ~ *:not(.primary):not(.control):not(.bubble) {
    margin-right: 1rem;
}

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

/* Truncated content */

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

ul.list li > div > p.line.two {
    white-space: initial;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

ul.list li > div > p > span.second.sticked {
    margin-left: 0;
}

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

/* Size automagicaly the content */

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

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

ul.list > * > li > div > p.all:first-of-type,
ul.list > li > div > p.all:first-of-type {
    line-height: 3rem;
    padding: 1.25rem 0;
}

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

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

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

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

ul.list li > div > p:nth-last-of-type(3) + p:not(.normal),
ul.list li > div > 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 > div > p:nth-last-of-type(3) + p.all,
ul.list li > div > p:nth-last-of-type(2) + p.all {
    max-height: 100%;
}

/* Subheader */

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

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

/* Tabs */

ul.tabs {
    text-align: center;
    border-bottom: 1px solid rgba(var(--movim-font), 0.12);
    overflow: hidden;
    white-space: nowrap;
    height: 5.5rem;
    line-height: 5.5rem;
    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: 5.5rem;
    box-sizing: border-box;
    border-radius: 0.75rem 0.75rem 0 0;
}

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

ul.tabs > li > * > i {
    font-size: 2.5rem;
}

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

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

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

/* Bubble */

ul li div.bubble {
    position: relative;
    box-sizing: border-box;
    display: block;
    font-size: 1.75rem;
    max-width: calc(100% - 11.5rem);
    flex: 0 0 auto;
    margin: 0 1.5rem;
    min-height: 5rem;
}

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

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

ul li div.bubble.sticker,
ul li div.bubble.file {
    margin-bottom: 1rem;
}

ul li div.bubble ul.card p:not(.line):not(:last-child) {
    display: block;
}

ul li div.bubble ul.card p:last-child {
    white-space: inherit;
    display: block;
}

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

ul li div.bubble p.retracted,
ul li div.bubble p.encrypted {
    opacity: 0.5;
}

ul li div.bubble p.previewable {
    display: block;
}

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

ul li div.bubble span.resource {
    display: none;
}

ul li:not(.oppose):not(.sequel) div.bubble div:first-child span.resource {
    display: block;
    line-height: 2.5rem;
}

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;
    padding: 1rem 1rem 1rem 1.5rem;
}

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

ul li div.bubble span.info:empty:before {
    content: "\a0";
    line-height: 2.5rem;
}

ul li div.bubble > div:last-child span.info {
    padding-right: 5rem;
}


ul li div.bubble:not(.file) > div:last-child span.info {
    height: 2.25rem;
}

ul li.oppose div.bubble.file > div:last-child span.info {
    height: 2.5rem;
}

ul li div.bubble span.info:empty {
    padding-left: 0;
}

ul li div.bubble:after {
    content: attr(data-publishedprepared);
    line-height: 1.5rem;
    right: 1rem;
    bottom: 1rem;
    position: absolute;
    pointer-events: none;
}

ul li div.bubble.sticker:after,
ul li div.bubble.file:after {
    right: 0;
    bottom: 0.5rem;
}

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: initial;
    right: -1.5rem;
    border-right-color: transparent;
    border-left-color: inherit;
}

/* Date separator */

ul li.date {
    min-height: 0;
    text-align: center;
}

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

ul li.date:first-of-type > div > p.normal {
    margin-top: 1rem;
}

ul.list li.separator:not(.subheader):not(.date) {
    display: block;
    border-top: 0.15rem dashed #BBB;
    margin-bottom: 0.7rem;
    margin-top: -0.7rem;
}

/* Top controls list */

ul.list.controls {
    position: absolute;
    width: 100%;
    top: 0;
    justify-content: space-between;
}

ul.list.controls > li {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

ul.list.controls i {
    text-shadow: 0 0 3rem black;
}

/* Icon */

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

/* Menu */

header ul.context_menu {
    border-radius: 0.75rem;
    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);
    transition: transform 0.2s, opacity 0.2s;
    transform: translateY(-5%);
    opacity: 0;
    pointer-events: none;
}

header ul.list.context_menu li {
    padding: 0 2rem;
}

header ul.context_menu.shown {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Divided */

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

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

ul.list li span.control.divided:before {
    position: absolute;
    left: 0;
    content: "";
    display: block;
    height: calc(100% - 2rem);
    top: 1rem;
    border-left-width: 1px;
    border-left-style: solid;
}

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