@import '../utils/colors.less';
@import '../utils/fonts.less';
@import '../utils/mixin.less';

.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
    .chat-log .chat-message {
        background-image: url('../assets/parchments/dh-parchment-light.png');

        .message-header .message-header-metadata .message-metadata,
        .message-header .message-header-main .message-sub-header-container {
            color: @dark;
        }

        .message-header .message-header-main .message-sub-header-container h4 {
            color: @dark-blue;
        }

        .message-content {
            .table-draw {
                .table-description {
                    color: @dark;
                }
            }
        }
    }
}

#chat-message {
    font-family: @font-body;
    padding: 8px;
}

.vtt.stream.system-daggerheart .chat-sidebar,
.daggerheart.chat-sidebar,
#chat-notifications {
    .chat-log {
        .chat-message {
            border: none !important;
            padding: 0;
            background-image: url('../assets/parchments/dh-parchment-dark.png');

            .message-header {
                display: flex;
                gap: 4px;
                padding: 8px;

                .message-header-metadata {
                    flex: none;
                    display: flex;
                    flex-direction: column;

                    .message-metadata {
                        font-family: @font-body;
                        color: @beige;
                    }
                }

                .message-header-main {
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    flex: 1;
                    overflow: hidden;

                    .actor-img {
                        border-radius: 50%;
                        width: 40px;
                        height: 40px;
                        object-fit: cover;
                        object-position: top center;
                    }

                    .message-sub-header-container {
                        flex: 1;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-between;
                        color: @beige;

                        h4 {
                            font-size: var(--font-size-16);
                            font-weight: bold;
                            margin-bottom: 0;
                            font-family: @font-subtitle;
                            color: @golden;
                        }
                    }
                }
            }

            .message-content {
                padding-bottom: 8px;

                .flavor-text {
                    font-size: var(--font-size-12);
                    line-height: 20px;
                    color: light-dark(@dark, @beige);
                    text-align: center;
                    display: block;
                }

                .table-draw {
                    .table-flavor {
                        padding-top: 5px;
                        padding-bottom: 0.5rem;
                        font-size: var(--font-size-12);
                    }

                    .table-description {
                        color: @beige;
                        font-style: italic;

                        &.flavor-spaced {
                            padding-top: 0;
                        }
                    }

                    .table-results {
                        .description {
                            flex-basis: min-content;

                            > p:first-of-type {
                                margin-top: 0;
                            }
                        }
                    }
                }
            }
        }
    }
}
