.mail-tester {
    max-width: 800px;
    margin: auto;
}

#mail-search-input,
#mail-search {
    margin: .5em;
}

li.good-item, li.bad-item, li.question-mark-item {
    max-width: 90%; /* Restrict the width of the list items */
    word-wrap: break-word; /* Ensure long text breaks correctly */
}

.mail-tester * {
    list-style: none;
    word-wrap: break-word;
}

ul:first-child {
    margin-top: .5em;
}

.word-break {
    word-wrap: break-word; /* Ensure long text breaks correctly */
    word-break: break-all; /* Break long words if needed */
    overflow-wrap: break-word; /* Ensure long text breaks correctly */
}

/* For both general elements and list items */
.good, .good-item, .bad, .bad-item, .question-mark, .question-mark-item {
    display: flex;
    align-items: flex-start; /* Align items at the start to handle multiline text */
    max-width: 90%; /* Restrict the width of the list items */
    word-break: text-break;
}

.good::before, .good-item::before,
.bad::before, .bad-item::before,
.question-mark::before, .question-mark-item::before {
    content: attr(data-icon); /* Use data attribute for icon content */
    margin-right: .2em; /* Adjust spacing as needed */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Define specific icons for each style */
.good::before, .good-item::before {
    content: "\2714"; /* Checkmark */
}

.bad::before, .bad-item::before {
    content: "\2718"; /* Cross */
}

.question-mark::before, .question-mark-item::before {
    content: "\003F"; /* Question mark */
}


section .question-mark,
section .good,
section .bad {
    padding: 0px;
}

section .question-mark,
section:has(h3.question-mark) {
    background-color: #e0e0e0;
}

section .good,
section:has(h3.good) {
    background-color: #d8f9d8;
}

section .bad,
section:has(h3.bad) {
    background-color: #fedcdc;
}

#mail-tester-body {
    display: none;
    opacity: 0;
    animation-fill-mode: forwards;
}

.mail-search-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: var(--color-grey);
    background-color: white;
    border: 2px solid var(--color-grey);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.mail-search-button:hover {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    color: white;
}

@keyframes reveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}