#peertube-plugin-chat-container {
    position: relative;
    width: 20em;
    height: 66vh;
    padding: 0.5em;
    padding-bottom: 5em;
    background-color: var(--mainBackgroundColor);
    color: var(--mainForegroundColor);
}
#peertube-plugin-chat-messages {
    max-height: 100%;
    overflow-y: scroll;
}
#peertube-plugin-chat-user-area {
    width: 19em;
    position: absolute;
    bottom: 0;
}

.peertube-plugin-chat-delete-btn {
    float: right;
    background: none;
    border: none;
    color: #f00;
    cursor: pointer;
    display: none;
    font-size: 0.8em;
    padding: 0 4px;
}
#peertube-plugin-chat-messages > div:hover .peertube-plugin-chat-delete-btn {
    display: inline;
}

.peertube-plugin-chat-system {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9em;
}

.peertube-plugin-chat-emote {
    height: 1.5em;
    vertical-align: middle;
}

.peertube-plugin-chat-emote-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--mainBackgroundColor, #222);
    border: 1px solid #555;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}
.peertube-plugin-chat-emote-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--mainForegroundColor, #fff);
}
.peertube-plugin-chat-emote-picker-item:hover,
.peertube-plugin-chat-emote-picker-item.selected {
    background: #444;
}
.peertube-plugin-chat-emote-picker-item img {
    height: 24px;
    width: 24px;
    object-fit: contain;
}

.ezchat-emote-manager {
    box-sizing: border-box;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--mainForegroundColor, var(--fg, #222));
    background: var(--mainBackgroundColor, var(--bg, #fff));
}
.ezchat-emote-manager h1,
.ezchat-emote-manager h2 {
    color: inherit;
}
.ezchat-emote-manager h1 {
    margin: 0 0 1.5rem;
}
.ezchat-emote-manager h2 {
    margin: 1.75rem 0 0.75rem;
}
.ezchat-emote-manager-messages {
    min-height: 1.5em;
    margin: 0.75rem 0;
}
.ezchat-emote-manager-messages.success {
    color: var(--success, #287a3d);
}
.ezchat-emote-manager-messages.error {
    color: var(--danger, #b42318);
}
.ezchat-emote-manager-drop-zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    border: 2px dashed var(--border-primary, #aaa);
    border-radius: 0.35rem;
    background: var(--bg-secondary, rgba(127, 127, 127, 0.08));
    text-align: center;
}
.ezchat-emote-manager-drop-zone strong {
    width: 100%;
}
.ezchat-emote-manager-drop-zone span {
    opacity: 0.7;
}
.ezchat-emote-manager-drop-zone small {
    width: 100%;
    opacity: 0.7;
}
.ezchat-emote-manager-drop-zone.dragover {
    border-color: var(--primary, #4d76ff);
    background: var(--bg-secondary-450, rgba(77, 118, 255, 0.12));
}
.ezchat-emote-manager-file-status {
    min-height: 1.5em;
    margin-top: 0.5rem;
    opacity: 0.75;
}
.ezchat-emote-manager table {
    width: 100%;
    border-collapse: collapse;
}
.ezchat-emote-manager th,
.ezchat-emote-manager td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-secondary, rgba(127, 127, 127, 0.35));
    text-align: left;
}
.ezchat-emote-manager th {
    background: var(--bg-secondary, rgba(127, 127, 127, 0.08));
}
.ezchat-emote-manager .emote-code {
    width: min(20rem, 100%);
}
.ezchat-emote-manager table img {
    display: block;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}
.ezchat-emote-manager .delete-emote {
    color: var(--danger, #b42318);
}
.ezchat-emote-manager-form > button {
    margin-top: 1rem;
}

@media screen and (max-width: 1100px) {
    #peertube-plugin-chat-container {
        position: relative;
        width: inherit;
        height: 20em;
    }
    #peertube-plugin-chat-user-area {
        width: inherit;
    }

    .ezchat-emote-manager {
        padding: 1rem;
    }
}
#peertube-plugin-chat-container {
    position: relative;
    width: 20em;
    height: 66vh;
    padding: 0.5em;
    padding-bottom: 5em;
    background-color: var(--mainBackgroundColor);
    color: var(--mainForegroundColor);
}
#peertube-plugin-chat-messages {
    max-height: 100%;
    overflow-y: scroll;
}
#peertube-plugin-chat-user-area {
    width: 19em;
    position: absolute;
    bottom: 0;
}

