.dice-icon {
    cursor: pointer;
    text-decoration: none;
}

.dice-icon i {
    color: #555;
    max-width: 16px;
}

.dice-icon i::before {
    content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M274.9 34.3c-28.1-28.1-73.7-28.1-101.8 0L34.3 173.1c-28.1 28.1-28.1 73.7 0 101.8L173.1 413.7c28.1 28.1 73.7 28.1 101.8 0L413.7 274.9c28.1-28.1 28.1-73.7 0-101.8L274.9 34.3zM200 224a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM96 200a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM224 376a24 24 0 1 1 0-48 24 24 0 1 1 0 48zM352 200a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM224 120a24 24 0 1 1 0-48 24 24 0 1 1 0 48zm96 328c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-114.3 0c11.6 36 3.1 77-25.4 105.5L320 413.8l0 34.2zM480 328a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>');
    filter: invert(84%) sepia(0%) saturate(98%) hue-rotate(135deg) brightness(101%) contrast(88%);
}

/* Style for the dice-roll container */
.dice-rolls {
    margin-top: 1em;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.dice-roll {
    padding: 0.5em;
}

/* Header styling */
.dice-roll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Styling for the timestamp abbreviation */
.dice-roll-timestamp {
    cursor: help;
    text-decoration: underline dotted;
    margin-left: 0.5em;
}

.dice-roll-timestamp i {
    margin-right: 0;
}

/* Style for the <details> element */
.dice-roll-details summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 1.5em;
}

/* Remove default marker for summary */
.dice-roll-details summary::-webkit-details-marker {
    display: none;
}

/* Style for the summary icon */
.summary-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

/* Rotate the chevron when <details> is open */
.dice-roll-details[open] .summary-icon i {
    transform: rotate(180deg);
}

/* Optional: Change the color on hover */
.dice-roll-details summary:hover {
    color: #7a7a7a;
}

/* Style for expansions */
.dice-roll-expansions {
    margin-top: 0.5em;
    padding-left: 1em;
    border-left: 2px solid #909090;
}

.dice-roll-expansions div {
    margin-bottom: 0.25em;
}


/* Modal styles */
.dice-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.dice-modal-content {
    background-color: rgb(23, 27, 36);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid rgb(47, 54, 68);
    width: 80%;
    max-width: 600px;
}


.dice-modal-content .form-group {
    margin-bottom: 1em;
}

.dice-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.dice-component {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.dice-roll-components .dice-component-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(204, 204, 204, 0.5);
}

.dice-roll-components .dice-component-item:last-child {
    border-bottom: none;
}

.component-name, .component-expression {
    flex: 1;
    padding: 2px;
}

.remove-component {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    margin: auto;
}

#add-component, #submit-roll {
    margin-top: 10px;
    padding: 8px 16px;
    cursor: pointer;
}

#add-component {
    margin-right: 10px;
}

#submit-roll {
    float: right;
}