.ewc-word-counter {
    --ewc-color: currentColor;
    --ewc-button-bg: var(--wp--preset--color--primary, ButtonFace);
    --ewc-button-color: ButtonText;
    box-sizing: border-box;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    text-align: center;
    color: var(--ewc-color);
}

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

.ewc-dropzone {
    width: 100%;
    max-width: 350px;
    min-height: 120px;
    border: 2px dashed var(--ewc-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--ewc-color);
    background: transparent;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease, border-style 160ms ease;
}

.ewc-dropzone:focus {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.ewc-dropzone.ewc-dropzone-active {
    opacity: 0.85;
    transform: scale(0.99);
    border-style: solid;
}

.ewc-dropzone-text {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ewc-color);
}

.ewc-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ewc-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ewc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    background: var(--ewc-button-bg);
    color: var(--ewc-button-color);
    font: inherit;
    line-height: 1.1;
    text-decoration: none;
    transition: opacity 160ms ease;
}

.ewc-button:hover,
.ewc-button:focus {
    opacity: 0.9;
}

.ewc-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.ewc-button-icon,
.ewc-svg-path {
    color: var(--ewc-button-color);
    fill: currentColor;
    flex: 0 0 auto;
}

.ewc-file-name {
    min-height: 1.4em;
    margin: 12px 0 0;
    overflow-wrap: anywhere;
    color: var(--ewc-color);
}

.ewc-message {
    min-height: 1.4em;
    margin: 8px 0 0;
    overflow-wrap: anywhere;
}

.ewc-message.ewc-message-error {
    color: #b00020;
}

.ewc-message.ewc-message-success {
    color: #087f23;
}

.ewc-results {
    width: 100%;
    max-width: 350px;
    margin: 14px auto 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

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

.ewc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
}

.ewc-result-row:last-child {
    border-bottom: 0;
}

.ewc-result-label {
    font-weight: 400;
}

.ewc-result-value {
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}
