/* Controles compartilhados do criador HSM, com os tokens do tema ativo. */
.hsm-body-counter {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: right;
}
.hsm-utility-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    background: var(--bg-page);
}
.hsm-intensity-control {
    flex: 1 1 220px;
    min-width: 0;
}
.hsm-intensity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hsm-intensity-heading label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}
.hsm-intensity-value {
    min-width: 52px;
    padding: 4px 8px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: var(--bg-card);
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.hsm-intensity-range {
    display: block;
    width: 100%;
    height: 32px;
    margin: 4px 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    accent-color: currentColor;
}
.hsm-intensity-range::-webkit-slider-runnable-track {
    height: 8px;
    border: 1px solid var(--text-secondary);
    border-radius: 999px;
    background: linear-gradient(to right, currentColor var(--hsm-intensity, 50%), var(--bg-card) var(--hsm-intensity, 50%));
}
.hsm-intensity-range::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -8px;
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 1px currentColor;
    appearance: none;
    -webkit-appearance: none;
}
.hsm-intensity-range::-moz-range-track {
    height: 8px;
    border: 1px solid var(--text-secondary);
    border-radius: 999px;
    background: var(--bg-card);
}
.hsm-intensity-range::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}
.hsm-intensity-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 1px currentColor;
}
.hsm-intensity-help {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}
.hsm-utility-action,
.hsm-template-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid currentColor;
    border-radius: 10px;
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: var(--shadow-card);
    transition: background-color .15s, box-shadow .15s;
}
.hsm-utility-action:not(:disabled):hover,
.hsm-template-create:not(:disabled):hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-elevated);
}
.hsm-utility-action:focus-visible,
.hsm-template-create:focus-visible,
.hsm-intensity-range:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
.hsm-utility-action:disabled,
.hsm-template-create:disabled {
    cursor: wait;
    opacity: .65;
}
.hsm-template-create svg,
.hsm-utility-action svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .hsm-utility-panel { padding: 12px; gap: 12px; }
    .hsm-intensity-control,
    .hsm-utility-action { flex-basis: 100%; }
}