.peertube-plugin-chat-delete-btn {
    float: right;
    background: none;
    border: none;
    color: #f00;
    cursor: pointer;
    display: none;
    font-size: 0.8em;
    padding: 0 4px;
}
#peertube-plugin-chat-messages > div:hover .peertube-plugin-chat-delete-btn {
    display: inline;
}

.peertube-plugin-chat-system {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9em;
}

.peertube-plugin-chat-emote {
    height: 1.5em;
    vertical-align: middle;
}

.peertube-plugin-chat-emote-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--mainBackgroundColor, #222);
    border: 1px solid #555;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}
.peertube-plugin-chat-emote-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--mainForegroundColor, #fff);
}
.peertube-plugin-chat-emote-picker-item:hover,
.peertube-plugin-chat-emote-picker-item.selected {
    background: #444;
}
.peertube-plugin-chat-emote-picker-item img {
    height: 24px;
    width: 24px;
    object-fit: contain;
}

.ezchat-emote-manager {
    box-sizing: border-box;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--mainForegroundColor, var(--fg, #222));
    background: var(--mainBackgroundColor, var(--bg, #fff));
}
.ezchat-emote-manager h1,
.ezchat-emote-manager h2 {
    color: inherit;
}
.ezchat-emote-manager h1 {
    margin: 0 0 1.5rem;
}
.ezchat-emote-manager h2 {
    margin: 1.75rem 0 0.75rem;
}
.ezchat-emote-manager-messages {
    min-height: 1.5em;
    margin: 0.75rem 0;
}
.ezchat-emote-manager-messages.success {
    color: var(--success, #287a3d);
}
.ezchat-emote-manager-messages.error {
    color: var(--danger, #b42318);
}
.ezchat-emote-manager-drop-zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    border: 2px dashed var(--border-primary, #aaa);
    border-radius: 0.35rem;
    background: var(--bg-secondary, rgba(127, 127, 127, 0.08));
    text-align: center;
}
.ezchat-emote-manager-drop-zone strong {
    width: 100%;
}
.ezchat-emote-manager-drop-zone span {
    opacity: 0.7;
}
.ezchat-emote-manager-drop-zone small {
    width: 100%;
    opacity: 0.7;
}
.ezchat-emote-manager-drop-zone.dragover {
    border-color: var(--primary, #4d76ff);
    background: var(--bg-secondary-450, rgba(77, 118, 255, 0.12));
}
.ezchat-emote-manager-file-status {
    min-height: 1.5em;
    margin-top: 0.5rem;
    opacity: 0.75;
}
.ezchat-emote-manager table {
    width: 100%;
    border-collapse: collapse;
}
.ezchat-emote-manager th,
.ezchat-emote-manager td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-secondary, rgba(127, 127, 127, 0.35));
    text-align: left;
}
.ezchat-emote-manager th {
    background: var(--bg-secondary, rgba(127, 127, 127, 0.08));
}
.ezchat-emote-manager .emote-code {
    width: min(20rem, 100%);
}
.ezchat-emote-manager table img {
    display: block;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}
.ezchat-emote-manager .delete-emote {
    color: var(--danger, #b42318);
}
.ezchat-emote-manager-form > button {
    margin-top: 1rem;
}

@media screen and (max-width: 1100px) {
    #peertube-plugin-chat-container {
        position: relative;
        width: inherit;
        height: 20em;
    }
    #peertube-plugin-chat-user-area {
        width: inherit;
    }

    .ezchat-emote-manager {
        padding: 1rem;
    }
}
