.sh-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.sh-overlay .modal-background {
    position: absolute; inset: 0;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}
.sh-editor-card {
    position: relative; z-index: 10;
    background: #09090b; border: 1px solid #27272a; border-radius: 0.75rem;
    width: 100%; max-width: 650px; color: #fafafa;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    font-family: 'Inter', sans-serif; display: flex; flex-direction: column;
    overflow: hidden; margin: 1rem;
    pointer-events: auto;
}
.sh-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #27272a; display: flex; justify-content: space-between; align-items: center; }
.sh-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.sh-close { background: transparent; border: none; color: #a1a1aa; cursor: pointer; font-size: 1.25rem; }
.sh-close:hover { color: #fff; }
.sh-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; max-height: 70vh; overflow-y: auto; }

/* Стилизация контейнера волны */
.sh-waveform-wrapper {
    position: relative;
    width: 100%;
    height: 90px;
    background: #111113;
    border: 1px solid #3f3f46;
    border-radius: 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
    cursor: ew-resize;
}
.sh-waveform-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.sh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 550px) { .sh-grid { grid-template-columns: 1fr; } }
.sh-control { display: flex; flex-direction: column; gap: 0.35rem; }
.sh-label span.val { font-size: 0.8rem; font-weight: 500; color: #d4d4d8; display: flex; justify-content: space-between; }
.sh-label span.val { color: #ffffff; font-family: monospace; font-weight: bold; }

.sh-input, .sh-select { background: #18181b; border: 1px solid #3f3f46; border-radius: 0.375rem; padding: 0.5rem 0.75rem; color: #fff; font-size: 0.875rem; width: 100%; outline: none; }
.sh-input:focus, .sh-select:focus { border-color: #ffffff; }

/* Контейнер для строк пресетов */
.sh-preset-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

/* Улучшенная видимость и дизайн слайдеров */
.sh-slider {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100%;
    height: 20px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
    outline: none;
}
.sh-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #3f3f46 !important;
    border-radius: 9999px;
    border: none !important;
}
.sh-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #3f3f46 !important;
    border-radius: 9999px;
    border: none !important;
}
.sh-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    margin-top: -4px !important; /* Выравнивание по центру трека высотой 6px */
    transition: transform 0.1s !important;
}
.sh-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.sh-slider::-moz-range-thumb {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    transition: transform 0.1s !important;
}
.sh-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Вспомогательный тумблер (checkbox) */
.sh-checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #d4d4d8;
    cursor: pointer;
    user-select: none;
}
.sh-checkbox-container input {
    accent-color: #ffffff;
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.sh-footer { padding: 1rem 1.5rem; border-top: 1px solid #27272a; display: flex; justify-content: flex-end; gap: 0.75rem; background: #09090b; align-items: center; }
.sh-btn { border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; height: 2.25rem; padding: 0 1rem; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all 0.15s ease; }
.sh-btn-ghost { background: transparent; color: #fafafa; border-color: #3f3f46; }
.sh-btn-ghost:hover { background: #27272a; border-color: #52525b; }
.sh-btn-danger { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
.sh-btn-danger:hover { background: #991b1b; }
.sh-btn-primary { background: #ffffff; color: #09090b; }
.sh-btn-primary:hover:not(:disabled) { background: #e4e4e7; }
.sh-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.sh-loader-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; gap: 1rem; color: #a1a1aa; }
