.beyond20-quick-roll-tooltip,
.beyond20-quick-roll-area {
    cursor: pointer;
}
.beyond20-quick-roll-tooltip .beyond20-quick-roll-indicator.right {
    position: absolute;
    padding: 0px;
    height: 50%;
    top: 25%;
    left: -5px;
    transform: rotate(180deg);
}

.beyond20-quick-roll-tooltip .beyond20-quick-roll-indicator.left {
    position: absolute;
    padding: 0px;
    height: 50%;
    top: 25%;
    left: calc(100% - 6px);
}

.beyond20-quick-roll-tooltip .beyond20-quick-roll-indicator.down {
    position: absolute;
    padding: 0px;
    height: 50%;
    top: -16px;
    left: calc(50% - 5px);
    transform: rotate(-90deg);
}

.beyond20-quick-roll-tooltip .beyond20-quick-roll-indicator.up {
    position: absolute;
    padding: 0px;
    height: 50%;
    top: calc(100% - 6px);
    left: calc(50% - 5px);
    transform: rotate(90deg);
}

/* This is needed so the tooltip's absolute position is
 * relative to the message's position in the chatlog
 */
.beyond20-roll-result,
.beyond20-roller-error {
   position: relative;
}

.beyond20-dice-roller-content {
    background-color: #ddeedd;
    border-radius: 10px;
    padding: 10px;
}

.beyond20-roll-total {
    text-decoration: underline;
}


.beyond20-message details summary, .beyond20-title {
    font-style: italic;
    color: #500;
    font-size: 1.2em;
}

.beyond20-message .beyond20-description, .beyond20-message details table {
    margin: 2px 0px;
    border: 1px solid #333;
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    background-color: #DDD;
}


.beyond20-roll-cells,
.beyond20-roll-dice-rolls,
.beyond20-dice-roller-content .beyond20-roll-dice {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.beyond20-roll-cell,
.beyond20-roll-die-result {
    flex: 1 0 auto;
    margin: 1px;

    text-align: center;
    border: thin solid black;
    border-radius: 2px;
    background-color: lightgray;
}

.beyond20-dice-roller-content .beyond20-roll-dice-formula {
    flex-grow: 1;
}
.beyond20-dice-roller-content .beyond20-roll-dice-rolls {
    flex-grow: 4;
}
.beyond20-dice-roller-content .beyond20-roll-formula {
    background-color: #DDD;
    text-align: center;
    width: 100%;
}

.beyond20-roll-detail-crit {
    color: green;
}
.beyond20-roll-detail-fail {
    color: red;
}
.beyond20-roll-detail-crit-fail {
    color: blue;
}
.beyond20-roll-detail-normal {
    color: black;
}
.beyond20-roll-detail-discarded {
    color: grey;
    text-decoration: line-through;
    opacity: 0.5;
}

.beyond20-tooltip .beyond20-tooltip-content {
    display: none;
    background-color: #f5f2ec;
    text-align: left;
    border-radius: 6px;
    padding: 5px 10px;
    margin: 10px;
    width: 90%;
    top: -50%;
    left: 0;
    border: 2px solid black;

    /* Position the tooltip */
    position: absolute;
    z-index: 1;
}

.beyond20-tooltip:hover .beyond20-tooltip-content {
    display: block;
    /* Move the tooltip above the parent element. */
    transform: translate(0, -100%);
}

.beyond20-tooltip-content .dice-tooltip {
    display: block;
}

.beyond20-form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 3px 0;
}
.beyond20-form-row > * {
    flex: 2;
}

/* Prevent background / border images from swallowing quickroll mouse events */
.ddbc-box-background {
    pointer-events: none;
}
