.character-counter {
    margin: 20px 0;
}

.character-counter *,
.character-counter *::before,
.character-counter *::after {
    box-sizing: border-box;
}

.cc-screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cc-results[hidden] {
    display: none;
}

.characterinfo {
    background: #f7f8f9!important;
    color: #18405c;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #f0f0f0;
    padding: 25px 15px;
    display: flex;
    gap: 0;
}

.counterbox {
    text-align: center;
    width: 20%;
    border-right: 1px solid #b2b2be;
    font-weight: 700;
    padding: 5px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.counterboxnb {
    border-right: none;
}

.cc-label,
.cc-sub {
    display: block;
    line-height: 1.25;
}

.cc-sub {
    font-size: 0.9rem;
}

.counterbig {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 2px 0;
}

.cc-textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 10px;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    border: 1px solid #d7dce0;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
}

.cc-textarea:focus,
.cc-button:focus {
    outline: 3px solid #18405c;
    outline-offset: 3px;
}

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-button,
.cc-button-secondary {
    cursor: pointer;
    border: 1px solid var(--cc-button-bg, #18405c);
    background: var(--cc-button-bg, #18405c);
    color: var(--cc-button-text, #ffffff);
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
}

.cc-button:hover,
.cc-button-secondary:hover {
    background: var(--cc-button-bg, #18405c);
    color: var(--cc-button-text, #ffffff);
    border-color: var(--cc-button-bg, #18405c);
    filter: none;
}

.cc-button:focus,
.cc-button-secondary:focus,
.cc-button:focus-visible,
.cc-button-secondary:focus-visible {
    background: var(--cc-button-bg, #18405c);
    color: var(--cc-button-text, #ffffff);
    border-color: var(--cc-button-bg, #18405c);
    outline: 3px solid var(--cc-button-bg, #18405c);
    outline-offset: 3px;
}

@media (max-width: 720px) {
    .characterinfo {
        flex-wrap: wrap;
        border-radius: 10px;
    }

    .counterbox {
        width: 50%;
        flex: 0 0 50%;
        border-right: 1px solid #b2b2be;
        border-bottom: 1px solid #d8d8df;
        font-size: 0.95rem;
    }

    .counterbox:nth-child(2n),
    .counterboxnb {
        border-right: none;
    }

    .counterbox:nth-last-child(-n + 1) {
        border-bottom: none;
    }

    .cc-textarea {
        border-radius: 10px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .counterbox {
        width: 100%;
        flex: 0 0 100%;
        border-right: none;
        font-size: 0.9rem;
    }

    .cc-actions {
        flex-direction: column;
    }

    .cc-button {
        width: 100%;
    }
}