/* Variable definitions
------------------------------------------------------------------------------------- */
:root {
    --bg-hover-transition: background-color 0.25s linear;
}

/* Search Box
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-search-box .form-control-feedback {
        color: #cccccc;
        left: 0;
        right: initial;
    }

    .aa-forum .aa-forum-search-box .form-control {
        padding-left: 35px;
        padding-right: 1rem;
    }
}

/* Administration :: Sortable categories and boards
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-ui-placeholder {
        outline: 1px dashed rgb(0, 0, 0);
    }

    .aa-forum .categories-sortable, .aa-forum .boards-sortable {
        list-style-type: none;
        padding: 0;
    }

    .aa-forum .categories-sortable > li, .aa-forum .boards-sortable > li {
        margin-bottom: 1rem;
    }

    .aa-forum .boards-sortable > li {
        background-color: rgb(236, 240, 241);
        padding: 1rem;
    }

    .template-dark-mode .aa-forum .boards-sortable > li {
        background-color: rgb(70, 69, 69);
    }

    .aa-forum .boards-sortable > li:first-child {
        margin-top: 1rem;
    }

    .aa-forum [data-toggle="collapse"].collapsed .if-expanded {
        display: none;
    }

    .aa-forum [data-toggle="collapse"]:not(.collapsed) .if-collapsed {
        display: none;
    }

    .aa-forum .aa-forum-admin-panel-aa-forum-category .panel-body {
        padding: 1rem 1rem 0 1rem;
    }
}

/* Breadcrumb
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-breadcrumb {
        padding: 1rem;
    }

    .aa-forum .aa-forum-breadcrumb ul {
        align-content: center;
        align-items: baseline;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        list-style-type: none;
        padding: 0;
    }

    .aa-forum .aa-forum-breadcrumb ul li {
        padding: .5rem 0 0.5rem 0.5rem;
    }
}

/* Category view
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .panel-aa-forum-category .aa-forum-board {
        align-content: center;
        align-items: baseline;
        display: flex;
        flex-direction: row;
        padding: 1rem;
        transition: var(--bg-hover-transition);
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board:last-child {
        margin-bottom: 0;
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board-image {
        margin-right: 1rem;
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board-name {
        width: 100%;
    }

    .aa-forum .aa-forum-board-name p:last-child {
        margin: 0;
    }

    .aa-forum .aa-forum-board-group-restrictions {
        list-style-type: none;
        margin: 0;
        padding: 0;
    }

    .aa-forum .aa-forum-board-last-post .img-last-post-avatar {
        float: left;
        height: 55px;
        margin-right: 1rem;
        width: 55px;
    }

    .aa-forum .aa-forum-board-last-post .last-post-information {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-wrap: normal;
    }

    .aa-forum .aa-forum-legend {
        display: flex;
    }

    .aa-forum .aa-forum-legend > span {
        display: flex;
        margin-right: 5rem;
    }

    .aa-forum .aa-forum-legend .aa-forum-legend-image {
        margin-right: 0.5rem;
    }

    .aa-forum .aa-forum-legend .aa-forum-legend-text {
        display: inline-block;
        margin-top: 0.25rem;
    }

    .aa-forum .aa-forum-legend span:last-child {
        margin-right: 0;
    }
}

/* Board view
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-topic-row .aa-forum-topic {
        align-content: center;
        align-items: center;
        /*border-bottom: 1px solid #ecf0f1;*/
        display: flex;
        flex-direction: row;
        padding: 1rem;
        transition: var(--bg-hover-transition);
    }

    .aa-forum .panel-aa-forum-topic-list {
        margin: 2rem 0;
    }

    .aa-forum .aa-forum-topic-row:last-child .aa-forum-topic {
        /*border-bottom: 0;*/
        margin-bottom: 0;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-image {
        width: 40px;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-name {
        width: 60%;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-name p:last-child {
        margin-bottom: 0;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-stats {
        text-align: center;
        width: 15%;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-last-post {
        width: 25%;
    }

    .aa-forum .aa-forum-topic-row .aa-forum-topic .aa-forum-topic-actions {
        width: 60px;
    }

    .aa-forum .aa-forum-topic-locked {
        background-color: rgba(185, 199, 219, 0.25);
    }

    .aa-forum .aa-forum-topic-sticky {
        background-color: rgba(255, 220, 104, 0.25);
    }

    .aa-forum .aa-forum-topic-status-icon {
        margin: 0 0.25rem;
    }

    .aa-forum .label-aa-forum-topic-new-message {
        font-size: 55%;
        margin-left: 1rem;
    }
}

/* Message view
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-message {
        align-items: flex-start;
        display: flex;
        flex-wrap: nowrap;
    }

    .aa-forum .aa-forum-message-author {
        margin: 2rem;
        min-width: 150px;
        width: 150px;
    }

    .aa-forum .aa-forum-message-author .img-author-avatar {
        margin-bottom: 1rem;
    }

    .aa-forum .aa-forum-message-wrapper {
        margin: 2rem;
        width: 100%;
    }

    .aa-forum .aa-forum-message-header {
        margin-bottom: 1rem;
    }

    .aa-forum .aa-forum-message-body {
        border-top: 1px solid rgb(236, 240, 241);
        padding: 1em 0 0 0;
    }

    .aa-forum .aa-forum-message-body-last-edited {
        margin-top: 5rem;
    }

    .aa-forum .aa-forum-message-body img {
        height: auto !important; /* to override inline style added by cKeditor */
        max-width: 100%;
    }
}

/* Search view
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-search-result-inner {
        align-content: flex-start;
        align-items: flex-start;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .aa-forum .aa-forum-search-results-total-number {
        font-size: 2rem;
        font-weight: bolder;
        margin-bottom: 2rem;
    }

    .aa-forum .aa-forum-search-result-counter {
        font-size: 3rem;
        font-weight: bolder;
        margin-right: 1rem;
        min-width: 50px;
        padding: 1rem;
    }

    .aa-forum .aa-forum-search-result-details {
        width: 100%;
    }

    .aa-forum .aa-forum-search-term-highlight {
        color: rgb(255, 114, 0) !important;
        font-size: 1.1em;
        font-weight: bold;
    }
}

/* Lightbox
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .aa-forum-lightbox-modal {
        align-items: center;
        display: flex !important;
        justify-content: center;
        z-index: -1;
    }

    .aa-forum .aa-forum-lightbox-modal .modal-dialog {
        display: inline-block;
        height: auto !important;
        max-height: 95%;
        max-width: 95%;
        width: auto !important;
    }

    .aa-forum .aa-forum-lightbox-modal.fade.in {
        z-index: 1050;
    }
}

/* Buttons
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .btn-aa-forum-topic-moderation {
        background: none;
        width: 25px;
    }

    .aa-forum .btn-aa-forum-topic-moderation.focus,
    .aa-forum .btn-aa-forum-topic-moderation:focus,
    .aa-forum .btn-aa-forum-topic-moderation:hover {
        color: inherit;
        outline: 5px auto -webkit-focus-ring-color;
        outline-offset: -2px;
    }
}

/* MultiSelect
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .SumoSelect p {
        height: auto;
    }

    /* For for Dark Mode
    --------------------------------------------------------------------------------- */
    .template-dark-mode .aa-forum .SumoSelect {
        color: rgb(54, 54, 54);
    }

    .template-dark-mode .aa-forum .SumoSelect > .CaptionCont > span.placeholder {
        color: rgb(62, 68, 76);
    }
}

/* cKeditor
------------------------------------------------------------------------------------- */
@media all {
    .aa-forum .django-ckeditor-widget {
        display: initial !important;
    }
}

/* Responsive
------------------------------------------------------------------------------------- */
@media all and (min-width: 768px) {
    .aa-forum .panel-aa-forum-category .aa-forum-board-name {
        width: 60%;
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board-stats {
        text-align: center;
        width: 15%;
    }

    .aa-forum .panel-aa-forum-category .aa-forum-board-last-post {
        width: 25%;
    }
}
