html {
    min-height: 100%;
}

body {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-attachment: fixed;
    background-color: #aaa;
    color: #fff;
    min-height: 100%;
}

.note-panel .panel-body a:link:not(.panel-footer a, .modal-carousel a),
.note-panel .panel-body a:hover:not(.panel-footer a, .modal-carousel a),
.note-panel .panel-body a:active:not(.panel-footer a, .modal-carousel a),
.note-panel .panel-body a:visited:not(.panel-footer a, .modal-carousel a) {
    color: #aaf;
}

.note-panel table {
    color: inherit;
    background-color: inherit;
}

.note-panel table th, .note-panel table td {
    padding: 2px;
}

.note-panel.topic-panel .panel-footer {
    text-align: right;
}

.note-panel .panel-footer, .paginator .panel-footer {
    border-top: 0;
}

.table {
    color: #333;
}

#mainPageContainer {
    margin-top: 60px;
    margin-bottom: 20px;
}

.routeMenuItem a:focus {
    outline: 0;
}

#registerForm {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.paginator-pagination {
    margin-top: 0px;
    margin-bottom: 0px;
}

.paginator-page-buttons {
    margin-right: 10px;
}

textarea {
    resize: none;
    width: 100%;
}

.topic-button {
    white-space: normal;
}

.main-topic-buttons {
    margin-top: 24px;
    width: 100%;
}

.notes-topic-header {
    text-align: center;
}

.user-control-panel .panel-footer {
    text-align: right;
}

.note-created-xs {
    margin-top: 8px;
}

.page-title {
    text-align: center;
}

.page-title h3 {
    margin: 0px;
}

/* Helpers */
.centered-image-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Note attachment panels */
.attachments-panel-group {
    margin-top: 5px;
}

.images-panel img.attachment {
    max-height: 100px;
}

.images-panel img.attachment:not(:last-child) {
    margin-right: 10px;
}

.images-panel img.attachment:last-child {
    margin-right: 15px;
}

.images-panel .panel-body, .files-panel .panel-body {
    overflow-x: auto;
}

.audio-panel audio {
    width: 100%;
}

.audio-panel .row {
    width: 100%;
    margin-left: 0px;
    margin-right: 0px;
}

.audio-panel .row div {
    padding-left: 0px;
}

.audio-panel .row div:last-child {
    text-align: right;
    padding-right: 0px;
}

.files .btn-group {
    width: 100%;
}

.files .btn-group:not(:last-child) {
    margin-bottom: 10px;
}

.files .btn {
    overflow: hidden;
    text-overflow: ellipsis;
}

.images {
    white-space: nowrap;
    margin-right: 15px;
}

.carousel-inner .item img {
    margin-left: auto;
    margin-right: auto;
}

/* Note images modal */
.modal-carousel .modal-content {
    background-color: rgba(0,0,0,0.5);
}

.modal-carousel .modal-body {
    padding: 0;
}

.modal-carousel .modal-header {
    background-color: black;
}

.modal-carousel .modal-header, .modal-carousel .close {
    color: white;
}

.modal-carousel .close {
    font-size: x-large;
}

.modal-carousel .modal-content, .modal-carousel .modal-body {
    display: flex;
    flex-direction: column;
}

.modal-carousel .modal-body {
    max-height: calc(100% - 120px);
}

.modal-carousel .modal-body, .modal-carousel .carousel, .modal-carousel .carousel-inner, .modal-carousel .item {
    height: 100%;
}

.modal-carousel .item img {
    max-width: 100%;
    max-height: 100%;
}

/* Main page topic buttons */
.topic-buttons-col {
    padding: 15px;
}

.topic-button {
    position: relative;
    text-align: center;
    height: 150px;
    width: 150px;
    border-radius: 6px;
    background-color: gray;
}

.topic-button img {
    height: 150px;
    max-width: 100%;
    filter: grayscale(60%);
    transition: 0.5s ease;
}

.topic-button:hover img {
    filter: grayscale(0%);
}

.topic-button .caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 0 10px #000000;
    transition: 0.2s ease;
}

.topic-button:hover .caption {
    font-size: 1.2em;
}

.back-button {
    margin-top: -4px;
}
